aboutsummaryrefslogtreecommitdiff
path: root/classes/TidypicsAlbum.php
diff options
context:
space:
mode:
authorBrett Profitt <brett.profitt@gmail.com>2012-04-06 11:04:32 -0700
committerBrett Profitt <brett.profitt@gmail.com>2012-04-06 11:04:32 -0700
commit6ad5f07c03b8a6763d8c07e86d43fa7be7583d05 (patch)
tree62c2d321f06b7b5be8f7f61ed9186dd03baed466 /classes/TidypicsAlbum.php
parent7a4d1861e23798e2fda7d9d3c750b8d13b55c5a8 (diff)
downloadelgg-6ad5f07c03b8a6763d8c07e86d43fa7be7583d05.tar.gz
elgg-6ad5f07c03b8a6763d8c07e86d43fa7be7583d05.tar.bz2
Fixes invalid SQL when viewing an empty album.
Diffstat (limited to 'classes/TidypicsAlbum.php')
-rw-r--r--classes/TidypicsAlbum.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/classes/TidypicsAlbum.php b/classes/TidypicsAlbum.php
index ad1a357de..1fd98c76b 100644
--- a/classes/TidypicsAlbum.php
+++ b/classes/TidypicsAlbum.php
@@ -206,8 +206,14 @@ class TidypicsAlbum extends ElggObject {
}
$list = unserialize($listString);
+ // if empty don't need to check the permissions.
+ if (!$list) {
+ return array();
+ }
+
// check access levels
$guidsString = implode(',', $list);
+
$options = array(
'wheres' => array("e.guid IN ($guidsString)"),
'order_by' => "FIELD(e.guid, $guidsString)",