From d100944fe625d08da53ca69ab7ed6fefb4f653fc Mon Sep 17 00:00:00 2001 From: friendica Date: Wed, 7 Dec 2011 14:04:34 -0800 Subject: api post default to default post permissions was broken --- mod/item.php | 23 ++++++++++++----------- mod/message.php | 15 +++++++++------ 2 files changed, 21 insertions(+), 17 deletions(-) (limited to 'mod') 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; diff --git a/mod/message.php b/mod/message.php index 7a3b870b3..4b494e906 100644 --- a/mod/message.php +++ b/mod/message.php @@ -107,12 +107,15 @@ function message_content(&$a) { ); // remove diaspora conversation pointer - - if($convid) { - q("delete from conv where id = %d limit 1", - intval($convid) - ); - } + // Actually if we do this, we can never receive another reply to that conversation, + // as we will never again have the info we need to re-create it. + // We'll just have to orphan it. + + //if($convid) { + // q("delete from conv where id = %d limit 1", + // intval($convid) + // ); + //} if($r) info( t('Conversation removed.') . EOL ); -- cgit v1.2.3