diff options
Diffstat (limited to 'plugins/GNUsocialPhotos/classes')
-rw-r--r-- | plugins/GNUsocialPhotos/classes/gnusocialphoto.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/GNUsocialPhotos/classes/gnusocialphoto.php b/plugins/GNUsocialPhotos/classes/gnusocialphoto.php index 1b5a54587..1314ba87e 100644 --- a/plugins/GNUsocialPhotos/classes/gnusocialphoto.php +++ b/plugins/GNUsocialPhotos/classes/gnusocialphoto.php @@ -116,7 +116,8 @@ class GNUsocialPhoto extends Memcached_DataObject static function getGalleryPage($page_id, $album_id, $gallery_size) { $page_offset = ($page_id-1) * $gallery_size; - $sql = 'SELECT * FROM GNUsocialPhoto order by notice_id limit ' . $page_offset . ',' . $gallery_size; + $sql = 'SELECT * FROM GNUsocialPhoto WHERE album_id = ' . $album_id . + ' ORDER BY notice_id LIMIT ' . $page_offset . ',' . $gallery_size; $photo = new GNUsocialPhoto(); $photo->query($sql); $photos = array(); |