[Svn] r4634 - in trunk/roundcubemail: . program/include

trac at roundcube.net trac at roundcube.net
Fri Apr 8 08:27:28 CEST 2011


Author: alec
Date: 2011-04-08 01:27:28 -0500 (Fri, 08 Apr 2011)
New Revision: 4634

Modified:
   trunk/roundcubemail/CHANGELOG
   trunk/roundcubemail/program/include/rcube_imap_generic.php
Log:
- Added workaround for some IMAP server with broken STATUS response (#1487859)


Modified: trunk/roundcubemail/CHANGELOG
===================================================================
--- trunk/roundcubemail/CHANGELOG	2011-04-08 06:18:11 UTC (rev 4633)
+++ trunk/roundcubemail/CHANGELOG	2011-04-08 06:27:28 UTC (rev 4634)
@@ -1,6 +1,7 @@
 CHANGELOG Roundcube Webmail
 ===========================
 
+- Added workaround for some IMAP server with broken STATUS response (#1487859)
 - Fix bug where default_charset was not used for text messages (#1487836)
 - Enable TinyMCE's contextmenu (#1487014)
 - TinyMCE 3.4.1

Modified: trunk/roundcubemail/program/include/rcube_imap_generic.php
===================================================================
--- trunk/roundcubemail/program/include/rcube_imap_generic.php	2011-04-08 06:18:11 UTC (rev 4633)
+++ trunk/roundcubemail/program/include/rcube_imap_generic.php	2011-04-08 06:27:28 UTC (rev 4634)
@@ -953,6 +953,16 @@
 
             list($mbox, $items) = $this->tokenizeResponse($response, 2);
 
+            // Fix for #1487859. Some buggy server returns not quoted
+            // folder name with spaces. Let's try to handle this situation
+            if (!is_array($items) && ($pos = strpos($response, '(')) !== false) {
+                $response = substr($response, $pos);
+                $items = $this->tokenizeResponse($response, 1);
+                if (!is_array($items)) {
+                    return $result;
+                }
+            }
+
             for ($i=0, $len=count($items); $i<$len; $i += 2) {
                 $result[$items[$i]] = (int) $items[$i+1];
             }

_______________________________________________
http://lists.roundcube.net/mailman/listinfo/svn



More information about the Svn mailing list