diff options
author | Bharat Mediratta <bharat@menalto.com> | 2009-12-06 19:51:25 -0800 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2009-12-06 19:51:25 -0800 |
commit | 5a7449f31574c7c548abe4244a6ba0993138e013 (patch) | |
tree | dd88dbe8e33005de5fb46614d7a28dbdb1e3e502 /modules/gallery/helpers | |
parent | 112aafe5137220181dd74afc509fa6cd39573028 (diff) |
Update more database calls.
Diffstat (limited to 'modules/gallery/helpers')
-rw-r--r-- | modules/gallery/helpers/graphics.php | 19 | ||||
-rw-r--r-- | modules/gallery/helpers/module.php | 6 |
2 files changed, 19 insertions, 6 deletions
diff --git a/modules/gallery/helpers/graphics.php b/modules/gallery/helpers/graphics.php index 6fab0b54..7577d7ac 100644 --- a/modules/gallery/helpers/graphics.php +++ b/modules/gallery/helpers/graphics.php @@ -74,7 +74,10 @@ class graphics_Core { * @param string $module_name */ static function remove_rules($module_name) { - $status = Database::instance()->delete("graphics_rules", array("module_name" => $module_name)); + $status = db::build() + ->delete("graphics_rules") + ->where("module_name", "=", $module_name) + ->execute(); if (count($status)) { self::mark_dirty(true, true); } @@ -86,8 +89,11 @@ class graphics_Core { * module it won't cause all of your images to suddenly require a rebuild. */ static function activate_rules($module_name) { - Database::instance() - ->update("graphics_rules",array("active" => true), array("module_name" => $module_name)); + db::build() + ->update("graphics_rules") + ->set("active", true) + ->where("module_name", "=", $module_name) + ->execute(); } /** @@ -96,8 +102,11 @@ class graphics_Core { * module it won't cause all of your images to suddenly require a rebuild. */ static function deactivate_rules($module_name) { - Database::instance() - ->update("graphics_rules",array("active" => false), array("module_name" => $module_name)); + db::build() + ->update("graphics_rules") + ->set("active", false) + ->where("module_name", "=", $module_name) + ->execute(); } /** diff --git a/modules/gallery/helpers/module.php b/modules/gallery/helpers/module.php index 14caa89b..b8928f7b 100644 --- a/modules/gallery/helpers/module.php +++ b/modules/gallery/helpers/module.php @@ -460,7 +460,11 @@ class module_Core { $var->delete(); } - Database::instance()->delete("vars", array("module_name" => "gallery", "name" => "_cache")); + db::build() + ->delete("vars") + ->where("module_name", "=", "gallery") + ->where("name", "=", "_cache") + ->execute(); self::$var_cache = null; } |