Navigation - Add deprecation notice and remove redundant serialization
authorcolemanw <coleman@civicrm.org>
Sat, 14 Oct 2023 21:09:01 +0000 (17:09 -0400)
committercolemanw <coleman@civicrm.org>
Sat, 14 Oct 2023 21:09:01 +0000 (17:09 -0400)
CRM/Core/BAO/Navigation.php

index c9a4c61202aab3bb294891f2107ae435bba7f04a..f81e4fa2582a31f1ca3768ba47998daa9422fc4a 100644 (file)
@@ -97,10 +97,6 @@ class CRM_Core_BAO_Navigation extends CRM_Core_DAO_Navigation {
       $params['weight'] = self::calculateWeight(CRM_Utils_Array::value('parent_id', $params));
     }
 
-    if (array_key_exists('permission', $params) && is_array($params['permission'])) {
-      $params['permission'] = implode(',', $params['permission']);
-    }
-
     return self::writeRecord($params);
   }
 
@@ -594,6 +590,7 @@ ORDER BY weight";
    * @deprecated  - use API
    */
   public static function processRename($nodeID, $label) {
+    CRM_Core_Error::deprecatedFunctionWarning('writeRecord');
     self::writeRecord(['id' => $nodeID, 'label' => $label]);
   }
 
@@ -604,6 +601,7 @@ ORDER BY weight";
    * @deprecated - use API
    */
   public static function processDelete($nodeID) {
+    CRM_Core_Error::deprecatedFunctionWarning('writeRecord');
     self::deleteRecord(['id' => $nodeID]);
   }