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:
zotlabs 2017-12-12 14:16:34 -08:00
parent a984cd2b27
commit 494ce9b872
2 changed files with 6 additions and 1 deletions

View File

@ -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'];

View File

@ -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),