[prev in list] [next in list] [prev in thread] [next in thread] 

List:       squirrelmail-cvs
Subject:    [SM-CVS] SF.net SVN: squirrelmail:[14303] branches/SM-1_4-STABLE/squirrelmail/ functions/imap_genera
From:       pdontthink () users ! sourceforge ! net
Date:       2012-04-01 19:51:59
Message-ID: E1SEQoh-0005DF-2e () sfp-svn-1 ! v30 ! ch3 ! sourceforge ! com
[Download RAW message or body]

Revision: 14303
          http://squirrelmail.svn.sourceforge.net/squirrelmail/?rev=14303&view=rev
Author:   pdontthink
Date:     2012-04-01 19:51:58 +0000 (Sun, 01 Apr 2012)
Log Message:
-----------
Fall back to using LIST if NAMESPACE answer is malformed or otherwise problematic.  \
This still doesn't account for situations where the NAMESPACE or LIST answer can't be \
parsed correctly.

Modified Paths:
--------------
    branches/SM-1_4-STABLE/squirrelmail/functions/imap_general.php

Modified: branches/SM-1_4-STABLE/squirrelmail/functions/imap_general.php
===================================================================
--- branches/SM-1_4-STABLE/squirrelmail/functions/imap_general.php	2012-04-01 \
                19:50:49 UTC (rev 14302)
+++ branches/SM-1_4-STABLE/squirrelmail/functions/imap_general.php	2012-04-01 \
19:51:58 UTC (rev 14303) @@ -753,7 +753,7 @@
 
     /* Do some caching here */
     if (!$sqimap_delimiter) {
-        if (sqimap_capability($imap_stream, 'NAMESPACE')) {
+        if (sqimap_capability($imap_stream, 'NAMESPACE')
             /*
              * According to something that I can't find, this is supposed to work on \
                all systems
              * OS: This won't work in Courier IMAP.
@@ -761,23 +761,21 @@
              * OS: * NAMESPACE (PERSONAL NAMESPACES) (OTHER_USERS NAMESPACE) (SHARED \
                NAMESPACES)
              * OS: We want to lookup all personal NAMESPACES...
              */
-            $read = sqimap_run_command($imap_stream, 'NAMESPACE', true, $a, $b);
-            if (preg_match('/\* NAMESPACE +(\( *\(.+\) *\)|NIL) +(\( *\(.+\) \
                *\)|NIL) +(\( *\(.+\) *\)|NIL)/i', $read[0], $data)) {
-                if (preg_match('/^\( *\((.*)\) *\)/', $data[1], $data2)) {
-                    $pn = $data2[1];
-                    $pna = explode(')(', $pn);
-                    $delnew = array();
-                    while (list($k, $v) = each($pna)) {
-                        $lst = explode('"', $v);
-                        if (isset($lst[3])) {
-                            $delnew[$lst[1]] = $lst[3];
-                        } else {
-                            $delnew[$lst[1]] = '';
-                        }
-                    }
-                    $sqimap_delimiter = array_shift($delnew);
+         && ($read = sqimap_run_command($imap_stream, 'NAMESPACE', true, $a, $b))
+         && preg_match('/\* NAMESPACE +(\( *\(.+\) *\)|NIL) +(\( *\(.+\) *\)|NIL) \
+(\( *\(.+\) *\)|NIL)/i', $read[0], $data) +         && preg_match('/^\( *\((.*)\) \
*\)/', $data[1], $data2)) { +            $pn = $data2[1];
+            $pna = explode(')(', $pn);
+            $delnew = array();
+            while (list($k, $v) = each($pna)) {
+                $lst = explode('"', $v);
+                if (isset($lst[3])) {
+                    $delnew[$lst[1]] = $lst[3];
+                } else {
+                    $delnew[$lst[1]] = '';
                 }
             }
+            $sqimap_delimiter = array_shift($delnew);
         } else {
             fputs ($imap_stream, ". LIST \"INBOX\" \"\"\r\n");
             $read = sqimap_read_data($imap_stream, '.', true, $a, $b);

This was sent by the SourceForge.net collaborative development platform, the world's \
largest Open Source development site.


------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
-----
squirrelmail-cvs mailing list
List address: squirrelmail-cvs@lists.sourceforge.net
List info (subscribe/unsubscribe/change options): \
                https://lists.sourceforge.net/lists/listinfo/squirrelmail-cvs
Repository: http://squirrelmail.org/svn


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic