diff options
Diffstat (limited to 'lib/util.php')
-rw-r--r-- | lib/util.php | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/lib/util.php b/lib/util.php index e1dd238ba..f862d7fcc 100644 --- a/lib/util.php +++ b/lib/util.php @@ -879,7 +879,23 @@ function common_broadcast_notice($notice, $remote=false) function common_enqueue_notice($notice) { - foreach (array('jabber', 'omb', 'sms', 'public', 'twitter', 'facebook', 'ping') as $transport) { + $transports = array('omb', 'sms', 'twitter', 'facebook', 'ping'); + + if (common_config('xmpp', 'enabled')) { + $transports = array_merge($transports, array('jabber', 'public')); + } + + if (common_config('memcached', 'enabled')) { + // Note: limited to 8 chars + $transports[] = 'memcache'; + } + + if (common_config('inboxes', 'enabled') === true || + common_config('inboxes', 'enabled') === 'transitional') { + $transports[] = 'inbox'; + } + + foreach ($transports as $transport) { $qi = new Queue_item(); $qi->notice_id = $notice->id; $qi->transport = $transport; @@ -1332,7 +1348,7 @@ function common_compatible_license($from, $to) */ function common_database_tablename($tablename) { - + if(common_config('db','quote_identifiers')) { $tablename = '"'. $tablename .'"'; } |