mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-19 21:35:13 +00:00
comment out redundant querys
This commit is contained in:
parent
2fc47cc52b
commit
76daa03df0
2 changed files with 11 additions and 4 deletions
|
@ -686,6 +686,7 @@ class Photos extends \Zotlabs\Web\Controller {
|
||||||
notice( t('Album name could not be decoded') . EOL);
|
notice( t('Album name could not be decoded') . EOL);
|
||||||
logger('mod_photos: illegal album encoding: ' . $datum);
|
logger('mod_photos: illegal album encoding: ' . $datum);
|
||||||
$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";
|
\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'
|
$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",
|
AND imgscale <= 4 and photo_usage IN ( %d, %d ) and is_nsfw = %d $sql_extra GROUP BY resource_id",
|
||||||
intval($owner_uid),
|
intval($owner_uid),
|
||||||
|
@ -709,6 +710,9 @@ class Photos extends \Zotlabs\Web\Controller {
|
||||||
} else {
|
} else {
|
||||||
goaway(z_root() . '/photos/' . \App::$data['channel']['channel_address']);
|
goaway(z_root() . '/photos/' . \App::$data['channel']['channel_address']);
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
\App::set_pager_itemspage(60);
|
||||||
|
|
||||||
if($_GET['order'] === 'posted')
|
if($_GET['order'] === 'posted')
|
||||||
$order = 'ASC';
|
$order = 'ASC';
|
||||||
|
@ -1280,9 +1284,9 @@ class Photos extends \Zotlabs\Web\Controller {
|
||||||
// Default - show recent photos with upload link (if applicable)
|
// Default - show recent photos with upload link (if applicable)
|
||||||
//$o = '';
|
//$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
|
$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",
|
and photo_usage in ( %d, %d ) and is_nsfw = %d $sql_extra GROUP BY resource_id",
|
||||||
intval(\App::$data['channel']['channel_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_total(count($r));
|
||||||
\App::set_pager_itemspage(60);
|
\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
|
$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
|
INNER JOIN ( SELECT resource_id, max(imgscale) imgscale FROM photo
|
||||||
|
|
|
@ -124,4 +124,4 @@ input.vcard-fn,
|
||||||
|
|
||||||
.connphone {
|
.connphone {
|
||||||
color: green;
|
color: green;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue