From a963992d5ff67edc34fec6cb994c4d9dcaad8e18 Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Thu, 29 Apr 2021 11:59:46 -0400 Subject: [PATCH] Add deprected warning to apparently unused functions It looks like one check function is only ever called by the other, and the other isn't called from anywhere. What these functions are supposed to do is unclear. The code comment appears to be wrong; the variable $str is not a permission string but is inserted into a query as civicrm_acl.object_table. --- CRM/ACL/API.php | 1 + CRM/ACL/BAO/ACL.php | 1 + 2 files changed, 2 insertions(+) diff --git a/CRM/ACL/API.php b/CRM/ACL/API.php index 17982fb7ba..19c71c7924 100644 --- a/CRM/ACL/API.php +++ b/CRM/ACL/API.php @@ -40,6 +40,7 @@ class CRM_ACL_API { * true if yes, else false */ public static function check($str, $contactID = NULL) { + \CRM_Core_Error::deprecatedWarning(__CLASS__ . '::' . __FUNCTION__ . ' is deprecated.'); if ($contactID == NULL) { $contactID = CRM_Core_Session::getLoggedInContactID(); } diff --git a/CRM/ACL/BAO/ACL.php b/CRM/ACL/BAO/ACL.php index aecd6a40cf..6eb5d2fdca 100644 --- a/CRM/ACL/BAO/ACL.php +++ b/CRM/ACL/BAO/ACL.php @@ -190,6 +190,7 @@ SELECT acl.* * @return bool */ public static function check($str, $contactID) { + \CRM_Core_Error::deprecatedWarning(__CLASS__ . '::' . __FUNCTION__ . ' is deprecated.'); $acls = CRM_ACL_BAO_Cache::build($contactID); -- 2.25.1