Author: leithoff
New Revision: 55503
URL: http://svn.stylite.de/viewvc/egroupware?rev=55503&view=rev
Log:
add some new searchTypes; remember last SearchType used with user-pref
Modified:
trunk/mail/inc/class.mail_ui.inc.php
— trunk/mail/inc/class.mail_ui.inc.php (original)
+++ trunk/mail/inc/class.mail_ui.inc.php Thu Mar 24 11:38:35 2016
@@ -86,12 +86,15 @@
*/
var $searchTypes = array(
‘quick’ => ‘quicksearch’, // lang(‘quicksearch’)
-
'quickwithcc'=> 'quicksearch (with cc)', // lang('quicksearch (with cc)')
'subject' => 'subject', // lang('subject')
'body' => 'message body', // lang('message body')
'from' => 'from', // lang('from')
'to' => 'to', // lang('to')
'cc' => 'cc', // lang('cc')
'text' => 'whole message', // lang('whole message')
-
'larger' => 'greater than', // lang('greater than')
-
'smaller' => 'less than', // lang('less than')
// ‘custom’ => ‘Selected range’,// lang(‘Selected range’)
);
@@ -523,8 +526,15 @@
emailadmin_imapbase::$supportsORinQuery = egw_cache::getCache(egw_cache::INSTANCE, ‘email’, ‘supportsORinQuery’.trim($GLOBALS[‘egw_info’][‘user’][‘account_id’]), null, array(), 606010);
if (!isset(emailadmin_imapbase::$supportsORinQuery[$this->mail_bo->profileID])) emailadmin_imapbase::$supportsORinQuery[$this->mail_bo->profileID]=true;
}
-
if (!emailadmin_imapbase::$supportsORinQuery[$this->mail_bo->profileID])
-
{
-
unset($this->searchTypes['quick']);
-
unset($this->searchTypes['quickwithcc']);
-
}
$sel_options['cat_id'] = $this->searchTypes;
-
error_log(__METHOD__.__LINE__.array2string($sel_options['cat_id']));
-
error_log(__METHOD__.__LINE__.array2string($GLOBALS['egw_info']['user']['preferences']['mail']['ActiveSearchType']));
-
$content[self::$nm_index]['cat_id'] = $GLOBALS['egw_info']['user']['preferences']['mail']['ActiveSearchType'];
$sel_options['filter'] = $this->statusTypes;
$sel_options['filter2'] = array(''=>'No details',1=>'Details');
$content[self::$nm_index]['filter2'] = $GLOBALS['egw_info']['user']['preferences']['mail']['ShowDetails'];
@@ -1337,9 +1347,19 @@
$filter[‘status’] = $query[‘filter’];
}
$reverse = ($query[‘sort’]==‘ASC’?false:true);
-
$prefchanged = false;
-
if (!isset($GLOBALS['egw_info']['user']['preferences']['mail']['ActiveSearchType']) || ($query['cat_id'] !=$GLOBALS['egw_info']['user']['preferences']['mail']['ActiveSearchType']))
-
{
-
$GLOBALS['egw']->preferences->add('mail','ActiveSearchType',$query['cat_id'],'user');
-
$prefchanged = true;
-
}
if (!isset($GLOBALS['egw_info']['user']['preferences']['mail']['ShowDetails']) || ($query['filter2'] !=$GLOBALS['egw_info']['user']['preferences']['mail']['ShowDetails']))
{
$GLOBALS['egw']->preferences->add('mail','ShowDetails',$query['filter2'],'user');
-
$prefchanged = true;
-
}
-
if ($prefchanged)
-
{
// save prefs
$GLOBALS['egw']->preferences->save_repository(true);
}
@@ -4143,6 +4163,7 @@
if (!emailadmin_imapbase::$supportsORinQuery[$this->mail_bo->profileID])
{
unset($this->searchTypes[‘quick’]);
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140
eGroupWare-cvs mailing list
eGroupWare-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/egroupware-cvs