photos_album_exists() requires an observer to work correctly; provide it.

This commit is contained in:
zotlabs
2017-03-21 21:13:14 -07:00
committed by Mario Vavti
parent e49c59959b
commit 032b6f193d
2 changed files with 4 additions and 5 deletions

View File

@@ -582,9 +582,8 @@ function photos_list_photos($channel, $observer, $album = '') {
* @param string $album name of the album
* @return boolean
*/
function photos_album_exists($channel_id, $album) {
$sql_extra = permissions_sql($channel_id);
function photos_album_exists($channel_id, $observer_hash, $album) {
$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),