Author: leithoff
New Revision: 55171
URL: http://svn.stylite.de/viewvc/egroupware?rev=55171&view=rev
Log:
support daterangefilter on serversidesearch
Modified:
trunk/mail/inc/class.mail_zpush.inc.php
— trunk/mail/inc/class.mail_zpush.inc.php (original)
+++ trunk/mail/inc/class.mail_zpush.inc.php Fri Feb 26 15:19:11 2016
@@ -1512,7 +1512,6 @@
$_folderName = ($this->mail->sessionData[‘mailbox’]?$this->mail->sessionData[‘mailbox’]:‘INBOX’);
$folderid = $this->createID($account=0,$_folderName);
}
-//$_filter = array(‘status’=>array(‘UNDELETED’),‘type’=>“SINCE”,‘string’=> date(“d-M-Y”, $cutoffdate));
$rv = $this->splitID($folderid,$account,$_folderName,$id);
ZLog::Write(LOGLEVEL_DEBUG,METHOD.LINE.’ ProfileID:’.self::$profileID.’ FolderID:’.$folderid.’ Foldername:’.$_folderName);
$this->_connect($account);
@@ -1520,9 +1519,24 @@
emailadmin_imapbase::$supportsORinQuery[self::$profileID]=true; // trigger quicksearch (if possible)
$_filter = array(‘type’=> (emailadmin_imapbase::$supportsORinQuery[self::$profileID]?‘quick’:‘subject’),
‘string’=> $searchText,
-
'status'=>'any'
);
-
if (isset($searchquery['searchdatereceivedgreater']) || isset($searchquery['searchdatereceivedless']))
-
{
-
/*
-
* We respect only the DATEPART of the RANGE specified
-
* [searchdatereceivedgreater] => 1
-
* [searchvaluegreater] => 2015-07-06T22:00:00.000Z , SINCE
-
* [searchdatereceivedless] => 1
-
* [searchvalueless] => 2015-07-14T15:11:00.000Z , BEFORE
-
*/
-
$_filter['range'] = "BETWEEN";
-
list($sincedate,$crap) = explode('T',$searchquery['searchvaluegreater']);
-
list($beforedate,$crap) = explode('T',$searchquery['searchvalueless']);
-
$_filter['before'] = date("d-M-Y", egw_time::to($beforedate,'ts'));
-
$_filter['since'] = date("d-M-Y", egw_time::to($sincedate,'ts'));
-
}
//$_filter[] = array('type'=>"SINCE",'string'=> date("d-M-Y", $cutoffdate));
if ($this->debugLevel>1) debugLog (__METHOD__.' for Folder:'.$_folderName.' Filter:'.array2string($_filter));
$rv_messages = $this->mail->getHeaders($_folderName, $_startMessage=($range?$start:1), $_numberOfMessages=($limit?$limit:9999999), $_sort=0, $_reverse=false, $_filter, $_id=NULL);
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
eGroupWare-cvs mailing list
eGroupWare-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/egroupware-cvs