]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Fixes invalid SQL when viewing an empty album.
authorBrett Profitt <brett.profitt@gmail.com>
Fri, 6 Apr 2012 18:04:32 +0000 (11:04 -0700)
committerBrett Profitt <brett.profitt@gmail.com>
Fri, 6 Apr 2012 18:04:32 +0000 (11:04 -0700)
classes/TidypicsAlbum.php

index ad1a357de97ec4170375990f60545432e8c0ba93..1fd98c76b6bf54276aa5e6fa4436459d4241a24a 100644 (file)
@@ -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)",