Changeset 5425 in subversion
- Timestamp:
- Nov 15, 2011 4:22:13 AM (19 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/roundcubemail/program/include/rcube_imap.php
r5424 r5425 3178 3178 if (is_array($ns)) { 3179 3179 foreach ($ns as $ns_data) { 3180 if ( $len =strlen($ns_data[0])) {3181 $search = array('len' => $len, 'prefix' => $ns_data[0]);3180 if (strlen($ns_data[0])) { 3181 $search = $ns_data[0]; 3182 3182 } 3183 3183 } … … 3187 3187 if (!empty($search)) { 3188 3188 // go through all folders detecting namespace usage 3189 foreach ($ list as $folder) {3190 foreach ($search as $idx => $ s) {3191 if ( $s['prefix'] == substr($folder, 0, $s['len'])) {3189 foreach ($result as $folder) { 3190 foreach ($search as $idx => $prefix) { 3191 if (strpos($folder, $prefix) === 0) { 3192 3192 unset($search[$idx]); 3193 3193 } … … 3199 3199 3200 3200 // get folders in hidden namespaces and add to the result 3201 foreach ($search as $ s) {3202 $list = $this->conn->listMailboxes($ s['prefix'], $name);3201 foreach ($search as $prefix) { 3202 $list = $this->conn->listMailboxes($prefix, $name); 3203 3203 3204 3204 if (!empty($list)) { … … 3485 3485 if (is_array($namespace)) { 3486 3486 foreach ($namespace as $ns) { 3487 if ( strlen($ns[0])) {3488 if (( strlen($ns[0])>1 && $mailbox == substr($ns[0], 0, -1))3487 if ($len = strlen($ns[0])) { 3488 if (($len > 1 && $mailbox == substr($ns[0], 0, -1)) 3489 3489 || strpos($mailbox, $ns[0]) === 0 3490 3490 ) {
Note: See TracChangeset
for help on using the changeset viewer.
