Changeset c6a9cd6 in github
- Timestamp:
- Mar 2, 2012 8:43:45 AM (16 months ago)
- Branches:
- master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.8
- Children:
- b95794d
- Parents:
- 82d6958
- Location:
- program/include
- Files:
-
- 2 edited
-
rcube_imap.php (modified) (2 diffs)
-
rcube_imap_generic.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
program/include/rcube_imap.php
rb91f048 rc6a9cd6 2528 2528 2529 2529 // unsubscribe non-existent folders, remove from the list 2530 if (is_array($a_folders) && $name == '*') { 2530 // we can do this only when LIST response is available 2531 if (is_array($a_folders) && $name == '*' && !empty($this->conn->data['LIST'])) { 2531 2532 foreach ($a_folders as $idx => $folder) { 2532 if ( $this->conn->data['LIST'] &&($opts = $this->conn->data['LIST'][$folder])2533 if (($opts = $this->conn->data['LIST'][$folder]) 2533 2534 && in_array('\\NonExistent', $opts) 2534 2535 ) { … … 2543 2544 $a_folders = $this->conn->listSubscribed($root, $name); 2544 2545 2545 // unsubscribe non-existent folders, remove from the list 2546 if (is_array($a_folders) && $name == '*') { 2546 // unsubscribe non-existent folders, remove them from the list, 2547 // we can do this only when LIST response is available 2548 if (is_array($a_folders) && $name == '*' && !empty($this->conn->data['LIST'])) { 2547 2549 foreach ($a_folders as $idx => $folder) { 2548 if ( $this->conn->data['LIST'] && ($opts =$this->conn->data['LIST'][$folder])2549 && in_array('\\Noselect', $opts)2550 if (!isset($this->conn->data['LIST'][$folder]) 2551 || in_array('\\Noselect', $this->conn->data['LIST'][$folder]) 2550 2552 ) { 2551 2553 // Some servers returns \Noselect for existing folders -
program/include/rcube_imap_generic.php
r1d7dcc6 rc6a9cd6 1353 1353 } 1354 1354 1355 // Add to options array 1356 if (empty($this->data['LIST'][$mailbox])) 1357 $this->data['LIST'][$mailbox] = $opts; 1358 else if (!empty($opts)) 1359 $this->data['LIST'][$mailbox] = array_unique(array_merge( 1360 $this->data['LIST'][$mailbox], $opts)); 1355 // store LSUB options only if not empty, this way 1356 // we can detect a situation when LIST doesn't return specified folder 1357 if (!empty($opts) || $cmd == 'LIST') { 1358 // Add to options array 1359 if (empty($this->data['LIST'][$mailbox])) 1360 $this->data['LIST'][$mailbox] = $opts; 1361 else if (!empty($opts)) 1362 $this->data['LIST'][$mailbox] = array_unique(array_merge( 1363 $this->data['LIST'][$mailbox], $opts)); 1364 } 1361 1365 } 1362 1366 // * STATUS <mailbox> (<result>)
Note: See TracChangeset
for help on using the changeset viewer.
