]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/util.php
Merge branch 'master' of gitorious.org:statusnet/mainline into testing
[quix0rs-gnu-social.git] / lib / util.php
index fb3b8be8765b3ab7c5a79924170b11ebe049d636..f0f262dc5e032da708d85a84b6ade00ce07db749 100644 (file)
@@ -178,7 +178,6 @@ function common_ensure_session()
        }
        if (isset($id)) {
            session_id($id);
-           setcookie(session_name(), $id);
        }
         @session_start();
         if (!isset($_SESSION['started'])) {
@@ -987,7 +986,7 @@ function common_redirect($url, $code=307)
 
 function common_broadcast_notice($notice, $remote=false)
 {
-    return common_enqueue_notice($notice);
+    // DO NOTHING!
 }
 
 // Stick the notice on the queue
@@ -997,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');
 
@@ -1007,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);