From 8cab554252d2745b24a3fb6fc0fecc6f8086df1b Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Wed, 10 Jun 2015 12:54:26 -0400
Subject: [PATCH] Fix unintentional messages list page change on page switch in compose addressbook (#1490427)
---
program/steps/mail/func.inc | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc
index 684cdf9..f4d2675 100644
--- a/program/steps/mail/func.inc
+++ b/program/steps/mail/func.inc
@@ -161,12 +161,17 @@
if (!strlen($mbox = rcube_utils::get_input_value('_mbox', rcube_utils::INPUT_GPC, true))) {
$mbox = strlen($_SESSION['mbox']) ? $_SESSION['mbox'] : 'INBOX';
}
- if (!($page = intval($_GET['_page']))) {
- $page = $_SESSION['page'] ? $_SESSION['page'] : 1;
+
+ if ($RCMAIL->action == 'list') {
+ if (!($page = intval($_GET['_page']))) {
+ $page = $_SESSION['page'] ? $_SESSION['page'] : 1;
+ }
+
+ $_SESSION['page'] = $page;
}
$RCMAIL->storage->set_folder($_SESSION['mbox'] = $mbox);
- $RCMAIL->storage->set_page($_SESSION['page'] = $page);
+ $RCMAIL->storage->set_page($_SESSION['page']);
// set default sort col/order to session
if (!isset($_SESSION['sort_col'])) {
--
Gitblit v1.9.1