Put multiple capability options in an array.
authoravel <avel@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Tue, 29 Nov 2005 11:32:24 +0000 (11:32 +0000)
committeravel <avel@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Tue, 29 Nov 2005 11:32:24 +0000 (11:32 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@10421 7612ce4b-ef26-0410-bec9-ea0150e637f0

functions/imap_general.php

index ce8720f..0224ce6 100755 (executable)
@@ -873,11 +873,9 @@ function sqimap_capability($imap_stream, $capability='') {
         for ($i=2; $i < count($c); $i++) {
             $cap_list = explode('=', $c[$i]);
             if (isset($cap_list[1])) {
-                // FIX ME. capabilities can occure multiple times.
-                // THREAD=REFERENCES THREAD=ORDEREDSUBJECT
-                $sqimap_capabilities[$cap_list[0]] = $cap_list[1];
+                $sqimap_capabilities[trim($cap_list[0])][] = $cap_list[1];
             } else {
-                $sqimap_capabilities[$cap_list[0]] = TRUE;
+                $sqimap_capabilities[trim($cap_list[0])] = TRUE;
             }
         }
     }
@@ -1167,4 +1165,4 @@ function map_yp_alias($username) {
    return chop(substr($yp, strlen($username)+1));
 }
 
-?>
\ No newline at end of file
+?>