summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2008-11-20 07:49:12 +0000
committeralecpl <alec@alec.pl>2008-11-20 07:49:12 +0000
commit4e5b11adfc2eaca592d56423f5903c6b4c554499 (patch)
tree0e775abe213466c6017b17e145eafc9d337e70bc
parentf14ac8cefeec6a4095bc60b4881b0a70e379a164 (diff)
- small improvements - removed redundant code
-rw-r--r--program/steps/mail/func.inc11
1 files changed, 3 insertions, 8 deletions
diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc
index 2a917b170..7f8fb11a8 100644
--- a/program/steps/mail/func.inc
+++ b/program/steps/mail/func.inc
@@ -25,20 +25,15 @@ require_once('include/rcube_smtp.inc');
$EMAIL_ADDRESS_PATTERN = '/([a-z0-9][a-z0-9\-\.\+\_]*@[a-z0-9]([a-z0-9\-][.]?)*[a-z0-9]\\.[a-z]{2,5})/i';
-if (empty($_SESSION['mbox']))
- $_SESSION['mbox'] = $IMAP->get_mailbox_name();
-
// set imap properties and session vars
if ($mbox = get_input_value('_mbox', RCUBE_INPUT_GPC))
$IMAP->set_mailbox(($_SESSION['mbox'] = $mbox));
+else
+ $_SESSION['mbox'] = $IMAP->get_mailbox_name();
if (!empty($_GET['_page']))
$IMAP->set_page(($_SESSION['page'] = intval($_GET['_page'])));
-// set mailbox to INBOX if not set
-if (empty($_SESSION['mbox']))
- $_SESSION['mbox'] = $IMAP->get_mailbox_name();
-
// set default sort col/order to session
if (!isset($_SESSION['sort_col']))
$_SESSION['sort_col'] = $CONFIG['message_sort_col'];
@@ -86,7 +81,7 @@ if (empty($RCMAIL->action) || $RCMAIL->action == 'list')
if (!$OUTPUT->ajax_call)
$OUTPUT->add_label('checkingmail', 'deletemessage', 'movemessagetotrash', 'movingmessage');
- $OUTPUT->set_pagetitle(rcmail_localize_foldername($IMAP->get_mailbox_name()));
+ $OUTPUT->set_pagetitle(rcmail_localize_foldername($mbox_name));
}