summaryrefslogtreecommitdiff
path: root/program/include/main.inc
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2011-06-02 06:19:27 +0000
committeralecpl <alec@alec.pl>2011-06-02 06:19:27 +0000
commitfde361eb5827c1598404001cd26dee50aae3e037 (patch)
tree0c9f1ef9f1f1d3973896a67aba4c51132a628460 /program/include/main.inc
parent4fb6a28be20df102e8f410c66ea5547343c2264a (diff)
- Replace preg_match() with faster strpos()
Diffstat (limited to 'program/include/main.inc')
-rw-r--r--program/include/main.inc12
1 files changed, 6 insertions, 6 deletions
diff --git a/program/include/main.inc b/program/include/main.inc
index d630628cc..c312df547 100644
--- a/program/include/main.inc
+++ b/program/include/main.inc
@@ -1352,15 +1352,15 @@ function rcmail_render_folder_tree_html(&$arrFolders, &$mbox_name, &$jslist, $at
$classes = array('mailbox');
// set special class for Sent, Drafts, Trash and Junk
- if ($folder['id']==$CONFIG['sent_mbox'])
+ if ($folder['id'] == $CONFIG['sent_mbox'])
$classes[] = 'sent';
- else if ($folder['id']==$CONFIG['drafts_mbox'])
+ else if ($folder['id'] == $CONFIG['drafts_mbox'])
$classes[] = 'drafts';
- else if ($folder['id']==$CONFIG['trash_mbox'])
+ else if ($folder['id'] == $CONFIG['trash_mbox'])
$classes[] = 'trash';
- else if ($folder['id']==$CONFIG['junk_mbox'])
+ else if ($folder['id'] == $CONFIG['junk_mbox'])
$classes[] = 'junk';
- else if ($folder['id']=='INBOX')
+ else if ($folder['id'] == 'INBOX')
$classes[] = 'inbox';
else
$classes[] = '_'.asciiwords($folder_class ? $folder_class : strtolower($folder['id']), true);
@@ -1370,7 +1370,7 @@ function rcmail_render_folder_tree_html(&$arrFolders, &$mbox_name, &$jslist, $at
if ($folder['id'] == $mbox_name)
$classes[] = 'selected';
- $collapsed = preg_match('/&'.rawurlencode($folder['id']).'&/', $RCMAIL->config->get('collapsed_folders'));
+ $collapsed = strpos($CONFIG['collapsed_folders'], '&'.rawurlencode($folder['id']).'&') !== false;
$unread = $msgcounts ? intval($msgcounts[$folder['id']]['UNSEEN']) : 0;
if ($folder['virtual'])