diff options
author | Mario Vavti <mario@mariovavti.com> | 2017-01-12 12:32:31 +0100 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2017-01-12 12:32:31 +0100 |
commit | 88ac326caffb25fb24271b60e2b6beadc2458a1c (patch) | |
tree | 1c9c76c6024b1b5af0353004727b2b629499759f /Zotlabs | |
parent | bdd420a08e82ac74ccb3b879bcf79c20033fb723 (diff) | |
download | volse-hubzilla-88ac326caffb25fb24271b60e2b6beadc2458a1c.tar.gz volse-hubzilla-88ac326caffb25fb24271b60e2b6beadc2458a1c.tar.bz2 volse-hubzilla-88ac326caffb25fb24271b60e2b6beadc2458a1c.zip |
we should actually check for existance of a given album at this place. this query can probably be more simple though
Diffstat (limited to 'Zotlabs')
-rw-r--r-- | Zotlabs/Module/Photos.php | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/Zotlabs/Module/Photos.php b/Zotlabs/Module/Photos.php index d201e631e..c0fce1007 100644 --- a/Zotlabs/Module/Photos.php +++ b/Zotlabs/Module/Photos.php @@ -695,7 +695,6 @@ class Photos extends \Zotlabs\Web\Controller { \App::$page['htmlhead'] .= "\r\n" . '<link rel="alternate" type="application/json+oembed" href="' . z_root() . '/oep?f=&url=' . urlencode(z_root() . '/' . \App::$cmd) . '" title="oembed" />' . "\r\n"; - /* $r = q("SELECT resource_id, max(imgscale) AS imgscale FROM photo WHERE uid = %d AND album = '%s' AND imgscale <= 4 and photo_usage IN ( %d, %d ) and is_nsfw = %d $sql_extra GROUP BY resource_id", intval($owner_uid), @@ -710,16 +709,12 @@ class Photos extends \Zotlabs\Web\Controller { } else { goaway(z_root() . '/photos/' . \App::$data['channel']['channel_address']); } - */ - \App::set_pager_itemspage(60); - if($_GET['order'] === 'posted') $order = 'ASC'; else $order = 'DESC'; - - + $r = q("SELECT p.resource_id, p.id, p.filename, p.mimetype, p.imgscale, p.description, p.created FROM photo p INNER JOIN (SELECT resource_id, max(imgscale) imgscale FROM photo WHERE uid = %d AND album = '%s' AND imgscale <= 4 AND photo_usage IN ( %d, %d ) and is_nsfw = %d $sql_extra GROUP BY resource_id) ph ON (p.resource_id = ph.resource_id AND p.imgscale = ph.imgscale) |