diff options
author | Tim Almdal <tnalmdal@shaw.ca> | 2009-04-29 00:29:53 +0000 |
---|---|---|
committer | Tim Almdal <tnalmdal@shaw.ca> | 2009-04-29 00:29:53 +0000 |
commit | 9176dadfd69c15d9f16581d119569a7745c53067 (patch) | |
tree | 4e85f9c9ed8fa9fb34149068c05885f4f2c103e8 | |
parent | 12d976b94d6e7b13e1124b2c943c33d8cd0876e8 (diff) |
Move the module::event("before_item_delete") into the
Item_Model::delete method. This will insure that it will get called
for all events. Currently it is not being called for children of an
album when the parent album is deleted.
-rw-r--r-- | core/controllers/quick.php | 1 | ||||
-rw-r--r-- | core/models/item.php | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/core/controllers/quick.php b/core/controllers/quick.php index d62f3af0..32febb31 100644 --- a/core/controllers/quick.php +++ b/core/controllers/quick.php @@ -120,7 +120,6 @@ class Quick_Controller extends Controller { $parent->save(); } - module::event("item_before_delete", $item); $item->delete(); message::success($msg); diff --git a/core/models/item.php b/core/models/item.php index 9292983d..f529a471 100644 --- a/core/models/item.php +++ b/core/models/item.php @@ -93,6 +93,8 @@ class Item_Model extends ORM_MPTT { } public function delete() { + module::event("item_before_delete", $this); + $original_path = $this->file_path(); $original_resize_path = $this->resize_path(); $original_thumb_path = $this->thumb_path(); |