forked from friendica/friendica-addons
allow facebook_enable to work over api when post_by_default is true
This commit is contained in:
parent
cca08179de
commit
2dd4220084
BIN
facebook.tgz
BIN
facebook.tgz
Binary file not shown.
|
@ -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')))
|
||||
// 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;
|
||||
|
|
BIN
fbpost.tgz
BIN
fbpost.tgz
Binary file not shown.
|
@ -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')))
|
||||
// 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;
|
||||
|
|
Loading…
Reference in a new issue