summaryrefslogtreecommitdiff
path: root/program
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2011-12-08 11:47:35 +0000
committeralecpl <alec@alec.pl>2011-12-08 11:47:35 +0000
commit3d4e8a9069fda3b63acabcae8ed6094eef7cea86 (patch)
treea521fb4ab5ccb1e08954580e233ff68e32a03e6f /program
parente361bfe24b794eeb65200f22d0018e8b6b0513c3 (diff)
- Microoptimizations
Diffstat (limited to 'program')
-rw-r--r--program/include/rcube_imap.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/program/include/rcube_imap.php b/program/include/rcube_imap.php
index df7b63185..3552010b8 100644
--- a/program/include/rcube_imap.php
+++ b/program/include/rcube_imap.php
@@ -2937,7 +2937,7 @@ class rcube_imap
// check if mailbox children are subscribed
foreach ($a_subscribed as $c_subscribed) {
- if (preg_match('/^'.preg_quote($mailbox.$delm, '/').'/', $c_subscribed)) {
+ if (strpos($c_subscribed, $mailbox.$delm) === 0) {
$this->conn->unsubscribe($c_subscribed);
$this->conn->subscribe(preg_replace('/^'.preg_quote($mailbox, '/').'/',
$new_name, $c_subscribed));
@@ -2981,7 +2981,7 @@ class rcube_imap
$this->conn->unsubscribe($mailbox);
foreach ($sub_mboxes as $c_mbox) {
- if (preg_match('/^'.preg_quote($mailbox.$delm, '/').'/', $c_mbox)) {
+ if (strpos($c_mbox, $mailbox.$delm) === 0) {
$this->conn->unsubscribe($c_mbox);
if ($this->conn->deleteFolder($c_mbox)) {
$this->clear_message_cache($c_mbox);