Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix deprecation warnings for permissions array in 5.71 #599

Merged
merged 1 commit into from
Mar 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 20 additions & 19 deletions CRM/Volunteer/Permission.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,43 +11,44 @@ class CRM_Volunteer_Permission {
* @return array Keyed by machine names with human-readable labels for values
*/
public static function getVolunteerPermissions() {
$prefix = ts('CiviVolunteer', array('domain' => 'org.civicrm.volunteer')) . ': ';
$domain = array('domain' => 'org.civicrm.volunteer');
$prefix = ts('CiviVolunteer', $domain) . ': ';
return array(
'register to volunteer' => array(
$prefix . ts('register to volunteer', array('domain' => 'org.civicrm.volunteer')),
ts('Access public-facing volunteer opportunity listings and registration forms', array('domain' => 'org.civicrm.volunteer')),
'label' => $prefix . ts('register to volunteer', $domain),
'description' => ts('Access public-facing volunteer opportunity listings and registration forms', $domain),
),
'log own hours' => array(
$prefix . ts('log own hours', array('domain' => 'org.civicrm.volunteer')),
ts('Access forms to self-report performed volunteer hours', array('domain' => 'org.civicrm.volunteer')),
'label' => $prefix . ts('log own hours', $domain),
'description' => ts('Access forms to self-report performed volunteer hours', $domain),
),
'create volunteer projects' => array(
$prefix . ts('create volunteer projects', array('domain' => 'org.civicrm.volunteer')),
ts('Create a new volunteer project record in CiviCRM', array('domain' => 'org.civicrm.volunteer')),
'label' => $prefix . ts('create volunteer projects', $domain),
'description' => ts('Create a new volunteer project record in CiviCRM', $domain),
),
'edit own volunteer projects' => array(
$prefix . ts('edit own volunteer projects', array('domain' => 'org.civicrm.volunteer')),
ts('Edit volunteer project records for which the user is specified as the Owner', array('domain' => 'org.civicrm.volunteer')),
'label' => $prefix . ts('edit own volunteer projects', $domain),
'description' => ts('Edit volunteer project records for which the user is specified as the Owner', $domain),
),
'edit all volunteer projects' => array(
$prefix . ts('edit all volunteer projects', array('domain' => 'org.civicrm.volunteer')),
ts('Edit all volunteer project records, regardless of ownership', array('domain' => 'org.civicrm.volunteer')),
'label' => $prefix . ts('edit all volunteer projects', $domain),
'description' => ts('Edit all volunteer project records, regardless of ownership', $domain),
),
'delete own volunteer projects' => array(
$prefix . ts('delete own volunteer projects', array('domain' => 'org.civicrm.volunteer')),
ts('Delete volunteer project records for which the user is specified as the Owner', array('domain' => 'org.civicrm.volunteer')),
'label' => $prefix . ts('delete own volunteer projects', $domain),
'description' => ts('Delete volunteer project records for which the user is specified as the Owner', $domain),
),
'delete all volunteer projects' => array(
$prefix . ts('delete all volunteer projects', array('domain' => 'org.civicrm.volunteer')),
ts('Delete any volunteer project record, regardless of ownership', array('domain' => 'org.civicrm.volunteer')),
'label' => $prefix . ts('delete all volunteer projects', $domain),
'description' => ts('Delete any volunteer project record, regardless of ownership', $domain),
),
'edit volunteer project relationships' => array(
$prefix . ts('edit volunteer project relationships', array('domain' => 'org.civicrm.volunteer')),
ts('Override system-wide default project relationships for a particular volunteer project', array('domain' => 'org.civicrm.volunteer')),
'label' => $prefix . ts('edit volunteer project relationships', $domain),
'description' => ts('Override system-wide default project relationships for a particular volunteer project', $domain),
),
'edit volunteer registration profiles' => array(
$prefix . ts('edit volunteer registration profiles', array('domain' => 'org.civicrm.volunteer')),
ts('Override system-wide default registration profiles for a particular volunteer project', array('domain' => 'org.civicrm.volunteer')),
'label' => $prefix . ts('edit volunteer registration profiles', $domain),
'description' => ts('Override system-wide default registration profiles for a particular volunteer project', $domain),
),
);
}
Expand Down