implement acl for folder creation

This commit is contained in:
Mario Vavti
2016-08-10 16:17:09 +02:00
parent 7a557d31e0
commit 82e867a9a8
4 changed files with 53 additions and 17 deletions

View File

@@ -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.
*