release-0.6
till 17 years ago
parent 06583c301d
commit fa0152c21a

@ -1771,7 +1771,10 @@ class rcube_imap
$deleted = TRUE;
foreach ($all_mboxes as $c_mbox)
if (preg_match('/^'.preg_quote($mailbox.$this->delimiter).'/', $c_mbox))
{
$regex = preg_quote($mailbox . $this->delimiter, '/');
$regex = '/^' . $regex . '/';
if (preg_match($regex, $c_mbox))
{
iil_C_UnSubscribe($this->conn, $c_mbox);
$result = iil_C_DeleteFolder($this->conn, $c_mbox);
@ -1779,6 +1782,7 @@ class rcube_imap
$deleted = TRUE;
}
}
}
// clear mailboxlist cache
if ($deleted)

@ -119,8 +119,14 @@ else if ($_action=='delete-folder')
{
$OUTPUT->command('remove_folder_row', get_input_value('_mboxes', RCUBE_INPUT_POST));
foreach ($a_mboxes as $mbox)
if (preg_match('/^'.preg_quote(get_input_value('_mboxes', RCUBE_INPUT_POST).$delimiter).'/', $mbox))
{
$regex = get_input_value('_mboxes', RCUBE_INPUT_POST) . $delimiter;
$regex = preg_quote($regex, '/');
if (preg_match('/^'. $regex .'/', $mbox))
{
$OUTPUT->command('remove_folder_row', $mbox);
}
}
$OUTPUT->show_message('folderdeleted', 'confirmation');
$OUTPUT->send();
}

Loading…
Cancel
Save