summaryrefslogtreecommitdiff
path: root/modules/image_block
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2009-11-25 19:25:34 -0800
committerBharat Mediratta <bharat@menalto.com>2009-11-25 19:25:34 -0800
commit0ef6994f23300f3c6bfb83193b4101202dbc16f8 (patch)
tree2afa6b5f325593d4e18d89c57253baff4cd1ab9a /modules/image_block
parentccb0ea3d30a114c069240453d7d85f18328db6e5 (diff)
ORM::orderby -> ORM::order_by
Diffstat (limited to 'modules/image_block')
-rw-r--r--modules/image_block/helpers/image_block_block.php12
1 files changed, 6 insertions, 6 deletions
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);
}