summaryrefslogtreecommitdiff
path: root/modules/image_block/helpers/image_block_block.php
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2010-01-08 14:56:08 -0800
committerBharat Mediratta <bharat@menalto.com>2010-01-08 14:56:08 -0800
commit9864ab4b2708ec54c39092a21828403cbbd25e2e (patch)
treee3542b02adbb8dc7da3c3185a35f1d46d944ef59 /modules/image_block/helpers/image_block_block.php
parentfb65a0a5854812a9837c770dfbb27a23bee49e3d (diff)
Move the random image functionality into the gallery REST helper since
choosing a random image is essentially a function on an item collection. Also implemented a bunch of other query filters for item collections. Created item::random_query() as a way of generating a reasonable starting point for random queries.
Diffstat (limited to 'modules/image_block/helpers/image_block_block.php')
-rw-r--r--modules/image_block/helpers/image_block_block.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/image_block/helpers/image_block_block.php b/modules/image_block/helpers/image_block_block.php
index 5f2bbcb7..f28e775f 100644
--- a/modules/image_block/helpers/image_block_block.php
+++ b/modules/image_block/helpers/image_block_block.php
@@ -30,7 +30,7 @@ class image_block_block_Core {
$block->css_id = "g-image-block";
$block->title = t("Random image");
$block->content = new View("image_block_block.html");
- $block->content->items = item::random(array(array("type", "!=", "album")));
+ $block->content->items = item::random_query(array(array("type", "!=", "album")))->find_all(1);
if ($block->content->items->count() == 0) {
$block = "";