hubzilla #475 continued - show photos in root folder. Part of Andrew's fix for this wasn't in my repository and hopefully won't conflict; as it appears to have been lost somewhere. It also needed a small change to the folder permissions check.
This commit is contained in:
parent
a984cd2b27
commit
494ce9b872
@ -83,7 +83,7 @@ class Embedphotos extends \Zotlabs\Web\Controller {
|
||||
return '';
|
||||
|
||||
if($args['album'])
|
||||
$album = $args['album'];
|
||||
$album = (($args['album'] === '/') ? '' : $args['album']);
|
||||
if($args['title'])
|
||||
$title = $args['title'];
|
||||
|
||||
|
@ -308,6 +308,11 @@ function attach_can_view_folder($uid,$ob_hash,$folder_hash) {
|
||||
$hash = $folder_hash;
|
||||
$result = false;
|
||||
|
||||
if(! $folder_hash) {
|
||||
return perm_is_allowed($uid,$ob_hash,'view_storage');
|
||||
}
|
||||
|
||||
|
||||
do {
|
||||
$r = q("select folder from attach where hash = '%s' and uid = %d $sql_extra",
|
||||
dbesc($hash),
|
||||
|
Reference in New Issue
Block a user