diff options
-rw-r--r-- | core/controllers/quick.php | 1 | ||||
-rw-r--r-- | modules/search/helpers/search_event.php | 4 |
2 files changed, 4 insertions, 1 deletions
diff --git a/core/controllers/quick.php b/core/controllers/quick.php index 20072044..6fd0ae62 100644 --- a/core/controllers/quick.php +++ b/core/controllers/quick.php @@ -106,6 +106,7 @@ class Quick_Controller extends Controller { $msg = t("Deleted photo <b>%title</b>", array("title" => $item->title)); } + module::event("item_before_delete", $item); $item->delete(); message::success($msg); diff --git a/modules/search/helpers/search_event.php b/modules/search/helpers/search_event.php index da123dc9..83e65721 100644 --- a/modules/search/helpers/search_event.php +++ b/modules/search/helpers/search_event.php @@ -32,7 +32,9 @@ class search_event_Core { } static function item_before_delete($item) { - ORM::factory("item_id", $item->id)->delete_all(); + ORM::factory("search_record") + ->where("item_id", $item->id) + ->delete_all(); } static function item_related_update($item) { |