summaryrefslogtreecommitdiff
path: root/program/js/app.js
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2013-10-30 16:06:27 +0100
committerAleksander Machniak <alec@alec.pl>2013-10-30 16:06:27 +0100
commit8f8e263977cc356bf754236ed0182515b26337ca (patch)
tree63814d8e8a4c8bcc9128b86fb84cd373da4d4bc1 /program/js/app.js
parent2aacf1a31d63e0f88e1a06fda9a99519a9f29e1a (diff)
CS fixes
Diffstat (limited to 'program/js/app.js')
-rw-r--r--program/js/app.js9
1 files changed, 6 insertions, 3 deletions
diff --git a/program/js/app.js b/program/js/app.js
index 42cbaa6f9..55dea3620 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -3032,9 +3032,12 @@ function rcube_webmail()
// test if purge command is allowed
this.purge_mailbox_test = function()
{
- return (this.env.exists && (this.env.mailbox == this.env.trash_mailbox || this.env.mailbox == this.env.junk_mailbox
- || this.env.mailbox.match('^' + RegExp.escape(this.env.trash_mailbox) + RegExp.escape(this.env.delimiter))
- || this.env.mailbox.match('^' + RegExp.escape(this.env.junk_mailbox) + RegExp.escape(this.env.delimiter))));
+ return (this.env.exists && (
+ this.env.mailbox == this.env.trash_mailbox
+ || this.env.mailbox == this.env.junk_mailbox
+ || this.env.mailbox.indexOf(this.env.trash_mailbox + this.env.delimiter) == 0
+ || this.env.mailbox.indexOf(this.env.junk_mailbox + this.env.delimiter) == 0
+ ));
};