diff options
author | Thomas Bruederli <thomas@roundcube.net> | 2014-04-10 16:57:48 +0200 |
---|---|---|
committer | Thomas Bruederli <thomas@roundcube.net> | 2014-04-10 16:57:48 +0200 |
commit | 9155f3de2a333c45c7314c15e3e6594b456dbbae (patch) | |
tree | d87d2c37643e0df551183ce808b1d8ba60aacb3b /program/steps | |
parent | 467374ca12002fbcbe118b78f15b22e5fa85e721 (diff) | |
parent | 6b6d49313d6ccae2ce82145d8df3fe6840b7ed20 (diff) |
Merge branch 'master' of github.com:roundcube/roundcubemail
Diffstat (limited to 'program/steps')
-rw-r--r-- | program/steps/mail/func.inc | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc index f711da3e1..c123fe84a 100644 --- a/program/steps/mail/func.inc +++ b/program/steps/mail/func.inc @@ -24,16 +24,15 @@ $RCMAIL->storage_init(); // set imap properties and session vars -if (strlen(trim($mbox = rcube_utils::get_input_value('_mbox', rcube_utils::INPUT_GPC, true)))) { - $RCMAIL->storage->set_folder(($_SESSION['mbox'] = $mbox)); +if (!strlen($mbox = rcube_utils::get_input_value('_mbox', rcube_utils::INPUT_GPC, true))) { + $mbox = strlen($_SESSION['mbox']) ? $_SESSION['mbox'] : 'INBOX'; } -else if ($RCMAIL->storage) { - $_SESSION['mbox'] = $RCMAIL->storage->get_folder(); +if (!($page = intval($_GET['_page']))) { + $page = $_SESSION['page'] ? $_SESSION['page'] : 1; } -if (!empty($_GET['_page'])) { - $RCMAIL->storage->set_page(($_SESSION['page'] = intval($_GET['_page']))); -} +$RCMAIL->storage->set_folder($_SESSION['mbox'] = $mbox); +$RCMAIL->storage->set_page($_SESSION['page'] = $page); $a_threading = $RCMAIL->config->get('message_threading', array()); $message_sort_col = $RCMAIL->config->get('message_sort_col'); |