summaryrefslogtreecommitdiff
path: root/modules/gallery/models
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/models
parentb9a0e0963746420d82ad3107135aa7a9256825be (diff)
Convert some more Database::instance() calls to db::build() form.
Diffstat (limited to 'modules/gallery/models')
-rw-r--r--modules/gallery/models/item.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/gallery/models/item.php b/modules/gallery/models/item.php
index 16c57dbc..8a42cc1e 100644
--- a/modules/gallery/models/item.php
+++ b/modules/gallery/models/item.php
@@ -285,14 +285,14 @@ class Item_Model extends ORM_MPTT {
private function _build_relative_caches() {
$names = array();
$slugs = array();
- foreach (Database::instance()
+ foreach (db::build()
->select(array("name", "slug"))
->from("items")
->where("left_ptr", "<=", $this->left_ptr)
->where("right_ptr", ">=", $this->right_ptr)
->where("id", "<>", 1)
->order_by("left_ptr", "ASC")
- ->get() as $row) {
+ ->execute() as $row) {
// Don't encode the names segment
$names[] = rawurlencode($row->name);
$slugs[] = rawurlencode($row->slug);
@@ -489,7 +489,7 @@ class Item_Model extends ORM_MPTT {
->where("parent_id", "=", $this->id)
->merge_where($where)
->order_by($order_by)
- ->get() as $row) {
+ ->execute() as $row) {
$position++;
if ($row->id == $child->id) {
break;