Changeset 866 in subversion


Ignore:
Timestamp:
Oct 15, 2007 5:17:08 AM (6 years ago)
Author:
robin
Message:

When a parent folder is deleted, delete the children immediately, instead of one-by-one as r833 did.

Location:
trunk/roundcubemail/program
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/roundcubemail/program/include/rcube_imap.inc

    r865 r866  
    17401740      $a_mboxes = explode(',', $mbox_name); 
    17411741 
     1742    $all_mboxes = iil_C_ListMailboxes($this->conn, $this->_mod_mailbox($root), '*'); 
     1743 
    17421744    if (is_array($a_mboxes)) 
    17431745      foreach ($a_mboxes as $mbox_name) 
     
    17521754        if ($result>=0) 
    17531755          $deleted = TRUE; 
     1756 
     1757        foreach ($all_mboxes as $c_mbox) 
     1758          if (preg_match('/^'.preg_quote($mailbox.$this->delimiter).'/', $c_mbox)) 
     1759            { 
     1760            iil_C_UnSubscribe($this->conn, $c_mbox); 
     1761            $result = iil_C_DeleteFolder($this->conn, $c_mbox); 
     1762            if ($result>=0) 
     1763              $deleted = TRUE; 
     1764            } 
    17541765        } 
    17551766 
  • trunk/roundcubemail/program/steps/settings/manage_folders.inc

    r857 r866  
    9898else if ($_action=='delete-folder') 
    9999  { 
     100  $a_mboxes = array_merge($IMAP->list_mailboxes(), $IMAP->list_unsubscribed()); 
     101  $delimiter = $IMAP->get_hierarchy_delimiter(); 
     102 
    100103  if ($mboxes = get_input_value('_mboxes', RCUBE_INPUT_POST)) 
    101104    $deleted = $IMAP->delete_mailbox(array($mboxes)); 
     
    104107    { 
    105108    $OUTPUT->command('remove_folder_row', get_input_value('_mboxes', RCUBE_INPUT_POST)); 
     109    foreach ($a_mboxes as $mbox) 
     110      if (preg_match('/^'.preg_quote(get_input_value('_mboxes', RCUBE_INPUT_POST).$delimiter).'/', $mbox)) 
     111        $OUTPUT->command('remove_folder_row', $mbox); 
    106112    $OUTPUT->show_message('folderdeleted', 'confirmation'); 
    107113    $OUTPUT->send(); 
Note: See TracChangeset for help on using the changeset viewer.