summaryrefslogtreecommitdiff
path: root/modules/gallery/helpers/graphics.php
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/gallery/helpers/graphics.php
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/gallery/helpers/graphics.php')
-rw-r--r--modules/gallery/helpers/graphics.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/gallery/helpers/graphics.php b/modules/gallery/helpers/graphics.php
index 7577d7ac..5a290905 100644
--- a/modules/gallery/helpers/graphics.php
+++ b/modules/gallery/helpers/graphics.php
@@ -60,11 +60,12 @@ class graphics_Core {
* @param string $operation the name of the operation(<defining class>::method)
*/
static function remove_rule($module_name, $target, $operation) {
- ORM::factory("graphics_rule")
+ db::build()
+ ->delete("graphics_rules")
->where("module_name", "=", $module_name)
->where("target", "=", $target)
->where("operation", "=", $operation)
- ->delete_all();
+ ->execute();
self::mark_dirty($target == "thumb", $target == "resize");
}