summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--program/include/rcube_imap.php8
-rw-r--r--program/js/app.js2
2 files changed, 2 insertions, 8 deletions
diff --git a/program/include/rcube_imap.php b/program/include/rcube_imap.php
index fdf524d30..e485226f8 100644
--- a/program/include/rcube_imap.php
+++ b/program/include/rcube_imap.php
@@ -56,7 +56,6 @@ class rcube_imap
var $default_charset = 'ISO-8859-1';
var $struct_charset = NULL;
var $default_folders = array('INBOX');
- var $default_folders_lc = array('inbox');
var $fetch_add_headers = '';
var $cache = array();
var $cache_keys = array();
@@ -242,15 +241,10 @@ class rcube_imap
if (is_array($arr))
{
$this->default_folders = $arr;
- $this->default_folders_lc = array();
// add inbox if not included
if (!in_array_nocase('INBOX', $this->default_folders))
array_unshift($this->default_folders, 'INBOX');
-
- // create a second list with lower cased names
- foreach ($this->default_folders as $mbox)
- $this->default_folders_lc[] = strtolower($mbox);
}
}
@@ -2947,7 +2941,7 @@ class rcube_imap
if ($folder{0}=='.')
continue;
- if (($p = array_search(strtolower($folder), $this->default_folders_lc)) !== false && !$a_defaults[$p])
+ if (($p = array_search($folder, $this->default_folders)) !== false && !$a_defaults[$p])
$a_defaults[$p] = $folder;
else
$folders[$folder] = mb_strtolower(rcube_charset_convert($folder, 'UTF7-IMAP'));
diff --git a/program/js/app.js b/program/js/app.js
index dee34b5a0..f03b0c5fb 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -1885,7 +1885,7 @@ function rcube_webmail()
if (this.env.flag_for_deletion)
this.mark_message('delete');
// if there isn't a defined trash mailbox or we are in it
- else if (!this.env.trash_mailbox || String(this.env.mailbox).toLowerCase() == String(this.env.trash_mailbox).toLowerCase())
+ else if (!this.env.trash_mailbox || this.env.mailbox == this.env.trash_mailbox)
this.permanently_remove_messages();
// if there is a trash mailbox defined and we're not currently in it
else {