|
@@ 4722-4757 (lines=36) @@
|
| 4719 |
|
if (isset($_messageList['activeFilters']) && $_messageList['activeFilters']) |
| 4720 |
|
{ |
| 4721 |
|
$query = $_messageList['activeFilters']; |
| 4722 |
|
if (!empty($query['search']) || !empty($query['filter'])||($query['cat_id']=='bydate' && (!empty($query['startdate'])||!empty($query['enddate'])))) |
| 4723 |
|
{ |
| 4724 |
|
//([filterName] => Schnellsuche[type] => quick[string] => ebay[status] => any |
| 4725 |
|
if (is_null(Mail::$supportsORinQuery) || !isset(Mail::$supportsORinQuery[$this->mail_bo->profileID])) |
| 4726 |
|
{ |
| 4727 |
|
Mail::$supportsORinQuery = Api\Cache::getCache(Api\Cache::INSTANCE,'email','supportsORinQuery'.trim($GLOBALS['egw_info']['user']['account_id']), null, array(), 60*60*10); |
| 4728 |
|
if (!isset(Mail::$supportsORinQuery[$this->mail_bo->profileID])) Mail::$supportsORinQuery[$this->mail_bo->profileID]=true; |
| 4729 |
|
} |
| 4730 |
|
$filtered = true; |
| 4731 |
|
$cutoffdate = $cutoffdate2 = null; |
| 4732 |
|
if ($query['startdate']) $cutoffdate = Api\DateTime::to($query['startdate'],'ts');//SINCE, enddate |
| 4733 |
|
if ($query['enddate']) $cutoffdate2 = Api\DateTime::to($query['enddate'],'ts');//BEFORE, startdate |
| 4734 |
|
//error_log(__METHOD__.__LINE__.' Startdate:'.$cutoffdate2.' Enddate'.$cutoffdate); |
| 4735 |
|
$filter = array( |
| 4736 |
|
'filterName' => (Mail::$supportsORinQuery[$mail_ui->mail_bo->profileID]?lang('quicksearch'):lang('subject')), |
| 4737 |
|
'type' => ($query['cat_id']?$query['cat_id']:(Mail::$supportsORinQuery[$mail_ui->mail_bo->profileID]?'quick':'subject')), |
| 4738 |
|
'string' => $query['search'], |
| 4739 |
|
'status' => (!empty($query['filter'])?$query['filter']:'any'), |
| 4740 |
|
//'range'=>"BETWEEN",'since'=> date("d-M-Y", $cutoffdate),'before'=> date("d-M-Y", $cutoffdate2) |
| 4741 |
|
); |
| 4742 |
|
if ($query['enddate']||$query['startdate']) { |
| 4743 |
|
$filter['range'] = "BETWEEN"; |
| 4744 |
|
if ($cutoffdate) { |
| 4745 |
|
$filter[(empty($cutoffdate2)?'date':'since')] = date("d-M-Y", $cutoffdate); |
| 4746 |
|
if (empty($cutoffdate2)) $filter['range'] = "SINCE"; |
| 4747 |
|
} |
| 4748 |
|
if ($cutoffdate2) { |
| 4749 |
|
$filter[(empty($cutoffdate)?'date':'before')] = date("d-M-Y", $cutoffdate2); |
| 4750 |
|
if (empty($cutoffdate)) $filter['range'] = "BEFORE"; |
| 4751 |
|
} |
| 4752 |
|
} |
| 4753 |
|
} |
| 4754 |
|
else |
| 4755 |
|
{ |
| 4756 |
|
$filter = array(); |
| 4757 |
|
} |
| 4758 |
|
//error_log(__METHOD__.__LINE__."->".print_r($filter,true).' folder:'.$folder.' Method:'.$_forceDeleteMethod); |
| 4759 |
|
$reverse = 1; |
| 4760 |
|
$rByUid = true; |
|
@@ 4882-4917 (lines=36) @@
|
| 4879 |
|
if (isset($_messageList['activeFilters']) && $_messageList['activeFilters']) |
| 4880 |
|
{ |
| 4881 |
|
$query = $_messageList['activeFilters']; |
| 4882 |
|
if (!empty($query['search']) || !empty($query['filter'])||($query['cat_id']=='bydate' && (!empty($query['startdate'])||!empty($query['enddate'])))) |
| 4883 |
|
{ |
| 4884 |
|
//([filterName] => Schnellsuche[type] => quick[string] => ebay[status] => any |
| 4885 |
|
if (is_null(Mail::$supportsORinQuery) || !isset(Mail::$supportsORinQuery[$this->mail_bo->profileID])) |
| 4886 |
|
{ |
| 4887 |
|
Mail::$supportsORinQuery = Api\Cache::getCache(Api\Cache::INSTANCE,'email','supportsORinQuery'.trim($GLOBALS['egw_info']['user']['account_id']), null, array(), 60*60*10); |
| 4888 |
|
if (!isset(Mail::$supportsORinQuery[$this->mail_bo->profileID])) Mail::$supportsORinQuery[$this->mail_bo->profileID]=true; |
| 4889 |
|
} |
| 4890 |
|
$filtered = true; |
| 4891 |
|
$cutoffdate = $cutoffdate2 = null; |
| 4892 |
|
if ($query['startdate']) $cutoffdate = Api\DateTime::to($query['startdate'],'ts');//SINCE, enddate |
| 4893 |
|
if ($query['enddate']) $cutoffdate2 = Api\DateTime::to($query['enddate'],'ts');//BEFORE, startdate |
| 4894 |
|
//error_log(__METHOD__.__LINE__.' Startdate:'.$cutoffdate2.' Enddate'.$cutoffdate); |
| 4895 |
|
$filter = array( |
| 4896 |
|
'filterName' => (Mail::$supportsORinQuery[$mail_ui->mail_bo->profileID]?lang('quicksearch'):lang('subject')), |
| 4897 |
|
'type' => ($query['cat_id']?$query['cat_id']:(Mail::$supportsORinQuery[$mail_ui->mail_bo->profileID]?'quick':'subject')), |
| 4898 |
|
'string' => $query['search'], |
| 4899 |
|
'status' => (!empty($query['filter'])?$query['filter']:'any'), |
| 4900 |
|
//'range'=>"BETWEEN",'since'=> date("d-M-Y", $cutoffdate),'before'=> date("d-M-Y", $cutoffdate2) |
| 4901 |
|
); |
| 4902 |
|
if ($query['enddate']||$query['startdate']) { |
| 4903 |
|
$filter['range'] = "BETWEEN"; |
| 4904 |
|
if ($cutoffdate) { |
| 4905 |
|
$filter[(empty($cutoffdate2)?'date':'since')] = date("d-M-Y", $cutoffdate); |
| 4906 |
|
if (empty($cutoffdate2)) $filter['range'] = "SINCE"; |
| 4907 |
|
} |
| 4908 |
|
if ($cutoffdate2) { |
| 4909 |
|
$filter[(empty($cutoffdate)?'date':'before')] = date("d-M-Y", $cutoffdate2); |
| 4910 |
|
if (empty($cutoffdate)) $filter['range'] = "BEFORE"; |
| 4911 |
|
} |
| 4912 |
|
} |
| 4913 |
|
} |
| 4914 |
|
else |
| 4915 |
|
{ |
| 4916 |
|
$filter = array(); |
| 4917 |
|
} |
| 4918 |
|
$reverse = 1; |
| 4919 |
|
$rByUid = true; |
| 4920 |
|
$_sR = $this->mail_bo->getSortedList( |