aboutsummaryrefslogtreecommitdiffstats
path: root/addon
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-06-05 02:09:31 -0700
committerFriendika <info@friendika.com>2011-06-05 02:09:31 -0700
commit182582eed8672b0c75aae747413be2cc6ce0709f (patch)
tree9d7b1682dd32a4ba3a5ac0a22692fe6b0df9fae6 /addon
parentdbaf3eca070537f16298015a870b209c3581e388 (diff)
downloadvolse-hubzilla-182582eed8672b0c75aae747413be2cc6ce0709f.tar.gz
volse-hubzilla-182582eed8672b0c75aae747413be2cc6ce0709f.tar.bz2
volse-hubzilla-182582eed8672b0c75aae747413be2cc6ce0709f.zip
load hooks inside queue
Diffstat (limited to 'addon')
-rw-r--r--addon/facebook/facebook.php16
1 files changed, 12 insertions, 4 deletions
diff --git a/addon/facebook/facebook.php b/addon/facebook/facebook.php
index ae69805fa..657ba7dc2 100644
--- a/addon/facebook/facebook.php
+++ b/addon/facebook/facebook.php
@@ -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) {
+
+ 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 {