From 15a26c0f0f1eb12c5a8bdb29dbf550300f786e0a Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Wed, 1 Mar 2023 12:48:27 +1300 Subject: [PATCH] Pull over a few more deprecations + blockDelete deprecation --- CRM/Badge/BAO/Layout.php | 1 + CRM/Badge/Form/Layout.php | 2 +- CRM/Batch/BAO/EntityBatch.php | 1 + CRM/Case/BAO/CaseType.php | 1 + CRM/Contact/BAO/GroupContact.php | 3 ++- 5 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CRM/Badge/BAO/Layout.php b/CRM/Badge/BAO/Layout.php index a662445166..dd34add77a 100644 --- a/CRM/Badge/BAO/Layout.php +++ b/CRM/Badge/BAO/Layout.php @@ -92,6 +92,7 @@ class CRM_Badge_BAO_Layout extends CRM_Core_DAO_PrintLabel { * @deprecated */ public static function del($printLabelId) { + CRM_Core_Error::deprecatedFunctionWarning('deleteRecord'); self::deleteRecord(['id' => $printLabelId]); } diff --git a/CRM/Badge/Form/Layout.php b/CRM/Badge/Form/Layout.php index 90026c7fe3..661fb70ac3 100644 --- a/CRM/Badge/Form/Layout.php +++ b/CRM/Badge/Form/Layout.php @@ -164,7 +164,7 @@ class CRM_Badge_Form_Layout extends CRM_Admin_Form { */ public function postProcess() { if ($this->_action & CRM_Core_Action::DELETE) { - CRM_Badge_BAO_Layout::del($this->_id); + CRM_Badge_BAO_Layout::deleteRecord(['id' => $this->_id]); CRM_Core_Session::setStatus(ts('Selected badge layout has been deleted.'), ts('Record Deleted'), 'success'); return; } diff --git a/CRM/Batch/BAO/EntityBatch.php b/CRM/Batch/BAO/EntityBatch.php index 3f64e75b33..18fffa96fa 100644 --- a/CRM/Batch/BAO/EntityBatch.php +++ b/CRM/Batch/BAO/EntityBatch.php @@ -63,6 +63,7 @@ class CRM_Batch_BAO_EntityBatch extends CRM_Batch_DAO_EntityBatch { * @return CRM_Batch_DAO_EntityBatch */ public static function del($params) { + CRM_Core_Error::deprecatedFunctionWarning('deleteRecord'); if (!is_array($params)) { $params = ['id' => $params]; } diff --git a/CRM/Case/BAO/CaseType.php b/CRM/Case/BAO/CaseType.php index c3f7457864..8021fa1ea9 100644 --- a/CRM/Case/BAO/CaseType.php +++ b/CRM/Case/BAO/CaseType.php @@ -439,6 +439,7 @@ class CRM_Case_BAO_CaseType extends CRM_Case_DAO_CaseType implements \Civi\Core\ * @return CRM_Case_DAO_CaseType */ public static function del($caseTypeId) { + CRM_Core_Error::deprecatedFunctionWarning('deleteRecord'); return static::deleteRecord(['id' => $caseTypeId]); } diff --git a/CRM/Contact/BAO/GroupContact.php b/CRM/Contact/BAO/GroupContact.php index b058686ec8..22d8902d54 100644 --- a/CRM/Contact/BAO/GroupContact.php +++ b/CRM/Contact/BAO/GroupContact.php @@ -33,6 +33,7 @@ class CRM_Contact_BAO_GroupContact extends CRM_Contact_DAO_GroupContact implemen * @deprecated */ public static function add(array $params): CRM_Contact_DAO_GroupContact { + CRM_Core_Error::deprecatedFunctionWarning('writeRecord'); return self::writeRecord($params); } @@ -503,7 +504,7 @@ SELECT * // As of Aug 2020 it's not called from anywhere so we can remove the below code after some time CRM_Core_Error::deprecatedFunctionWarning('Use the GroupContact API'); - return self::add($params); + return self::writeRecord($params); } /** -- 2.25.1