X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FCore%2FPermission%2FDrupal.php;h=9c0bbdee78c9da83c4917da2bfb1efe4964cdb64;hb=518fa0ee1556723e8e67e02a59e8e7f51ed76f6b;hp=060c5f2df1266ef60c51884de3bd60937434edbe;hpb=a7e974f985f73948c0a4b6cfeefb66798ba91c0a;p=civicrm-core.git diff --git a/CRM/Core/Permission/Drupal.php b/CRM/Core/Permission/Drupal.php index 060c5f2df1..9c0bbdee78 100644 --- a/CRM/Core/Permission/Drupal.php +++ b/CRM/Core/Permission/Drupal.php @@ -61,7 +61,6 @@ class CRM_Core_Permission_Drupal extends CRM_Core_Permission_DrupalBase { protected $_viewPermissionedGroups; protected $_editPermissionedGroups; - /** * Given a permission string, check for access requirements * @@ -74,10 +73,10 @@ class CRM_Core_Permission_Drupal extends CRM_Core_Permission_DrupalBase { * true if yes, else false */ public function check($str, $userId = NULL) { - $str = $this->translatePermission($str, 'Drupal', array( + $str = $this->translatePermission($str, 'Drupal', [ 'view user account' => 'access user profiles', 'administer users' => 'administer users', - )); + ]); if ($str == CRM_Core_Permission::ALWAYS_DENY_PERMISSION) { return FALSE; } @@ -146,13 +145,13 @@ class CRM_Core_Permission_Drupal extends CRM_Core_Permission_DrupalBase { * a comma separated list of email addresses */ public function permissionEmails($permissionName) { - static $_cache = array(); + static $_cache = []; if (isset($_cache[$permissionName])) { return $_cache[$permissionName]; } - $uids = array(); + $uids = []; $sql = " SELECT {users}.uid, {role_permission}.permission FROM {users}