Add IMAP alerts to ajax notify stack.
authorMichael M Slusarz <slusarz@curecanti.org>
Wed, 29 Jul 2009 18:51:23 +0000 (12:51 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Wed, 29 Jul 2009 18:51:23 +0000 (12:51 -0600)
imp/ajax.php

index 3410d47..ad59f76 100644 (file)
@@ -782,5 +782,12 @@ if ($errors) {
                       $errors, __FILE__, __LINE__, PEAR_LOG_DEBUG);
 }
 
+/* Display IMAP alerts. */
+if ($notify) {
+    foreach ($GLOBALS['imp_imap']->ob->alerts() as $alert) {
+        $notification->push($alert, 'horde.warning');
+    }
+}
+
 // Send the final result.
 Horde::sendHTTPResponse(Horde::prepareResponse($result, $notify ? $GLOBALS['imp_notify'] : null), 'json');