summaryrefslogtreecommitdiff
path: root/program
diff options
context:
space:
mode:
authortill <till@php.net>2008-02-02 17:22:36 +0000
committertill <till@php.net>2008-02-02 17:22:36 +0000
commitfa0152c21a7465013cd2a980d5cd3531ff7720d6 (patch)
tree34fa7a21cdeacdb79e9048336f9aac4a9742bf50 /program
parent06583c301d9fc825f998a1dcff9a740521437a9d (diff)
* fixed #1484738
Diffstat (limited to 'program')
-rw-r--r--program/include/rcube_imap.inc6
-rw-r--r--program/steps/settings/manage_folders.inc8
2 files changed, 12 insertions, 2 deletions
diff --git a/program/include/rcube_imap.inc b/program/include/rcube_imap.inc
index 2d947a4fd..091048a15 100644
--- a/program/include/rcube_imap.inc
+++ b/program/include/rcube_imap.inc
@@ -1771,13 +1771,17 @@ 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);
if ($result>=0)
$deleted = TRUE;
}
+ }
}
// clear mailboxlist cache
diff --git a/program/steps/settings/manage_folders.inc b/program/steps/settings/manage_folders.inc
index b329e4c64..7e06c9c8f 100644
--- a/program/steps/settings/manage_folders.inc
+++ b/program/steps/settings/manage_folders.inc
@@ -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();
}