aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-01-13 13:23:21 -0800
committerzotlabs <mike@macgirvin.com>2017-01-13 13:23:21 -0800
commite843d27f8c4cd3ecabc3598a92db0c814f4d0ed7 (patch)
tree7167338b5bf32a471b6c48a9df9e9eb9f1e5c7a8 /Zotlabs
parent4f1e4ffa70f5a822367eafec914ff8853561210d (diff)
parent8ea0b2051a2f037ee67571c01b816b3a286fb5ee (diff)
downloadvolse-hubzilla-e843d27f8c4cd3ecabc3598a92db0c814f4d0ed7.tar.gz
volse-hubzilla-e843d27f8c4cd3ecabc3598a92db0c814f4d0ed7.tar.bz2
volse-hubzilla-e843d27f8c4cd3ecabc3598a92db0c814f4d0ed7.zip
Merge branch 'dev' of https://github.com/redmatrix/hubzilla into dev_merge
Diffstat (limited to 'Zotlabs')
-rw-r--r--Zotlabs/Module/Photos.php15
1 files changed, 6 insertions, 9 deletions
diff --git a/Zotlabs/Module/Photos.php b/Zotlabs/Module/Photos.php
index c0fce1007..ef1eee399 100644
--- a/Zotlabs/Module/Photos.php
+++ b/Zotlabs/Module/Photos.php
@@ -691,20 +691,17 @@ class Photos extends \Zotlabs\Web\Controller {
}
$album = (($datum) ? hex2bin($datum) : '');
-
-
+
\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",
+
+ //check if the album exists and if we have perms
+ $r = q("SELECT album FROM photo WHERE uid = %d AND album = '%s' and is_nsfw = %d $sql_extra LIMIT 1",
intval($owner_uid),
dbesc($album),
- intval(PHOTO_NORMAL),
- intval(PHOTO_PROFILE),
intval($unsafe)
);
- if(count($r)) {
- \App::set_pager_total(count($r));
+
+ if($r) {
\App::set_pager_itemspage(60);
} else {
goaway(z_root() . '/photos/' . \App::$data['channel']['channel_address']);