aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorredmatrix <redmatrix@redmatrix.me>2015-07-30 19:50:06 -0700
committerredmatrix <redmatrix@redmatrix.me>2015-07-30 19:50:06 -0700
commit4035c6f1613ea51955778d3b0d440ab63a139544 (patch)
treeaf2d727eafa4091ae8d67017c288f07ef6e84929
parentfd947c205b1c2da8f93e1f8cc82968747355e6f9 (diff)
downloadvolse-hubzilla-4035c6f1613ea51955778d3b0d440ab63a139544.tar.gz
volse-hubzilla-4035c6f1613ea51955778d3b0d440ab63a139544.tar.bz2
volse-hubzilla-4035c6f1613ea51955778d3b0d440ab63a139544.zip
incorrect photo permissions when uploaded via /cloud; issue #21
-rw-r--r--include/photos.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/photos.php b/include/photos.php
index c5ea3971a..dced14705 100644
--- a/include/photos.php
+++ b/include/photos.php
@@ -55,6 +55,17 @@ function photo_upload($channel, $observer, $args) {
$str_group_deny = perms2str(((is_array($args['group_deny'])) ? $args['group_deny'] : explode(',',$args['group_deny'])));
$str_contact_deny = perms2str(((is_array($args['contact_deny'])) ? $args['contact_deny'] : explode(',',$args['contact_deny'])));
+
+ if( (! array_key_exists('group_allow',$args))
+ && (! array_key_exists('contact_allow',$args))
+ && (! array_key_exists('group_deny',$args))
+ && (! array_key_exists('contact_deny',$args))) {
+ $str_group_allow = $channel['channel_allow_gid'];
+ $str_contact_allow = $channel['channel_allow_cid'];
+ $str_group_deny = $channel['channel_deny_gid'];
+ $str_contact_deny = $channel['channel_deny_cid'];
+ }
+
$os_storage = 0;
if($args['os_path'] && $args['getimagesize']) {