diff options
author | zotlabs <mike@macgirvin.com> | 2017-03-21 21:13:14 -0700 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2017-03-21 21:13:14 -0700 |
commit | 83a78a949d67dbbe3294f7f02ffeb45b6f96423d (patch) | |
tree | 21ad335485f62985a350cbf926a0015f3569e40e | |
parent | a7bf4366cee5dcdabe3eb6dbcb144727d2158775 (diff) | |
download | volse-hubzilla-83a78a949d67dbbe3294f7f02ffeb45b6f96423d.tar.gz volse-hubzilla-83a78a949d67dbbe3294f7f02ffeb45b6f96423d.tar.bz2 volse-hubzilla-83a78a949d67dbbe3294f7f02ffeb45b6f96423d.zip |
photos_album_exists() requires an observer to work correctly; provide it.
-rw-r--r-- | Zotlabs/Module/Photos.php | 4 | ||||
-rw-r--r-- | include/photos.php | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/Zotlabs/Module/Photos.php b/Zotlabs/Module/Photos.php index 598f1782d..cf622d657 100644 --- a/Zotlabs/Module/Photos.php +++ b/Zotlabs/Module/Photos.php @@ -95,7 +95,7 @@ class Photos extends \Zotlabs\Web\Controller { $album = argv(3); - if(! photos_album_exists($page_owner_uid,$album)) { + if(! photos_album_exists($page_owner_uid, get_observer_hash(), $album)) { notice( t('Album not found.') . EOL); goaway(z_root() . '/' . $_SESSION['photo_return']); } @@ -681,7 +681,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"; - if($x = photos_album_exists($owner_uid,$datum)) { + if($x = photos_album_exists($owner_uid, get_observer_hash(), $datum)) { \App::set_pager_itemspage(60); $album = $x['display_path']; } diff --git a/include/photos.php b/include/photos.php index e68290c9d..69b31de9f 100644 --- a/include/photos.php +++ b/include/photos.php @@ -581,9 +581,9 @@ function photos_list_photos($channel, $observer, $album = '') { * @return boolean */ -function photos_album_exists($channel_id, $album) { +function photos_album_exists($channel_id, $observer_hash, $album) { - $sql_extra = permissions_sql($channel_id); + $sql_extra = permissions_sql($channel_id,$observer_hash); $r = q("SELECT folder, hash, is_dir, filename, os_path, display_path FROM attach WHERE hash = '%s' AND is_dir = 1 AND uid = %d $sql_extra limit 1", dbesc($album), |