diff options
author | Andrew Manning <tamanning@zoho.com> | 2016-06-07 20:43:49 -0400 |
---|---|---|
committer | Andrew Manning <tamanning@zoho.com> | 2016-06-07 20:43:49 -0400 |
commit | cf180f614207e6cdae44d1e3649a469b8982ade0 (patch) | |
tree | e2ffae5bbc7f12577dce0a0b9a7a638df142dd18 /Zotlabs/Module/Photos.php | |
parent | 2af8105b460d300ba41928734c960f5f70613952 (diff) | |
parent | 67665a8b9d8ff1dbcc26a46837447544d8968784 (diff) | |
download | volse-hubzilla-cf180f614207e6cdae44d1e3649a469b8982ade0.tar.gz volse-hubzilla-cf180f614207e6cdae44d1e3649a469b8982ade0.tar.bz2 volse-hubzilla-cf180f614207e6cdae44d1e3649a469b8982ade0.zip |
Merge remote-tracking branch 'upstream/dev' into wiki
Diffstat (limited to 'Zotlabs/Module/Photos.php')
-rw-r--r-- | Zotlabs/Module/Photos.php | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/Zotlabs/Module/Photos.php b/Zotlabs/Module/Photos.php index ada7b4ef1..1bdc23897 100644 --- a/Zotlabs/Module/Photos.php +++ b/Zotlabs/Module/Photos.php @@ -510,7 +510,7 @@ class Photos extends \Zotlabs\Web\Controller { - function get() { + function get() { // URLs: // photos/name @@ -1277,11 +1277,9 @@ 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 `album` != '%s' + $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']), - dbesc('Contact Photos'), - dbesc( t('Contact Photos')), intval(PHOTO_NORMAL), intval(PHOTO_PROFILE), intval($unsafe) @@ -1291,15 +1289,13 @@ class Photos extends \Zotlabs\Web\Controller { \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 as p - INNER JOIN ( SELECT resource_id, max(imgscale) as imgscale FROM photo + $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 WHERE uid = %d AND photo_usage IN ( %d, %d ) - AND is_nsfw = %d $sql_extra group by resource_id ) as ph + AND is_nsfw = %d $sql_extra group by resource_id ) ph ON (p.resource_id = ph.resource_id and p.imgscale = ph.imgscale) ORDER by p.created DESC LIMIT %d OFFSET %d", intval(\App::$data['channel']['channel_id']), - dbesc('Contact Photos'), - dbesc( t('Contact Photos')), intval(PHOTO_NORMAL), intval(PHOTO_PROFILE), intval($unsafe), |