X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FCore%2FPermission%2FDrupal.php;h=9c0bbdee78c9da83c4917da2bfb1efe4964cdb64;hb=518fa0ee1556723e8e67e02a59e8e7f51ed76f6b;hp=03b8ed6eda22c87a47831bd9161207b336bc78a0;hpb=635c3d95801cb976cebd969c63e6aa3b82e74f1e;p=civicrm-core.git diff --git a/CRM/Core/Permission/Drupal.php b/CRM/Core/Permission/Drupal.php index 03b8ed6eda..9c0bbdee78 100644 --- a/CRM/Core/Permission/Drupal.php +++ b/CRM/Core/Permission/Drupal.php @@ -3,7 +3,7 @@ +--------------------------------------------------------------------+ | CiviCRM version 5 | +--------------------------------------------------------------------+ - | Copyright CiviCRM LLC (c) 2004-2018 | + | Copyright CiviCRM LLC (c) 2004-2019 | +--------------------------------------------------------------------+ | This file is a part of CiviCRM. | | | @@ -28,7 +28,7 @@ /** * * @package CRM - * @copyright CiviCRM LLC (c) 2004-2018 + * @copyright CiviCRM LLC (c) 2004-2019 * $Id$ * */ @@ -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}