aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2016-08-10 16:17:09 +0200
committerMario Vavti <mario@mariovavti.com>2016-08-10 16:17:09 +0200
commit82e867a9a8008c4fb3e7ed9e9408bd9e38bf7ff2 (patch)
treeb492301bfecb46f6be20618f4e801387928ef0eb /include
parent7a557d31e026705fc3bd2d4f39c4c679449cef56 (diff)
downloadvolse-hubzilla-82e867a9a8008c4fb3e7ed9e9408bd9e38bf7ff2.tar.gz
volse-hubzilla-82e867a9a8008c4fb3e7ed9e9408bd9e38bf7ff2.tar.bz2
volse-hubzilla-82e867a9a8008c4fb3e7ed9e9408bd9e38bf7ff2.zip
implement acl for folder creation
Diffstat (limited to 'include')
-rw-r--r--include/attach.php16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/attach.php b/include/attach.php
index e15f08bd4..172840b96 100644
--- a/include/attach.php
+++ b/include/attach.php
@@ -1438,6 +1438,22 @@ logger('attach_hash: ' . $attachHash);
return $hash;
}
+function find_folder_hash_by_path($channel_id, $path) {
+
+ $filename = end(explode('/', $path));
+
+ $r = q("SELECT hash FROM attach WHERE uid = %d AND filename = '%s' LIMIT 1",
+ intval($channel_id),
+ dbesc($filename)
+ );
+
+ $hash = '';
+ if($r && $r[0]['hash']) {
+ $hash = $r[0]['hash'];
+ }
+ return $hash;
+}
+
/**
* @brief Returns the filename of an attachment in a given channel.
*