Pull over a few more deprecations + blockDelete deprecation
authorEileen McNaughton <emcnaughton@wikimedia.org>
Tue, 28 Feb 2023 23:48:27 +0000 (12:48 +1300)
committerEileen McNaughton <emcnaughton@wikimedia.org>
Tue, 28 Feb 2023 23:48:27 +0000 (12:48 +1300)
CRM/Badge/BAO/Layout.php
CRM/Badge/Form/Layout.php
CRM/Batch/BAO/EntityBatch.php
CRM/Case/BAO/CaseType.php
CRM/Contact/BAO/GroupContact.php

index a662445166bfc70642375e51c406d7f8ef98dec1..dd34add77a4f53a18cc21196fc3ee618e751233b 100644 (file)
@@ -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]);
   }
 
index 90026c7fe3f13446c460cb7b69f97279a3a94f7f..661fb70ac3b586167959edfcf34629591519106c 100644 (file)
@@ -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;
     }
index 3f64e75b33afbdfab797c8db9ed18c6fb0ab4107..18fffa96fac6413c2b9314f969f75cc8002030c1 100644 (file)
@@ -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];
     }
index c3f745786464071564ecf7b89c2d17507c312faa..8021fa1ea96f039a8695cae98f65844bc4761f9d 100644 (file)
@@ -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]);
   }
 
index b058686ec85d0cffcdb0a8a4102843c15ef1de10..22d8902d5463290eca7d254787e16250d8f07c11 100644 (file)
@@ -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);
   }
 
   /**