aboutsummaryrefslogtreecommitdiffstats
path: root/mod/item.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-05-19 16:42:24 -0700
committerfriendica <info@friendica.com>2012-05-19 16:42:24 -0700
commitdd86f40f9608afe7b58784530bd2cf117397c59b (patch)
treece572c3a7ca5d99b77a428fd162dc3f7633dde87 /mod/item.php
parent513ef2410d9b892c8ebcb7ceac96b97023c3b5a5 (diff)
downloadvolse-hubzilla-dd86f40f9608afe7b58784530bd2cf117397c59b.tar.gz
volse-hubzilla-dd86f40f9608afe7b58784530bd2cf117397c59b.tar.bz2
volse-hubzilla-dd86f40f9608afe7b58784530bd2cf117397c59b.zip
set comment permissions explicitly to parent permissions
Diffstat (limited to 'mod/item.php')
-rw-r--r--mod/item.php19
1 files changed, 14 insertions, 5 deletions
diff --git a/mod/item.php b/mod/item.php
index 639379fe0..9f6b2aef4 100644
--- a/mod/item.php
+++ b/mod/item.php
@@ -218,14 +218,23 @@ function item_post(&$a) {
$private = ((strlen($str_group_allow) || strlen($str_contact_allow) || strlen($str_group_deny) || strlen($str_contact_deny)) ? 1 : 0);
- if(($parent_item) &&
- (($parent_item['private'])
+ // If this is a comment, set the permissions from the parent.
+
+ if($parent_item) {
+ $private = 0;
+
+ if(($parent_item['private'])
|| strlen($parent_item['allow_cid'])
|| strlen($parent_item['allow_gid'])
|| strlen($parent_item['deny_cid'])
- || strlen($parent_item['deny_gid'])
- )) {
- $private = 1;
+ || strlen($parent_item['deny_gid'])) {
+ $private = 1;
+ }
+
+ $str_contact_allow = $parent_item['allow_cid'];
+ $str_group_allow = $parent_item['allow_gid'];
+ $str_contact_deny = $parent_item['deny_cid'];
+ $str_group_deny = $parent_item['deny_gid'];
}
$pubmail_enable = ((x($_REQUEST,'pubmail_enable') && intval($_REQUEST['pubmail_enable']) && (! $private)) ? 1 : 0);