diff --git a/addon/facebook/facebook.php b/addon/facebook/facebook.php
index ac522aab63..657ba7dc23 100644
--- a/addon/facebook/facebook.php
+++ b/addon/facebook/facebook.php
@@ -640,7 +640,7 @@ function facebook_post_hook(&$a,&$b) {
if(! $likes) {
$s = serialize(array('url' => $url, 'item' => $b['id'], 'post' => $postvars));
q("INSERT INTO `queue` ( `network`, `cid`, `created`, `last`, `content`)
- VALUES ( '%s', '%s', '%s', '%s') ",
+ VALUES ( '%s', %d, '%s', '%s', '%s') ",
dbesc(NETWORK_FACEBOOK),
intval($a->contact),
dbesc(datetime_convert()),
@@ -662,12 +662,20 @@ function facebook_post_hook(&$a,&$b) {
function fb_queue_hook(&$a,&$b) {
- require_once('include/queue_fn.php');
- if((! is_array($b)) || (! count($b)))
+ $qi = q("SELECT * FROM `queue` WHERE `network` = '%s'",
+ dbesc(NETWORK_FACEBOOK)
+ );
+ if(! count($qi))
return;
- foreach($b as $x) {
- if($b['network'] !== NETWORK_FACEBOOK)
+
+ require_once('include/queue_fn.php');
+
+ foreach($qi as $x) {
+ if($x['network'] !== NETWORK_FACEBOOK)
continue;
+
+ logger('facebook_queue: run');
+
$r = q("SELECT `user`.* FROM `user` LEFT JOIN `contact` on `contact`.`uid` = `user`.`uid`
WHERE `contact`.`self` = 1 AND `contact`.`id` = %d LIMIT 1",
intval($x['cid'])
@@ -698,7 +706,7 @@ function fb_queue_hook(&$a,&$b) {
dbesc('fb::' . $retj->id),
intval($item)
);
- logger('facebook queue: success: ' . $j);
+ logger('facebook_queue: success: ' . $j);
remove_queue_item($x['id']);
}
else {
diff --git a/boot.php b/boot.php
index 3ca0839011..12689b4ab0 100644
--- a/boot.php
+++ b/boot.php
@@ -4,9 +4,9 @@ set_time_limit(0);
ini_set('pcre.backtrack_limit', 250000);
-define ( 'FRIENDIKA_VERSION', '2.2.1001' );
+define ( 'FRIENDIKA_VERSION', '2.2.1003' );
define ( 'DFRN_PROTOCOL_VERSION', '2.21' );
-define ( 'DB_UPDATE_VERSION', 1060 );
+define ( 'DB_UPDATE_VERSION', 1061 );
define ( 'EOL', "
\r\n" );
define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' );
@@ -527,8 +527,20 @@ function check_config(&$a) {
$plugins = get_config('system','addon');
$plugins_arr = array();
- if($plugins)
+ if($plugins) {
$plugins_arr = explode(',',str_replace(' ', '',$plugins));
+ if(get_config('system','strict_privacy')) {
+ unset($a->config['system']['huburl']);
+ for($x = 0; $x < count($plugins_arr); $x ++) {
+ if( $plugins_arr[$x] === 'facebook'
+ || $plugins_arr[$x] === 'twitter'
+ || $plugins_arr[$x] === 'statusnet') {
+ unset($plugins_arr[$x]);
+ }
+ }
+ }
+ }
+
$a->plugins = $plugins_arr;
@@ -2766,12 +2778,14 @@ function unamp($s) {
if(! function_exists('lang_selector')) {
function lang_selector() {
global $lang;
+ $o .= '