From 76daa03df075bd3350102f0984b24f5ef1ff876a Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Wed, 11 Jan 2017 22:16:02 +0100 Subject: comment out redundant querys --- Zotlabs/Module/Photos.php | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'Zotlabs/Module/Photos.php') diff --git a/Zotlabs/Module/Photos.php b/Zotlabs/Module/Photos.php index e459469ef..d201e631e 100644 --- a/Zotlabs/Module/Photos.php +++ b/Zotlabs/Module/Photos.php @@ -686,6 +686,7 @@ class Photos extends \Zotlabs\Web\Controller { notice( t('Album name could not be decoded') . EOL); logger('mod_photos: illegal album encoding: ' . $datum); $datum = ''; + goaway(z_root() . '/photos/' . \App::$data['channel']['channel_address']); } } @@ -694,7 +695,7 @@ class Photos extends \Zotlabs\Web\Controller { \App::$page['htmlhead'] .= "\r\n" . '' . "\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), @@ -709,6 +710,9 @@ 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'; @@ -1280,9 +1284,9 @@ class Photos extends \Zotlabs\Web\Controller { // Default - show recent photos with upload link (if applicable) //$o = ''; - \App::$page['htmlhead'] .= "\r\n" . '' . "\r\n"; - + \App::$page['htmlhead'] .= "\r\n" . '' . "\r\n"; + /* $r = q("SELECT resource_id, max(imgscale) AS imgscale FROM photo WHERE uid = %d and photo_usage in ( %d, %d ) and is_nsfw = %d $sql_extra GROUP BY resource_id", intval(\App::$data['channel']['channel_id']), @@ -1294,6 +1298,9 @@ class Photos extends \Zotlabs\Web\Controller { \App::set_pager_total(count($r)); \App::set_pager_itemspage(60); } + */ + + \App::set_pager_itemspage(60); $r = q("SELECT p.resource_id, p.id, p.filename, p.mimetype, p.album, p.imgscale, p.created FROM photo p INNER JOIN ( SELECT resource_id, max(imgscale) imgscale FROM photo -- cgit v1.2.3