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

@ -9,7 +9,7 @@ require_once('include/nav.php');
require_once('include/cache.php'); require_once('include/cache.php');
define ( 'FRIENDICA_PLATFORM', 'Friendica'); define ( 'FRIENDICA_PLATFORM', 'Friendica');
define ( 'FRIENDICA_VERSION', '2.3.1187' ); define ( 'FRIENDICA_VERSION', '2.3.1188' );
define ( 'DFRN_PROTOCOL_VERSION', '2.22' ); define ( 'DFRN_PROTOCOL_VERSION', '2.22' );
define ( 'DB_UPDATE_VERSION', 1111 ); define ( 'DB_UPDATE_VERSION', 1111 );

View file

@ -139,17 +139,6 @@ function item_post(&$a) {
if(count($r)) if(count($r))
$user = $r[0]; $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) { if($orig_post) {
$str_group_allow = $orig_post['allow_gid']; $str_group_allow = $orig_post['allow_gid'];
$str_contact_allow = $orig_post['allow_cid']; $str_contact_allow = $orig_post['allow_cid'];
@ -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 // get contact info for poster
$author = null; $author = null;

View file

@ -107,12 +107,15 @@ function message_content(&$a) {
); );
// remove diaspora conversation pointer // remove diaspora conversation pointer
// 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) { //if($convid) {
q("delete from conv where id = %d limit 1", // q("delete from conv where id = %d limit 1",
intval($convid) // intval($convid)
); // );
} //}
if($r) if($r)
info( t('Conversation removed.') . EOL ); info( t('Conversation removed.') . EOL );