summaryrefslogtreecommitdiff
path: root/modules/gallery/helpers
diff options
context:
space:
mode:
Diffstat (limited to 'modules/gallery/helpers')
-rw-r--r--modules/gallery/helpers/item.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/gallery/helpers/item.php b/modules/gallery/helpers/item.php
index 7496d368..c3126435 100644
--- a/modules/gallery/helpers/item.php
+++ b/modules/gallery/helpers/item.php
@@ -140,10 +140,10 @@ class item_Core {
// Guard against an empty result when we create the first item. It's unfortunate that we
// have to check this every time.
// @todo: figure out a better way to bootstrap the weight.
- $result = Database::instance()
+ $result = db::build()
->select("weight")->from("items")
->order_by("weight", "desc")->limit(1)
- ->get()->current();
+ ->execute()->current();
return ($result ? $result->weight : 0) + 1;
}