|
@@ 4706-4741 (lines=36) @@
|
| 4703 |
|
if (isset($_messageList['activeFilters']) && $_messageList['activeFilters']) |
| 4704 |
|
{ |
| 4705 |
|
$query = $_messageList['activeFilters']; |
| 4706 |
|
if (!empty($query['search']) || !empty($query['filter'])||($query['cat_id']=='bydate' && (!empty($query['startdate'])||!empty($query['enddate'])))) |
| 4707 |
|
{ |
| 4708 |
|
//([filterName] => Schnellsuche[type] => quick[string] => ebay[status] => any |
| 4709 |
|
if (is_null(Mail::$supportsORinQuery) || !isset(Mail::$supportsORinQuery[$this->mail_bo->profileID])) |
| 4710 |
|
{ |
| 4711 |
|
Mail::$supportsORinQuery = Api\Cache::getCache(Api\Cache::INSTANCE,'email','supportsORinQuery'.trim($GLOBALS['egw_info']['user']['account_id']), null, array(), 60*60*10); |
| 4712 |
|
if (!isset(Mail::$supportsORinQuery[$this->mail_bo->profileID])) Mail::$supportsORinQuery[$this->mail_bo->profileID]=true; |
| 4713 |
|
} |
| 4714 |
|
$filtered = true; |
| 4715 |
|
$cutoffdate = $cutoffdate2 = null; |
| 4716 |
|
if ($query['startdate']) $cutoffdate = Api\DateTime::to($query['startdate'],'ts');//SINCE, enddate |
| 4717 |
|
if ($query['enddate']) $cutoffdate2 = Api\DateTime::to($query['enddate'],'ts');//BEFORE, startdate |
| 4718 |
|
//error_log(__METHOD__.__LINE__.' Startdate:'.$cutoffdate2.' Enddate'.$cutoffdate); |
| 4719 |
|
$filter = array( |
| 4720 |
|
'filterName' => (Mail::$supportsORinQuery[$mail_ui->mail_bo->profileID]?lang('quicksearch'):lang('subject')), |
| 4721 |
|
'type' => ($query['cat_id']?$query['cat_id']:(Mail::$supportsORinQuery[$mail_ui->mail_bo->profileID]?'quick':'subject')), |
| 4722 |
|
'string' => $query['search'], |
| 4723 |
|
'status' => (!empty($query['filter'])?$query['filter']:'any'), |
| 4724 |
|
//'range'=>"BETWEEN",'since'=> date("d-M-Y", $cutoffdate),'before'=> date("d-M-Y", $cutoffdate2) |
| 4725 |
|
); |
| 4726 |
|
if ($query['enddate']||$query['startdate']) { |
| 4727 |
|
$filter['range'] = "BETWEEN"; |
| 4728 |
|
if ($cutoffdate) { |
| 4729 |
|
$filter[(empty($cutoffdate2)?'date':'since')] = date("d-M-Y", $cutoffdate); |
| 4730 |
|
if (empty($cutoffdate2)) $filter['range'] = "SINCE"; |
| 4731 |
|
} |
| 4732 |
|
if ($cutoffdate2) { |
| 4733 |
|
$filter[(empty($cutoffdate)?'date':'before')] = date("d-M-Y", $cutoffdate2); |
| 4734 |
|
if (empty($cutoffdate)) $filter['range'] = "BEFORE"; |
| 4735 |
|
} |
| 4736 |
|
} |
| 4737 |
|
} |
| 4738 |
|
else |
| 4739 |
|
{ |
| 4740 |
|
$filter = array(); |
| 4741 |
|
} |
| 4742 |
|
//error_log(__METHOD__.__LINE__."->".print_r($filter,true).' folder:'.$folder.' Method:'.$_forceDeleteMethod); |
| 4743 |
|
$reverse = 1; |
| 4744 |
|
$rByUid = true; |
|
@@ 4866-4901 (lines=36) @@
|
| 4863 |
|
if (isset($_messageList['activeFilters']) && $_messageList['activeFilters']) |
| 4864 |
|
{ |
| 4865 |
|
$query = $_messageList['activeFilters']; |
| 4866 |
|
if (!empty($query['search']) || !empty($query['filter'])||($query['cat_id']=='bydate' && (!empty($query['startdate'])||!empty($query['enddate'])))) |
| 4867 |
|
{ |
| 4868 |
|
//([filterName] => Schnellsuche[type] => quick[string] => ebay[status] => any |
| 4869 |
|
if (is_null(Mail::$supportsORinQuery) || !isset(Mail::$supportsORinQuery[$this->mail_bo->profileID])) |
| 4870 |
|
{ |
| 4871 |
|
Mail::$supportsORinQuery = Api\Cache::getCache(Api\Cache::INSTANCE,'email','supportsORinQuery'.trim($GLOBALS['egw_info']['user']['account_id']), null, array(), 60*60*10); |
| 4872 |
|
if (!isset(Mail::$supportsORinQuery[$this->mail_bo->profileID])) Mail::$supportsORinQuery[$this->mail_bo->profileID]=true; |
| 4873 |
|
} |
| 4874 |
|
$filtered = true; |
| 4875 |
|
$cutoffdate = $cutoffdate2 = null; |
| 4876 |
|
if ($query['startdate']) $cutoffdate = Api\DateTime::to($query['startdate'],'ts');//SINCE, enddate |
| 4877 |
|
if ($query['enddate']) $cutoffdate2 = Api\DateTime::to($query['enddate'],'ts');//BEFORE, startdate |
| 4878 |
|
//error_log(__METHOD__.__LINE__.' Startdate:'.$cutoffdate2.' Enddate'.$cutoffdate); |
| 4879 |
|
$filter = array( |
| 4880 |
|
'filterName' => (Mail::$supportsORinQuery[$mail_ui->mail_bo->profileID]?lang('quicksearch'):lang('subject')), |
| 4881 |
|
'type' => ($query['cat_id']?$query['cat_id']:(Mail::$supportsORinQuery[$mail_ui->mail_bo->profileID]?'quick':'subject')), |
| 4882 |
|
'string' => $query['search'], |
| 4883 |
|
'status' => (!empty($query['filter'])?$query['filter']:'any'), |
| 4884 |
|
//'range'=>"BETWEEN",'since'=> date("d-M-Y", $cutoffdate),'before'=> date("d-M-Y", $cutoffdate2) |
| 4885 |
|
); |
| 4886 |
|
if ($query['enddate']||$query['startdate']) { |
| 4887 |
|
$filter['range'] = "BETWEEN"; |
| 4888 |
|
if ($cutoffdate) { |
| 4889 |
|
$filter[(empty($cutoffdate2)?'date':'since')] = date("d-M-Y", $cutoffdate); |
| 4890 |
|
if (empty($cutoffdate2)) $filter['range'] = "SINCE"; |
| 4891 |
|
} |
| 4892 |
|
if ($cutoffdate2) { |
| 4893 |
|
$filter[(empty($cutoffdate)?'date':'before')] = date("d-M-Y", $cutoffdate2); |
| 4894 |
|
if (empty($cutoffdate)) $filter['range'] = "BEFORE"; |
| 4895 |
|
} |
| 4896 |
|
} |
| 4897 |
|
} |
| 4898 |
|
else |
| 4899 |
|
{ |
| 4900 |
|
$filter = array(); |
| 4901 |
|
} |
| 4902 |
|
$reverse = 1; |
| 4903 |
|
$rByUid = true; |
| 4904 |
|
$_sR = $this->mail_bo->getSortedList( |