aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2011-11-28 20:09:10 -0800
committerfriendica <info@friendica.com>2011-11-28 20:09:10 -0800
commit3afa248238379709cbe2708ee01ae3696760d5c9 (patch)
tree5a1ba3b4ca80b33102eb401635628605a4bcc6dc
parent034038849cfa710f8b65bc5ab0121cc4865b8b28 (diff)
downloadvolse-hubzilla-3afa248238379709cbe2708ee01ae3696760d5c9.tar.gz
volse-hubzilla-3afa248238379709cbe2708ee01ae3696760d5c9.tar.bz2
volse-hubzilla-3afa248238379709cbe2708ee01ae3696760d5c9.zip
use default post permissions when coming from api - unless permissions are explicitly set.
-rw-r--r--mod/item.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/mod/item.php b/mod/item.php
index 145c42cec..98425d70e 100644
--- a/mod/item.php
+++ b/mod/item.php
@@ -139,6 +139,17 @@ function item_post(&$a) {
if(count($r))
$user = $r[0];
+ if(($api_source)
+ && (! array_key_exists('allow_cid',$_REQUEST))
+ && (! array_key_exists('allow_gid',$_REQUEST))
+ && (! array_key_exists('deny_cid',$_REQUEST))
+ && (! array_key_exists('deny_gid',$_REQUEST))) {
+ $str_group_allow = $user['allow_gid'];
+ $str_contact_allow = $user['allow_cid'];
+ $str_group_deny = $user['deny_gid'];
+ $str_contact_deny = $user['deny_cid'];
+ }
+
if($orig_post) {
$str_group_allow = $orig_post['allow_gid'];
$str_contact_allow = $orig_post['allow_cid'];