From: friendica Date: Mon, 17 Sep 2012 22:51:59 +0000 (-0700) Subject: allow facebook_enable to work over api when post_by_default is true X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=2dd422008414f72a8daf8554f9965efd0484609b;p=friendica-addons.git allow facebook_enable to work over api when post_by_default is true --- diff --git a/facebook.tgz b/facebook.tgz index ff920dc6..e41ee188 100644 Binary files a/facebook.tgz and b/facebook.tgz differ diff --git a/facebook/facebook.php b/facebook/facebook.php index 6786febb..f977bef9 100644 --- a/facebook/facebook.php +++ b/facebook/facebook.php @@ -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; diff --git a/fbpost.tgz b/fbpost.tgz index 35dee2d5..d69baff8 100644 Binary files a/fbpost.tgz and b/fbpost.tgz differ diff --git a/fbpost/fbpost.php b/fbpost/fbpost.php index effa61ea..1116971d 100644 --- a/fbpost/fbpost.php +++ b/fbpost/fbpost.php @@ -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;