summaryrefslogtreecommitdiff
path: root/modules/image_block/helpers
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2009-12-27 08:32:12 -0800
committerTim Almdal <tnalmdal@shaw.ca>2009-12-27 08:32:12 -0800
commitbccb6fc02146fb07cd1b472a90092e78e2259e91 (patch)
tree78dcb1717e020ebc65fec8a4ba452ab1193d2a27 /modules/image_block/helpers
parent07e83718a0cd1bcef1f0a0546ffcb7cb6a1735ae (diff)
Clean up validation the check for duplicate names or slugs, finish converting the rest API to Kohana 2.4
Diffstat (limited to 'modules/image_block/helpers')
-rw-r--r--modules/image_block/helpers/image_block_rest.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/modules/image_block/helpers/image_block_rest.php b/modules/image_block/helpers/image_block_rest.php
index 45f849b1..7afd974c 100644
--- a/modules/image_block/helpers/image_block_rest.php
+++ b/modules/image_block/helpers/image_block_rest.php
@@ -26,18 +26,18 @@ class image_block_rest_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);
}
break;