summaryrefslogtreecommitdiff
path: root/plugins/FacebookSSO/FacebookSSOPlugin.php
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/FacebookSSO/FacebookSSOPlugin.php')
-rw-r--r--plugins/FacebookSSO/FacebookSSOPlugin.php35
1 files changed, 33 insertions, 2 deletions
diff --git a/plugins/FacebookSSO/FacebookSSOPlugin.php b/plugins/FacebookSSO/FacebookSSOPlugin.php
index a726b2fac..a094f2957 100644
--- a/plugins/FacebookSSO/FacebookSSOPlugin.php
+++ b/plugins/FacebookSSO/FacebookSSOPlugin.php
@@ -131,7 +131,7 @@ class FacebookSSOPlugin extends Plugin
include_once $dir . '/actions/' . strtolower(mb_substr($cls, 0, -6)) . '.php';
return false;
case 'Facebookclient':
- case 'Facebookqueuehandler':
+ case 'FacebookQueueHandler':
include_once $dir . '/lib/' . strtolower($cls) . '.php';
return false;
default:
@@ -146,7 +146,7 @@ class FacebookSSOPlugin extends Plugin
function needsScripts($action)
{
static $needy = array(
- //'FacebookloginAction',
+ 'FacebookloginAction',
'FacebookfinishloginAction',
'FacebookadminpanelAction',
'FacebooksettingsAction'
@@ -401,6 +401,37 @@ ENDOFSCRIPT;
return true;
}
+ /**
+ * Add a Facebook queue item for each notice
+ *
+ * @param Notice $notice the notice
+ * @param array &$transports the list of transports (queues)
+ *
+ * @return boolean hook return
+ */
+ function onStartEnqueueNotice($notice, &$transports)
+ {
+ if (self::hasApplication() && $notice->isLocal()) {
+ array_push($transports, 'facebook');
+ }
+ return true;
+ }
+
+ /**
+ * Register Facebook notice queue handler
+ *
+ * @param QueueManager $manager
+ *
+ * @return boolean hook return
+ */
+ function onEndInitializeQueueManager($manager)
+ {
+ if (self::hasApplication()) {
+ $manager->connect('facebook', 'FacebookQueueHandler');
+ }
+ return true;
+ }
+
/*
* Add version info for this plugin
*