From 83a78a949d67dbbe3294f7f02ffeb45b6f96423d Mon Sep 17 00:00:00 2001 From: zotlabs Date: Tue, 21 Mar 2017 21:13:14 -0700 Subject: photos_album_exists() requires an observer to work correctly; provide it. --- include/photos.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include/photos.php') 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), -- cgit v1.2.3