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

General fixes #7920

Merged
merged 2 commits into from
Nov 27, 2023
Merged
Show file tree
Hide file tree
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
16 changes: 8 additions & 8 deletions Sources/Actions/Admin/Permissions.php
Original file line number Diff line number Diff line change
Expand Up @@ -1775,39 +1775,39 @@ public static function setPermissionLevel($level, $group, $profile = 'null'): vo
foreach (self::getPermissions() as $permission => $perm_info) {
if (isset($perm_info['group_level'])) {
switch ($perm_info['group_level']) {
case GROUP_LEVEL_RESTRICT:
case self::GROUP_LEVEL_RESTRICT:
$group_levels[$perm_info['scope']]['restrict'][] = $permission;
// no break

case GROUP_LEVEL_STANDARD:
case self::GROUP_LEVEL_STANDARD:
$group_levels[$perm_info['scope']]['standard'][] = $permission;
// no break

case GROUP_LEVEL_MODERATOR:
case self::GROUP_LEVEL_MODERATOR:
$group_levels[$perm_info['scope']]['moderator'][] = $permission;
// no break

case GROUP_LEVEL_MAINTENANCE:
case self::GROUP_LEVEL_MAINTENANCE:
$group_levels[$perm_info['scope']]['maintenance'][] = $permission;
break;
}
}

if (isset($perm_info['board_level'])) {
switch ($perm_info['board_level']) {
case BOARD_LEVEL_STANDARD:
case self::BOARD_LEVEL_STANDARD:
$group_levels[$perm_info['scope']]['standard'][] = $permission;
// no break

case BOARD_LEVEL_LOCKED:
case self::BOARD_LEVEL_LOCKED:
$group_levels[$perm_info['scope']]['locked'][] = $permission;
// no break

case BOARD_LEVEL_PUBLISH:
case self::BOARD_LEVEL_PUBLISH:
$group_levels[$perm_info['scope']]['publish'][] = $permission;
// no break

case BOARD_LEVEL_FREE:
case self::BOARD_LEVEL_FREE:
$group_levels[$perm_info['scope']]['free'][] = $permission;
break;
}
Expand Down
4 changes: 2 additions & 2 deletions Sources/Theme.php
Original file line number Diff line number Diff line change
Expand Up @@ -1995,12 +1995,12 @@ public static function pickTheme()
// -1 means we are setting the forum's default theme.
if ($_REQUEST['u'] === -1) {
Config::updateModSettings(['theme_guests' => $id_theme]);
Utils::redirectexit('action=admin;area=theme;sa=admin;' . $context['session_var'] . '=' . $context['session_id']);
Utils::redirectexit('action=admin;area=theme;sa=admin;' . Utils::$context['session_var'] . '=' . Utils::$context['session_id']);
}
// 0 means we are resetting everyone's theme.
elseif ($_REQUEST['u'] === 0) {
User::updateMemberData(null, ['id_theme' => $id_theme]);
Utils::redirectexit('action=admin;area=theme;sa=admin;' . $context['session_var'] . '=' . $context['session_id']);
Utils::redirectexit('action=admin;area=theme;sa=admin;' . Utils::$context['session_var'] . '=' . Utils::$context['session_id']);
}
// Setting a particular user's theme.
elseif (self::canPickTheme($_REQUEST['u'], $id_theme)) {
Expand Down
Loading