|
@@ 4856-4891 (lines=36) @@
|
| 4853 |
|
if (isset($_messageList['activeFilters']) && $_messageList['activeFilters']) |
| 4854 |
|
{ |
| 4855 |
|
$query = $_messageList['activeFilters']; |
| 4856 |
|
if (!empty($query['search']) || !empty($query['filter'])||($query['cat_id']=='bydate' && (!empty($query['startdate'])||!empty($query['enddate'])))) |
| 4857 |
|
{ |
| 4858 |
|
//([filterName] => Schnellsuche[type] => quick[string] => ebay[status] => any |
| 4859 |
|
if (is_null(Mail::$supportsORinQuery) || !isset(Mail::$supportsORinQuery[$this->mail_bo->profileID])) |
| 4860 |
|
{ |
| 4861 |
|
Mail::$supportsORinQuery = Api\Cache::getCache(Api\Cache::INSTANCE,'email','supportsORinQuery'.trim($GLOBALS['egw_info']['user']['account_id']), null, array(), 60*60*10); |
| 4862 |
|
if (!isset(Mail::$supportsORinQuery[$this->mail_bo->profileID])) Mail::$supportsORinQuery[$this->mail_bo->profileID]=true; |
| 4863 |
|
} |
| 4864 |
|
$filtered = true; |
| 4865 |
|
$cutoffdate = $cutoffdate2 = null; |
| 4866 |
|
if ($query['startdate']) $cutoffdate = Api\DateTime::to($query['startdate'],'ts');//SINCE, enddate |
| 4867 |
|
if ($query['enddate']) $cutoffdate2 = Api\DateTime::to($query['enddate'],'ts');//BEFORE, startdate |
| 4868 |
|
//error_log(__METHOD__.__LINE__.' Startdate:'.$cutoffdate2.' Enddate'.$cutoffdate); |
| 4869 |
|
$filter = array( |
| 4870 |
|
'filterName' => (Mail::$supportsORinQuery[$mail_ui->mail_bo->profileID]?lang('quicksearch'):lang('subject')), |
| 4871 |
|
'type' => ($query['cat_id']?$query['cat_id']:(Mail::$supportsORinQuery[$mail_ui->mail_bo->profileID]?'quick':'subject')), |
| 4872 |
|
'string' => $query['search'], |
| 4873 |
|
'status' => (!empty($query['filter'])?$query['filter']:'any'), |
| 4874 |
|
//'range'=>"BETWEEN",'since'=> date("d-M-Y", $cutoffdate),'before'=> date("d-M-Y", $cutoffdate2) |
| 4875 |
|
); |
| 4876 |
|
if ($query['enddate']||$query['startdate']) { |
| 4877 |
|
$filter['range'] = "BETWEEN"; |
| 4878 |
|
if ($cutoffdate) { |
| 4879 |
|
$filter[(empty($cutoffdate2)?'date':'since')] = date("d-M-Y", $cutoffdate); |
| 4880 |
|
if (empty($cutoffdate2)) $filter['range'] = "SINCE"; |
| 4881 |
|
} |
| 4882 |
|
if ($cutoffdate2) { |
| 4883 |
|
$filter[(empty($cutoffdate)?'date':'before')] = date("d-M-Y", $cutoffdate2); |
| 4884 |
|
if (empty($cutoffdate)) $filter['range'] = "BEFORE"; |
| 4885 |
|
} |
| 4886 |
|
} |
| 4887 |
|
} |
| 4888 |
|
else |
| 4889 |
|
{ |
| 4890 |
|
$filter = array(); |
| 4891 |
|
} |
| 4892 |
|
//error_log(__METHOD__.__LINE__."->".print_r($filter,true).' folder:'.$folder.' Method:'.$_forceDeleteMethod); |
| 4893 |
|
$reverse = 1; |
| 4894 |
|
$rByUid = true; |
|
@@ 5016-5051 (lines=36) @@
|
| 5013 |
|
if (isset($_messageList['activeFilters']) && $_messageList['activeFilters']) |
| 5014 |
|
{ |
| 5015 |
|
$query = $_messageList['activeFilters']; |
| 5016 |
|
if (!empty($query['search']) || !empty($query['filter'])||($query['cat_id']=='bydate' && (!empty($query['startdate'])||!empty($query['enddate'])))) |
| 5017 |
|
{ |
| 5018 |
|
//([filterName] => Schnellsuche[type] => quick[string] => ebay[status] => any |
| 5019 |
|
if (is_null(Mail::$supportsORinQuery) || !isset(Mail::$supportsORinQuery[$this->mail_bo->profileID])) |
| 5020 |
|
{ |
| 5021 |
|
Mail::$supportsORinQuery = Api\Cache::getCache(Api\Cache::INSTANCE,'email','supportsORinQuery'.trim($GLOBALS['egw_info']['user']['account_id']), null, array(), 60*60*10); |
| 5022 |
|
if (!isset(Mail::$supportsORinQuery[$this->mail_bo->profileID])) Mail::$supportsORinQuery[$this->mail_bo->profileID]=true; |
| 5023 |
|
} |
| 5024 |
|
$filtered = true; |
| 5025 |
|
$cutoffdate = $cutoffdate2 = null; |
| 5026 |
|
if ($query['startdate']) $cutoffdate = Api\DateTime::to($query['startdate'],'ts');//SINCE, enddate |
| 5027 |
|
if ($query['enddate']) $cutoffdate2 = Api\DateTime::to($query['enddate'],'ts');//BEFORE, startdate |
| 5028 |
|
//error_log(__METHOD__.__LINE__.' Startdate:'.$cutoffdate2.' Enddate'.$cutoffdate); |
| 5029 |
|
$filter = array( |
| 5030 |
|
'filterName' => (Mail::$supportsORinQuery[$mail_ui->mail_bo->profileID]?lang('quicksearch'):lang('subject')), |
| 5031 |
|
'type' => ($query['cat_id']?$query['cat_id']:(Mail::$supportsORinQuery[$mail_ui->mail_bo->profileID]?'quick':'subject')), |
| 5032 |
|
'string' => $query['search'], |
| 5033 |
|
'status' => (!empty($query['filter'])?$query['filter']:'any'), |
| 5034 |
|
//'range'=>"BETWEEN",'since'=> date("d-M-Y", $cutoffdate),'before'=> date("d-M-Y", $cutoffdate2) |
| 5035 |
|
); |
| 5036 |
|
if ($query['enddate']||$query['startdate']) { |
| 5037 |
|
$filter['range'] = "BETWEEN"; |
| 5038 |
|
if ($cutoffdate) { |
| 5039 |
|
$filter[(empty($cutoffdate2)?'date':'since')] = date("d-M-Y", $cutoffdate); |
| 5040 |
|
if (empty($cutoffdate2)) $filter['range'] = "SINCE"; |
| 5041 |
|
} |
| 5042 |
|
if ($cutoffdate2) { |
| 5043 |
|
$filter[(empty($cutoffdate)?'date':'before')] = date("d-M-Y", $cutoffdate2); |
| 5044 |
|
if (empty($cutoffdate)) $filter['range'] = "BEFORE"; |
| 5045 |
|
} |
| 5046 |
|
} |
| 5047 |
|
} |
| 5048 |
|
else |
| 5049 |
|
{ |
| 5050 |
|
$filter = array(); |
| 5051 |
|
} |
| 5052 |
|
$reverse = 1; |
| 5053 |
|
$rByUid = true; |
| 5054 |
|
$_sR = $this->mail_bo->getSortedList( |