From: eileen Date: Sat, 26 Oct 2019 02:54:58 +0000 (+1300) Subject: Follow up cleanup X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=b27fe371670f84e81dbc0096e7a802771b4ba5ce;p=civicrm-core.git Follow up cleanup --- diff --git a/CRM/Case/BAO/Query.php b/CRM/Case/BAO/Query.php index f6b4373975..ab0b554574 100644 --- a/CRM/Case/BAO/Query.php +++ b/CRM/Case/BAO/Query.php @@ -442,6 +442,7 @@ class CRM_Case_BAO_Query extends CRM_Core_BAO_Query { case 'case_from_start_date_low': case 'case_from_start_date_high': + CRM_Core_Error::deprecatedFunctionWarning('case_from is deprecated'); $query->dateQueryBuilder($values, 'civicrm_case', 'case_from_start_date', 'start_date', 'Start Date' ); @@ -449,6 +450,7 @@ class CRM_Case_BAO_Query extends CRM_Core_BAO_Query { case 'case_to_end_date_low': case 'case_to_end_date_high': + CRM_Core_Error::deprecatedFunctionWarning('case_to is deprecated'); $query->dateQueryBuilder($values, 'civicrm_case', 'case_to_end_date', 'end_date', 'End Date' ); diff --git a/CRM/Contact/BAO/Query.php b/CRM/Contact/BAO/Query.php index 6f7cc442d6..4aad9a2635 100644 --- a/CRM/Contact/BAO/Query.php +++ b/CRM/Contact/BAO/Query.php @@ -1601,22 +1601,12 @@ class CRM_Contact_BAO_Query { if ( !in_array($id, $nonLegacyDateFields) && ( preg_match('/_date_relative$/', $id) || - $id == 'event_relative' || - $id == 'case_from_relative' || - $id == 'case_to_relative') + $id == 'event_relative') ) { if ($id == 'event_relative') { $fromRange = 'event_start_date_low'; $toRange = 'event_end_date_high'; } - elseif ($id == 'case_from_relative') { - $fromRange = 'case_from_start_date_low'; - $toRange = 'case_from_start_date_high'; - } - elseif ($id == 'case_to_relative') { - $fromRange = 'case_to_end_date_low'; - $toRange = 'case_to_end_date_high'; - } else { $dateComponent = explode('_date_relative', $id); $fromRange = "{$dateComponent[0]}_date_low"; @@ -1688,9 +1678,7 @@ class CRM_Contact_BAO_Query { elseif ( !in_array($id, $nonLegacyDateFields) && ( preg_match('/_date_relative$/', $id) || - $id == 'event_relative' || - $id == 'case_from_relative' || - $id == 'case_to_relative') + $id == 'event_relative') ) { // Already handled in previous loop continue; diff --git a/CRM/Contact/BAO/SavedSearch.php b/CRM/Contact/BAO/SavedSearch.php index 396cb3826a..e53b6bf5fd 100644 --- a/CRM/Contact/BAO/SavedSearch.php +++ b/CRM/Contact/BAO/SavedSearch.php @@ -95,10 +95,6 @@ class CRM_Contact_BAO_SavedSearch extends CRM_Contact_DAO_SavedSearch { $specialDateFields = [ 'event_start_date_low' => 'event_date_low', 'event_end_date_high' => 'event_date_high', - 'case_from_start_date_low' => 'case_from_date_low', - 'case_from_start_date_high' => 'case_from_date_high', - 'case_to_end_date_low' => 'case_to_date_low', - 'case_to_end_date_high' => 'case_to_date_high', ]; $fv = CRM_Core_DAO::getFieldValue('CRM_Contact_DAO_SavedSearch', $id, 'form_values'); @@ -402,8 +398,6 @@ LEFT JOIN civicrm_email ON (contact_a.id = civicrm_email.contact_id AND civicrm_ $relativeDates = ['relative_dates' => []]; $specialDateFields = [ 'event_relative', - 'case_from_relative', - 'case_to_relative', 'participant_relative', 'log_date_relative', 'birth_date_relative',