From a11bf295078656612603c1c561e9261555d0c40c Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Sat, 9 Jan 2010 23:57:16 -0800 Subject: Fix for ticket #972 and more. In Kohana 2.4, ORM::delete_all ignores any where clauses and deletes all the entries in the table unless an array of id's are passed as the parameter. This fix used the Database_builder to specify any where conditions. Thanks psvo for find the first one. :-) --- modules/search/helpers/search_event.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'modules/search') diff --git a/modules/search/helpers/search_event.php b/modules/search/helpers/search_event.php index 1add6e5f..97041f8c 100644 --- a/modules/search/helpers/search_event.php +++ b/modules/search/helpers/search_event.php @@ -27,9 +27,10 @@ class search_event_Core { } static function item_deleted($item) { - ORM::factory("search_record") + db::build() + ->delete("search_records") ->where("item_id", "=", $item->id) - ->delete_all(); + ->execute(); } static function item_related_update($item) { -- cgit v1.2.3