From 97c76902f27d9b68bb843e8fc1234b700960134b Mon Sep 17 00:00:00 2001 From: Jamie McClelland Date: Wed, 24 Jul 2024 11:05:40 -0400 Subject: [PATCH] use new permission format --- elections.php | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/elections.php b/elections.php index 1721182..11b50d1 100644 --- a/elections.php +++ b/elections.php @@ -493,16 +493,14 @@ function addPlaceholderTokenValues($tokens, $customToken, $cids, &$values) { * */ function elections_civicrm_permission(&$permissions) { - $permissions += array( - 'administer Elections' => array( - ts('CiviCRM: administer elections', array('domain' => 'au.com.agileware.elections')), - ts('Grants the necessary permissions for administrating elections in CiviCRM.', array('domain' => 'au.com.agileware.elections')), - ), - 'view Elections' => array( - ts('CiviCRM: view elections', array('domain' => 'au.com.agileware.elections')), - ts('Grants the necessary permissions for participating in elections.', array('domain' => 'au.com.agileware.elections')), - ), - ); + $permissions['administer Elections'] = [ + 'label' => E::ts('CiviCRM: administer elections'), + 'description' => E::ts('Grants the necessary permissions for administrating elections in CiviCRM.'), + ]; + $permissions['view Elections'] = [ + 'label' => E::ts('CiviCRM: view elections'), + 'description' => E::ts('Grants the necessary permissions for participating in elections.'), + ]; } /**