diff options
author | mrjive <mrjive@mrjive.it> | 2015-09-21 15:41:17 +0200 |
---|---|---|
committer | mrjive <mrjive@mrjive.it> | 2015-09-21 15:41:17 +0200 |
commit | 49d11ed9f88531bcd03f2f129230b0352014c22c (patch) | |
tree | 1f21f01874913a3f5f1f86bdc857dccc143f6a3b /include/attach.php | |
parent | 024af91df82b4bb14983c53ae319ba9d348773d6 (diff) | |
parent | d2565d0f61c139df6536ec9d90c10d7af29ef9e5 (diff) | |
download | volse-hubzilla-49d11ed9f88531bcd03f2f129230b0352014c22c.tar.gz volse-hubzilla-49d11ed9f88531bcd03f2f129230b0352014c22c.tar.bz2 volse-hubzilla-49d11ed9f88531bcd03f2f129230b0352014c22c.zip |
Merge pull request #2 from redmatrix/master
get fresh code from HZ base
Diffstat (limited to 'include/attach.php')
-rw-r--r-- | include/attach.php | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/include/attach.php b/include/attach.php index 513486bfc..39fdb5c3a 100644 --- a/include/attach.php +++ b/include/attach.php @@ -1132,7 +1132,7 @@ function attach_mkdirp($channel, $observer_hash, $arr = null) { */ function attach_change_permissions($channel_id, $resource, $allow_cid, $allow_gid, $deny_cid, $deny_gid, $recurse = false) { - $r = q("select hash, flags, is_dir from attach where hash = '%s' and uid = %d limit 1", + $r = q("select hash, flags, is_dir, is_photo from attach where hash = '%s' and uid = %d limit 1", dbesc($resource), intval($channel_id) ); @@ -1162,6 +1162,16 @@ function attach_change_permissions($channel_id, $resource, $allow_cid, $allow_gi dbesc($resource), intval($channel_id) ); + if($r[0]['is_photo']) { + $x = q("update photo set allow_cid = '%s', allow_gid = '%s', deny_cid = '%s', deny_gid = '%s' where resource_id = '%s' and uid = %d", + dbesc($allow_cid), + dbesc($allow_gid), + dbesc($deny_cid), + dbesc($deny_gid), + dbesc($resource), + intval($channel_id) + ); + } } /** |