diff options
author | Bharat Mediratta <bharat@menalto.com> | 2009-11-25 19:26:52 -0800 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2009-11-25 19:26:52 -0800 |
commit | 0121bfd5850bdc59bf0cd656c61c953421a85890 (patch) | |
tree | 439172283f1ae2653407af2b38a3a57895adf104 /modules/gallery/helpers | |
parent | 0ef6994f23300f3c6bfb83193b4101202dbc16f8 (diff) |
ORM::orderby -> ORM::order_by
Diffstat (limited to 'modules/gallery/helpers')
-rw-r--r-- | modules/gallery/helpers/access.php | 10 | ||||
-rw-r--r-- | modules/gallery/helpers/gallery_block.php | 4 | ||||
-rw-r--r-- | modules/gallery/helpers/gallery_rss.php | 4 | ||||
-rw-r--r-- | modules/gallery/helpers/graphics.php | 2 | ||||
-rw-r--r-- | modules/gallery/helpers/item.php | 2 | ||||
-rw-r--r-- | modules/gallery/helpers/module.php | 2 |
6 files changed, 12 insertions, 12 deletions
diff --git a/modules/gallery/helpers/access.php b/modules/gallery/helpers/access.php index 9d27181a..d0200a73 100644 --- a/modules/gallery/helpers/access.php +++ b/modules/gallery/helpers/access.php @@ -171,7 +171,7 @@ class access_Core { ->where("items.id <> $item->id") ->join("access_intents", "items.id", "access_intents.item_id") ->where("access_intents.view_$group->id", self::DENY) - ->orderby("level", "DESC") + ->order_by("level", "DESC") ->limit(1) ->find(); @@ -494,7 +494,7 @@ class access_Core { ->where("right_ptr >", $item->right_ptr) ->join("access_intents", "access_intents.item_id", "items.id") ->where("access_intents.$field", self::DENY) - ->orderby("left_ptr", "DESC") + ->order_by("left_ptr", "DESC") ->limit(1) ->find(); if ($tmp_item->loaded()) { @@ -516,7 +516,7 @@ class access_Core { ->where("right_ptr <=", $item->right_ptr) ->where("type", "album") ->where("access_intents.$field IS NOT", self::INHERIT) - ->orderby("level", "DESC") + ->order_by("level", "DESC") ->find_all(); foreach ($query as $row) { if ($row->$field == self::ALLOW) { @@ -565,7 +565,7 @@ class access_Core { ->where("left_ptr <", $item->left_ptr) ->where("right_ptr >", $item->right_ptr) ->where("$field IS NOT", self::UNKNOWN) - ->orderby("left_ptr", "DESC") + ->order_by("left_ptr", "DESC") ->limit(1) ->find(); if ($tmp_item->loaded()) { @@ -581,7 +581,7 @@ class access_Core { ->where("left_ptr >=", $item->left_ptr) ->where("right_ptr <=", $item->right_ptr) ->where("$field IS NOT", self::INHERIT) - ->orderby("level", "ASC") + ->order_by("level", "ASC") ->find_all(); foreach ($query as $row) { $value = ($row->$field === self::ALLOW) ? "TRUE" : "FALSE"; diff --git a/modules/gallery/helpers/gallery_block.php b/modules/gallery/helpers/gallery_block.php index b5c32ad2..d09f1c80 100644 --- a/modules/gallery/helpers/gallery_block.php +++ b/modules/gallery/helpers/gallery_block.php @@ -46,7 +46,7 @@ class gallery_block_Core { $block->title = t("Photo stream"); $block->content = new View("admin_block_photo_stream.html"); $block->content->photos = - ORM::factory("item")->where("type", "photo")->orderby("created", "DESC")->find_all(10); + ORM::factory("item")->where("type", "photo")->order_by("created", "DESC")->find_all(10); break; case "log_entries": @@ -54,7 +54,7 @@ class gallery_block_Core { $block->title = t("Log entries"); $block->content = new View("admin_block_log_entries.html"); $block->content->entries = ORM::factory("log") - ->orderby(array("timestamp" => "DESC", "id" => "DESC"))->find_all(5); + ->order_by(array("timestamp" => "DESC", "id" => "DESC"))->find_all(5); break; case "stats": diff --git a/modules/gallery/helpers/gallery_rss.php b/modules/gallery/helpers/gallery_rss.php index 155edfb5..e195be8d 100644 --- a/modules/gallery/helpers/gallery_rss.php +++ b/modules/gallery/helpers/gallery_rss.php @@ -30,13 +30,13 @@ class gallery_rss_Core { $feed->children = ORM::factory("item") ->viewable() ->where("type !=", "album") - ->orderby("created", "DESC") + ->order_by("created", "DESC") ->find_all($limit, $offset); $all_children = ORM::factory("item") ->viewable() ->where("type !=", "album") - ->orderby("created", "DESC"); + ->order_by("created", "DESC"); $feed->max_pages = ceil($all_children->find_all()->count() / $limit); $feed->title = t("Recent updates"); diff --git a/modules/gallery/helpers/graphics.php b/modules/gallery/helpers/graphics.php index a78cadd0..aef09003 100644 --- a/modules/gallery/helpers/graphics.php +++ b/modules/gallery/helpers/graphics.php @@ -183,7 +183,7 @@ class graphics_Core { foreach (ORM::factory("graphics_rule") ->where("target", $target) ->where("active", true) - ->orderby("priority", "asc") + ->order_by("priority", "asc") ->find_all() as $rule) { $rules[] = (object)$rule->as_array(); } diff --git a/modules/gallery/helpers/item.php b/modules/gallery/helpers/item.php index 109fa6f8..7496d368 100644 --- a/modules/gallery/helpers/item.php +++ b/modules/gallery/helpers/item.php @@ -142,7 +142,7 @@ class item_Core { // @todo: figure out a better way to bootstrap the weight. $result = Database::instance() ->select("weight")->from("items") - ->orderby("weight", "desc")->limit(1) + ->order_by("weight", "desc")->limit(1) ->get()->current(); return ($result ? $result->weight : 0) + 1; } diff --git a/modules/gallery/helpers/module.php b/modules/gallery/helpers/module.php index e54a4352..b7e13b9a 100644 --- a/modules/gallery/helpers/module.php +++ b/modules/gallery/helpers/module.php @@ -364,7 +364,7 @@ class module_Core { foreach (Database::instance() ->select("module_name", "name", "value") ->from("vars") - ->orderby("module_name", "name") + ->order_by("module_name", "name") ->get() as $row) { if ($row->module_name == "gallery" && $row->name == "_cache") { // This could happen if there's a race condition |