api post default to default post permissions was broken

This commit is contained in:
friendica
2011-12-07 14:04:34 -08:00
parent efeb377a12
commit d100944fe6
3 changed files with 21 additions and 17 deletions

View File

@@ -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;