summaryrefslogtreecommitdiff
path: root/modules/search
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2010-01-09 23:57:16 -0800
committerTim Almdal <tnalmdal@shaw.ca>2010-01-09 23:57:16 -0800
commita11bf295078656612603c1c561e9261555d0c40c (patch)
treec158e9b44762a9606315bf60d67fe2604ce26291 /modules/search
parentbd9f945e3f2de4ea2402bd3941dba69c79ddc5a4 (diff)
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. :-)
Diffstat (limited to 'modules/search')
-rw-r--r--modules/search/helpers/search_event.php5
1 files changed, 3 insertions, 2 deletions
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) {