summaryrefslogtreecommitdiff
path: root/plugins/GNUsocialPhotos/classes
diff options
context:
space:
mode:
authorSean Corbett <sean@gnu.org>2010-09-05 14:16:46 -0400
committerSean Corbett <sean@gnu.org>2010-09-05 14:16:46 -0400
commit1b601160f423cfd7e195e8c2a4f6fc7a9cab7331 (patch)
treebcc23f0638ddda6ce3c6c197a061aa10f699118a /plugins/GNUsocialPhotos/classes
parent2f06e2904251dbf7e8fe1211eda585c46971b1b5 (diff)
Changes to only display currently viewed profile's pictures.
Diffstat (limited to 'plugins/GNUsocialPhotos/classes')
-rw-r--r--plugins/GNUsocialPhotos/classes/gnusocialphoto.php3
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();