aboutsummaryrefslogtreecommitdiffstats
path: root/include/attach.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/attach.php')
-rw-r--r--include/attach.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/attach.php b/include/attach.php
index 88b6fa8e7..e94454905 100644
--- a/include/attach.php
+++ b/include/attach.php
@@ -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),