From 35b5e362a87b16235520dfd61fbf52158fdb25c8 Mon Sep 17 00:00:00 2001 From: Joey Smith Date: Mon, 27 Nov 2023 08:40:11 -0600 Subject: [PATCH 1/2] Signed-off-by: Joey Smith --- Sources/Theme.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/Theme.php b/Sources/Theme.php index 0fb1964361..827cc6c222 100644 --- a/Sources/Theme.php +++ b/Sources/Theme.php @@ -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)) { From 317229f449f6ef12c16d352f141b90a8eba6269b Mon Sep 17 00:00:00 2001 From: Joey Smith Date: Mon, 27 Nov 2023 08:50:21 -0600 Subject: [PATCH 2/2] Fixes several instances of property and const use Signed-off-by: Joey Smith Signed-off-by: Joey Smith --- Sources/Actions/Admin/Permissions.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Sources/Actions/Admin/Permissions.php b/Sources/Actions/Admin/Permissions.php index 28d534c9c2..cc28425745 100644 --- a/Sources/Actions/Admin/Permissions.php +++ b/Sources/Actions/Admin/Permissions.php @@ -1775,19 +1775,19 @@ 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; } @@ -1795,19 +1795,19 @@ public static function setPermissionLevel($level, $group, $profile = 'null'): vo 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; }