Skip to content

Commit ec919f0

Browse files
committed
fix naming of default mode
1 parent 22aed4f commit ec919f0

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

modules/groups-roles/groups_roles.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
*
1010
* Parameters:
1111
*
12-
* mode - card : (Default) Show all groups and roles in card view
12+
* mode - cards : (Default) Show all groups and roles in card view
1313
* - permissions : Show permissions of all groups and roles in list view
1414
* - edit : Show dialog to create or edit a role.
1515
* - save : Save data of role form dialog
@@ -36,7 +36,7 @@
3636
require_once(__DIR__ . '/../../system/common.php');
3737

3838
// Initialize and check the parameters
39-
$getMode = admFuncVariableIsValid($_GET, 'mode', 'string', array('defaultValue' => 'card', 'validValues' => array('card', 'permissions', 'edit', 'save', 'delete', 'activate', 'deactivate', 'export')));
39+
$getMode = admFuncVariableIsValid($_GET, 'mode', 'string', array('defaultValue' => 'cards', 'validValues' => array('cards', 'permissions', 'edit', 'save', 'delete', 'activate', 'deactivate', 'export')));
4040
$getCategoryUUID = admFuncVariableIsValid($_GET, 'cat_uuid', 'uuid');
4141
$getRoleUUID = admFuncVariableIsValid($_GET, 'role_uuid', 'uuid');
4242
$getRoleType = admFuncVariableIsValid($_GET, 'role_type', 'int', array('defaultValue' => 1));
@@ -46,14 +46,14 @@
4646
throw new Exception('SYS_MODULE_DISABLED');
4747
}
4848

49-
if ($getMode !== 'card') {
49+
if ($getMode !== 'cards') {
5050
// only users with the special right are allowed to manage roles
5151
if (!$gCurrentUser->isAdministratorRoles()) {
5252
throw new Exception('SYS_NO_RIGHTS');
5353
}
5454
}
5555

56-
if (in_array($getMode, array('card', 'permissions'))) {
56+
if (in_array($getMode, array('cards', 'permissions'))) {
5757
// set headline
5858
switch ($getRoleType) {
5959
case GroupsRolesPresenter::ROLE_TYPE_INACTIVE:
@@ -85,7 +85,7 @@
8585
$headline .= ' - ' . $category->getValue('cat_name');
8686
}
8787

88-
if ($getMode === 'card') {
88+
if ($getMode === 'cards') {
8989
// Navigation of the module starts here
9090
$gNavigation->addStartUrl(CURRENT_URL, $headline, 'bi-people-fill');
9191
} else {
@@ -117,7 +117,7 @@
117117
}
118118

119119
switch ($getMode) {
120-
case 'card':
120+
case 'cards':
121121
$groupsRoles->createCards($getCategoryUUID, $getRoleType);
122122
$groupsRoles->show();
123123
break;

0 commit comments

Comments
 (0)