aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Photos.php
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2017-01-11 22:16:02 +0100
committerMario Vavti <mario@mariovavti.com>2017-01-11 22:16:02 +0100
commit76daa03df075bd3350102f0984b24f5ef1ff876a (patch)
treea72bcaf838b8b359aee5cc187a33bedd14fdf4b0 /Zotlabs/Module/Photos.php
parent2fc47cc52b556153a17b5712e695175f87e6c1dd (diff)
downloadvolse-hubzilla-76daa03df075bd3350102f0984b24f5ef1ff876a.tar.gz
volse-hubzilla-76daa03df075bd3350102f0984b24f5ef1ff876a.tar.bz2
volse-hubzilla-76daa03df075bd3350102f0984b24f5ef1ff876a.zip
comment out redundant querys
Diffstat (limited to 'Zotlabs/Module/Photos.php')
-rw-r--r--Zotlabs/Module/Photos.php13
1 files changed, 10 insertions, 3 deletions
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" . '<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),
@@ -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" . '<link rel="alternate" type="application/json+oembed" href="' . z_root() . '/oep?f=&url=' . urlencode(z_root() . '/' . \App::$cmd) . '" title="oembed" />' . "\r\n";
-
+ \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 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