From 0ef6994f23300f3c6bfb83193b4101202dbc16f8 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Wed, 25 Nov 2009 19:25:34 -0800 Subject: ORM::orderby -> ORM::order_by --- modules/image_block/helpers/image_block_block.php | 12 ++++++------ modules/tag/helpers/tag.php | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'modules') diff --git a/modules/image_block/helpers/image_block_block.php b/modules/image_block/helpers/image_block_block.php index 79bd92ba..f591e8d1 100644 --- a/modules/image_block/helpers/image_block_block.php +++ b/modules/image_block/helpers/image_block_block.php @@ -35,18 +35,18 @@ class image_block_block_Core { $items = ORM::factory("item") ->viewable() - ->where("type !=", "album") - ->where("rand_key < ", $random) - ->orderby(array("rand_key" => "DESC")) + ->where("type", "!=", "album") + ->where("rand_key", "<", $random) + ->order_by(array("rand_key" => "DESC")) ->find_all(1); if ($items->count() == 0) { // Try once more. If this fails, just ditch the block altogether $items = ORM::factory("item") ->viewable() - ->where("type !=", "album") - ->where("rand_key >= ", $random) - ->orderby(array("rand_key" => "DESC")) + ->where("type", "!=", "album") + ->where("rand_key", ">=", $random) + ->order_by(array("rand_key" => "DESC")) ->find_all(1); } diff --git a/modules/tag/helpers/tag.php b/modules/tag/helpers/tag.php index 8558ac30..8694bcec 100644 --- a/modules/tag/helpers/tag.php +++ b/modules/tag/helpers/tag.php @@ -57,7 +57,7 @@ class tag_Core { */ static function popular_tags($count) { return ORM::factory("tag") - ->orderby("count", "DESC") + ->order_by("count", "DESC") ->limit($count) ->find_all(); } -- cgit v1.2.3