summaryrefslogtreecommitdiff
path: root/modules/image_block/helpers/image_block_block.php
diff options
context:
space:
mode:
authorNathan Kinkade <nkinkade@nkinka.de>2010-01-03 15:51:24 +0000
committerNathan Kinkade <nkinkade@nkinka.de>2010-01-03 15:51:24 +0000
commit399abbc3a754cf5fdcfdff113446e1bc264091e2 (patch)
tree592188568e15325d59e51bf19cfdf667fae8d86d /modules/image_block/helpers/image_block_block.php
parent925a6a2220760cb7daacee1ab80a07b61b3a30a1 (diff)
parent64e5efd57ba1479179c202e1b76b6eeb42d2924c (diff)
Merge branch 'master' of git://github.com/gallery/gallery3
Diffstat (limited to 'modules/image_block/helpers/image_block_block.php')
-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);
}