From 8c2823152b359238b13673b930c76bf0c9befebb Mon Sep 17 00:00:00 2001 From: eileenmcnaugton Date: Tue, 25 Aug 2015 17:57:54 +1200 Subject: [PATCH] CRM-17003 previous commit caused wrong formatting in access tab on report The issue appeared to be that the re-formatting of administer multisite is happening after the re-formatting dependent on the parameter being passed in. The function doing the reformatting is apparently only called from that function so we could move the description processing to the calling function. NB - need to grep wordpress, joomla, drupal dirs for that fn before making the change I guess, Or we could just do the stuff twice to be safe --- CRM/Core/Permission.php | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/CRM/Core/Permission.php b/CRM/Core/Permission.php index 05f744c0ee..2518b47809 100644 --- a/CRM/Core/Permission.php +++ b/CRM/Core/Permission.php @@ -594,6 +594,11 @@ class CRM_Core_Permission { $permissions['administer Multiple Organizations'] = array($prefix . ts('administer Multiple Organizations')); } + if (!$descriptions) { + foreach ($permissions as $name => $attr) { + $permissions[$name] = array_shift($attr); + } + } if (!$all) { $components = CRM_Core_Component::getEnabledComponents(); } @@ -664,7 +669,7 @@ class CRM_Core_Permission { * * @return array */ - public static function getCorePermissions($descriptions = FALSE) { + public static function getCorePermissions() { $prefix = ts('CiviCRM') . ': '; $permissions = array( 'add contacts' => array( @@ -840,12 +845,6 @@ class CRM_Core_Permission { ), ); - if (!$descriptions) { - foreach ($permissions as $name => $attr) { - $permissions[$name] = array_shift($attr); - } - } - return $permissions; } -- 2.25.1