diff options
author | Brion Vibber <brion@pobox.com> | 2010-02-01 10:16:19 -0800 |
---|---|---|
committer | Brion Vibber <brion@pobox.com> | 2010-02-01 10:16:19 -0800 |
commit | fba4153346435026976193a7d38e6042b863733d (patch) | |
tree | cd26a85ff06309f1152f3471d149f35a695ef92c /lib | |
parent | 1625a13b93e1490c3f2a3d6f0dcf2bcaaf4a4c51 (diff) |
Don't enqueue into plugin or SMS queues when disabled (breaks unqueuehandler if SMS queue isn't attached)
Diffstat (limited to 'lib')
-rw-r--r-- | lib/util.php | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/util.php b/lib/util.php index dd8189a58..f0f262dc5 100644 --- a/lib/util.php +++ b/lib/util.php @@ -996,9 +996,14 @@ function common_enqueue_notice($notice) static $localTransports = array('omb', 'ping'); - static $allTransports = array('sms', 'plugin'); - - $transports = $allTransports; + $transports = array(); + if (common_config('sms', 'enabled')) { + $transports[] = 'sms'; + } + if (Event::hasHandler('HandleQueuedNotice')) { + $transports[] = 'plugin'; + } + $xmpp = common_config('xmpp', 'enabled'); @@ -1006,6 +1011,7 @@ function common_enqueue_notice($notice) $transports[] = 'jabber'; } + // @fixme move these checks into QueueManager and/or individual handlers if ($notice->is_local == Notice::LOCAL_PUBLIC || $notice->is_local == Notice::LOCAL_NONPUBLIC) { $transports = array_merge($transports, $localTransports); |