mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2024-11-22 11:43:42 +00:00
allow facebook_enable to work over api when post_by_default is true
This commit is contained in:
parent
cca08179de
commit
2dd4220084
4 changed files with 12 additions and 4 deletions
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')))
|
||||
$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;
|
||||
|
|
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')))
|
||||
$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;
|
||||
|
|
Loading…
Reference in a new issue