]> git.mxchange.org Git - friendica-addons.git/commitdiff
allow facebook_enable to work over api when post_by_default is true
authorfriendica <info@friendica.com>
Mon, 17 Sep 2012 22:51:59 +0000 (15:51 -0700)
committerfriendica <info@friendica.com>
Mon, 17 Sep 2012 22:51:59 +0000 (15:51 -0700)
facebook.tgz
facebook/facebook.php
fbpost.tgz
fbpost/fbpost.php

index ff920dc60c6a7e0280d0b6972a2d94ce1abd2c88..e41ee188470b37de09bfbce1f2d7c19241989d86 100644 (file)
Binary files a/facebook.tgz and b/facebook.tgz differ
index 6786febbb553e876f155a7020b90999f66960fb5..f977bef90192f469097bc26d3cb729aab93447f9 100644 (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;
index 35dee2d521ff2b2e29c85b3694b1615fd330efbe..d69baff8999ce5bcaa107c4ba7d6126eeda89c96 100644 (file)
Binary files a/fbpost.tgz and b/fbpost.tgz differ
index effa61ea148c9777d620350201b29f5d448a76a4..1116971d1680c0addb8d957f0299ba8ff7b50e1e 100644 (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;