summaryrefslogtreecommitdiff
path: root/modules/gallery/helpers
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2009-11-26 21:14:54 -0800
committerBharat Mediratta <bharat@menalto.com>2009-11-26 21:14:54 -0800
commit96b00d6cfe437e376d5547a10aa8d1cf7def8c13 (patch)
tree355f3df10c86f595e1373a53a0746b877b27489b /modules/gallery/helpers
parentb9a0e0963746420d82ad3107135aa7a9256825be (diff)
Convert some more Database::instance() calls to db::build() form.
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;
}