Skip to content

Commit

Permalink
Merge pull request #7920 from Tyrsson/general-fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Sesquipedalian authored Nov 27, 2023
2 parents 2f9077c + 317229f commit beb39bc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
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

0 comments on commit beb39bc

Please sign in to comment.