From: Tim Otten Date: Fri, 5 Feb 2021 20:49:16 +0000 (-0800) Subject: Sort permission list by title. Make it easier to skim. X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=7efb95e746d50b700321541cefad0b35721599c0;p=civicrm-core.git Sort permission list by title. Make it easier to skim. --- diff --git a/CRM/Admin/Form/Navigation.php b/CRM/Admin/Form/Navigation.php index 3249beed8b..6a50bf5e65 100644 --- a/CRM/Admin/Form/Navigation.php +++ b/CRM/Admin/Form/Navigation.php @@ -57,7 +57,7 @@ class CRM_Admin_Form_Navigation extends CRM_Admin_Form { $getPerms = (array) \Civi\Api4\Permission::get(0) ->addWhere('group', 'IN', ['civicrm', 'cms', 'const']) - ->setOrderBy(['group' => 'ASC', 'name' => 'ASC']) + ->setOrderBy(['title' => 'ASC']) ->execute(); $permissions = []; foreach ($getPerms as $perm) { diff --git a/CRM/Report/Form/Instance.php b/CRM/Report/Form/Instance.php index 564f693b7a..224d404fc1 100644 --- a/CRM/Report/Form/Instance.php +++ b/CRM/Report/Form/Instance.php @@ -105,7 +105,7 @@ class CRM_Report_Form_Instance { $getPerms = \Civi\Api4\Permission::get(0) ->addWhere('is_active', '=', 1) ->addWhere('group', 'IN', ['civicrm', 'cms', 'const']) - ->setOrderBy(['group' => 'ASC', 'name' => 'ASC']) + ->setOrderBy(['title' => 'ASC']) ->execute(); $form->addElement('select', 'permission', diff --git a/ext/afform/admin/Civi/AfformAdmin/AfformAdminMeta.php b/ext/afform/admin/Civi/AfformAdmin/AfformAdminMeta.php index c2068cc189..fcf85c4af2 100644 --- a/ext/afform/admin/Civi/AfformAdmin/AfformAdminMeta.php +++ b/ext/afform/admin/Civi/AfformAdmin/AfformAdminMeta.php @@ -219,7 +219,7 @@ class AfformAdminMeta { $perms = \Civi\Api4\Permission::get() ->addWhere('group', 'IN', ['afformGeneric', 'const', 'civicrm', 'cms']) ->addWhere('is_active', '=', 1) - ->setOrderBy(['group' => 'ASC', 'name' => 'ASC']) + ->setOrderBy(['title' => 'ASC']) ->execute(); foreach ($perms as $perm) { $data['permissions'][] = [