aboutsummaryrefslogtreecommitdiffstats
path: root/mod/item.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2011-12-07 14:04:34 -0800
committerfriendica <info@friendica.com>2011-12-07 14:04:34 -0800
commitd100944fe625d08da53ca69ab7ed6fefb4f653fc (patch)
tree2c15218ec335281fcb324a476488ccf5c45d0e7a /mod/item.php
parentefeb377a125a0b5bf1c7a6007482d3a43384dec3 (diff)
downloadvolse-hubzilla-d100944fe625d08da53ca69ab7ed6fefb4f653fc.tar.gz
volse-hubzilla-d100944fe625d08da53ca69ab7ed6fefb4f653fc.tar.bz2
volse-hubzilla-d100944fe625d08da53ca69ab7ed6fefb4f653fc.zip
api post default to default post permissions was broken
Diffstat (limited to 'mod/item.php')
-rw-r--r--mod/item.php23
1 files changed, 12 insertions, 11 deletions
diff --git a/mod/item.php b/mod/item.php
index 98425d70e..95a27eb8e 100644
--- a/mod/item.php
+++ b/mod/item.php
@@ -138,17 +138,6 @@ 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'];
@@ -214,6 +203,18 @@ function item_post(&$a) {
}
}
+ 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'];
+ }
+
+
// get contact info for poster
$author = null;