From 7403f9100b3177a08792c4f23f8ff94fb5a8854b Mon Sep 17 00:00:00 2001 From: Klaus Leithoff Date: Thu, 24 Mar 2016 15:16:10 +0000 Subject: [PATCH] fix for not correctly store last selected search-type --- mail/inc/class.mail_ui.inc.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mail/inc/class.mail_ui.inc.php b/mail/inc/class.mail_ui.inc.php index 298c809b48..dad4889894 100644 --- a/mail/inc/class.mail_ui.inc.php +++ b/mail/inc/class.mail_ui.inc.php @@ -738,7 +738,10 @@ class mail_ui if (html::$ua_mobile) $sel_options['toolbar'] = $this->get_toolbar_actions(); //we use the category "filter" option as specifier where we want to search (quick, subject, from, to, etc. ....) - if (empty($content[self::$nm_index]['cat_id']) || empty($content[self::$nm_index]['search'])) $content[self::$nm_index]['cat_id']=(emailadmin_imapbase::$supportsORinQuery[$this->mail_bo->profileID]?'quick':'subject'); + if (empty($content[self::$nm_index]['cat_id']) || empty($content[self::$nm_index]['search'])) + { + $content[self::$nm_index]['cat_id']=($content[self::$nm_index]['cat_id']?(!emailadmin_imapbase::$supportsORinQuery[$this->mail_bo->profileID]&&($content[self::$nm_index]['cat_id']=='quick'||$content[self::$nm_index]['cat_id']=='quickwithcc')?'subject':$content[self::$nm_index]['cat_id']):(emailadmin_imapbase::$supportsORinQuery[$this->mail_bo->profileID]?'quick':'subject')); + } $readonlys = $preserv = array(); if (mail_bo::$debugTimes) mail_bo::logRunTimes($starttime,null,'',__METHOD__.__LINE__); } @@ -1350,6 +1353,7 @@ class mail_ui $prefchanged = false; if (!isset($GLOBALS['egw_info']['user']['preferences']['mail']['ActiveSearchType']) || ($query['cat_id'] !=$GLOBALS['egw_info']['user']['preferences']['mail']['ActiveSearchType'])) { + //error_log(__METHOD__.__LINE__.' Changing userPref ActivesearchType:'.$query['cat_id']); $GLOBALS['egw']->preferences->add('mail','ActiveSearchType',$query['cat_id'],'user'); $prefchanged = true; }