From ec433114236f9e1871ec5ff9d5d19de50ab236fd Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Wed, 01 May 2013 03:46:29 -0400
Subject: [PATCH] Fix so addressbook_search_mode works also for group search (#1489079)

---
 program/include/rcmail.php |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/program/include/rcmail.php b/program/include/rcmail.php
index 3f6b39f..7acb349 100644
--- a/program/include/rcmail.php
+++ b/program/include/rcmail.php
@@ -98,7 +98,10 @@
 
     // reset some session parameters when changing task
     if ($this->task != 'utils') {
-      if ($this->session && $_SESSION['task'] != $this->task)
+      // we reset list page when switching to another task
+      // but only to the main task interface - empty action (#1489076)
+      // this will prevent from unintentional page reset on cross-task requests
+      if ($this->session && $_SESSION['task'] != $this->task && empty($this->action))
         $this->session->remove('page');
       // set current task to session
       $_SESSION['task'] = $this->task;

--
Gitblit v1.9.1