From: eileenmcnaugton Date: Tue, 25 Aug 2015 05:57:54 +0000 (+1200) Subject: CRM-17003 previous commit caused wrong formatting in access tab on report X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=8c2823152b359238b13673b930c76bf0c9befebb;p=civicrm-core.git 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 --- 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; }