Changeset 189a0ae in github


Ignore:
Timestamp:
Aug 18, 2011 5:30:28 AM (22 months ago)
Author:
alecpl <alec@…>
Branches:
master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.7, release-0.8
Children:
0d16eb7
Parents:
b501e67
Message:
  • Unsubscribe from non-existing folders always (on listing), not only in Settings/Folders? UI
Location:
program
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • program/include/rcube_imap.php

    r2185899 r189a0ae  
    30843084                    NULL, array('SUBSCRIBED')); 
    30853085 
    3086                 // remove non-existent folders 
    3087                 if (is_array($a_folders)) { 
     3086                // unsubscribe non-existent folders, remove from the list 
     3087                if (is_array($a_folders) && $name == '*') { 
    30883088                    foreach ($a_folders as $idx => $folder) { 
    30893089                        if ($this->conn->data['LIST'] && ($opts = $this->conn->data['LIST'][$folder]) 
    30903090                            && in_array('\\NonExistent', $opts) 
    30913091                        ) { 
     3092                            $this->conn->unsubscribe($folder); 
    30923093                            unset($a_folders[$idx]); 
    3093                         }  
     3094                        } 
    30943095                    } 
    30953096                } 
     
    30983099            else { 
    30993100                $a_folders = $this->conn->listSubscribed($root, $name); 
     3101 
     3102                // unsubscribe non-existent folders, remove from the list 
     3103                if (is_array($a_folders) && $name == '*') { 
     3104                    foreach ($a_folders as $idx => $folder) { 
     3105                        if ($this->conn->data['LIST'] && ($opts = $this->conn->data['LIST'][$folder]) 
     3106                            && in_array('\\Noselect', $opts) 
     3107                        ) { 
     3108                            // Some servers returns \Noselect for existing folders 
     3109                            if (!$this->mailbox_exists($folder)) { 
     3110                                $this->conn->unsubscribe($folder); 
     3111                                unset($a_folders[$idx]); 
     3112                            } 
     3113                        } 
     3114                    } 
     3115                } 
    31003116            } 
    31013117        } 
  • program/steps/settings/folders.inc

    r85e7a3d r189a0ae  
    279279            . Q($protected ? rcmail_localize_foldername($folder['id']) : $folder['name']); 
    280280 
    281         if ($sub_key !== false) 
    282             unset($a_subscribed[$sub_key]); 
    283  
    284281        if ($folder['virtual']) { 
    285282            $classes[] = 'virtual'; 
     
    330327    } 
    331328 
    332     // Unsubscribe from non-existing folders 
    333     foreach ($a_subscribed as $folder) { 
    334         $IMAP->unsubscribe($folder); 
    335     } 
    336  
    337329    $RCMAIL->plugins->exec_hook('folders_list', array('table' => $table)); 
    338330 
Note: See TracChangeset for help on using the changeset viewer.