allow facebook_enable to work over api when post_by_default is true

This commit is contained in:
friendica 2012-09-17 15:51:59 -07:00
parent cca08179de
commit 2dd4220084
4 changed files with 12 additions and 4 deletions

Binary file not shown.

View File

@ -1242,8 +1242,12 @@ function facebook_post_local(&$a,&$b) {
$fb_enable = (($fb_post && x($_REQUEST,'facebook_enable')) ? intval($_REQUEST['facebook_enable']) : 0);
// if API is used, default to the chosen settings
if($_REQUEST['api_source'] && intval(get_pconfig(local_user(),'facebook','post_by_default')))
$fb_enable = 1;
// but allow a specific override
if($_REQUEST['api_source'] && intval(get_pconfig(local_user(),'facebook','post_by_default'))) {
if(! x($_REQUEST,'facebook_enable'))
$fb_enable = 1;
}
if(! $fb_enable)
return;

Binary file not shown.

View File

@ -703,8 +703,12 @@ function fbpost_post_local(&$a,&$b) {
$fb_enable = (($fb_post && x($_REQUEST,'facebook_enable')) ? intval($_REQUEST['facebook_enable']) : 0);
// if API is used, default to the chosen settings
if($_REQUEST['api_source'] && intval(get_pconfig(local_user(),'facebook','post_by_default')))
$fb_enable = 1;
// but allow a specific override
if($_REQUEST['api_source'] && intval(get_pconfig(local_user(),'facebook','post_by_default'))) {
if(! x($_REQUEST,'facebook_enable'))
$fb_enable = 1;
}
if(! $fb_enable)
return;