summaryrefslogtreecommitdiff
path: root/modules/gallery/helpers/module.php
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2009-11-29 02:48:42 -0800
committerBharat Mediratta <bharat@menalto.com>2009-11-29 02:48:42 -0800
commit53df0df0a4f9d2d5369016a7e2ea983ffe202346 (patch)
tree1263597104ccee60b616d25ea957563e931bff58 /modules/gallery/helpers/module.php
parent3f63e1c52103c1c80d5236f69f62054525ebe4f4 (diff)
Update a few more occurrences of ORM/Database -> Database_Builder
Diffstat (limited to 'modules/gallery/helpers/module.php')
-rw-r--r--modules/gallery/helpers/module.php13
1 files changed, 9 insertions, 4 deletions
diff --git a/modules/gallery/helpers/module.php b/modules/gallery/helpers/module.php
index 9fe2ec5e..14caa89b 100644
--- a/modules/gallery/helpers/module.php
+++ b/modules/gallery/helpers/module.php
@@ -377,11 +377,12 @@ class module_Core {
self::$var_cache = unserialize($row->value);
} else {
// gallery._cache doesn't exist. Create it now.
- foreach (Database::instance()
+ foreach (db::build()
->select("module_name", "name", "value")
->from("vars")
- ->order_by("module_name", "name")
- ->get() as $row) {
+ ->order_by("module_name")
+ ->order_by("name")
+ ->execute() as $row) {
if ($row->module_name == "gallery" && $row->name == "_cache") {
// This could happen if there's a race condition
continue;
@@ -421,7 +422,11 @@ class module_Core {
$var->value = $value;
$var->save();
- 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;
}