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:
		| @@ -83,7 +83,7 @@ class Embedphotos extends \Zotlabs\Web\Controller { | |||||||
| 			return ''; | 			return ''; | ||||||
|  |  | ||||||
| 		if($args['album']) | 		if($args['album']) | ||||||
| 			$album = $args['album']; | 			$album = (($args['album'] === '/') ? '' : $args['album']); | ||||||
| 		if($args['title']) | 		if($args['title']) | ||||||
| 			$title = $args['title']; | 			$title = $args['title']; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -308,6 +308,11 @@ function attach_can_view_folder($uid,$ob_hash,$folder_hash) { | |||||||
| 	$hash = $folder_hash; | 	$hash = $folder_hash; | ||||||
| 	$result = false; | 	$result = false; | ||||||
|  |  | ||||||
|  | 	if(! $folder_hash) { | ||||||
|  | 		return perm_is_allowed($uid,$ob_hash,'view_storage'); | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  |  | ||||||
| 	do { | 	do { | ||||||
| 		$r = q("select folder from attach where hash = '%s' and uid = %d $sql_extra", | 		$r = q("select folder from attach where hash = '%s' and uid = %d $sql_extra", | ||||||
| 			dbesc($hash), | 			dbesc($hash), | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user