From c727491aecbf32a2a020a121f2aa79fe6d3283ed Mon Sep 17 00:00:00 2001 From: flashwave Date: Tue, 10 Jul 2018 03:04:44 +0200 Subject: [PATCH] Made manage sections default to their actual default pages. --- public/manage/changelog.php | 1 + public/manage/forums.php | 1 + public/manage/index.php | 5 +---- public/manage/users.php | 1 + 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/public/manage/changelog.php b/public/manage/changelog.php index 1f1ef6c3..cf6c3b1d 100644 --- a/public/manage/changelog.php +++ b/public/manage/changelog.php @@ -11,6 +11,7 @@ $changelogPerms = perms_get_user(MSZ_PERMS_CHANGELOG, $app->getUserId()); $queryOffset = (int)($_GET['o'] ?? 0); switch ($_GET['v'] ?? null) { + default: case 'changes': if (!perms_check($changelogPerms, MSZ_CHANGELOG_PERM_MANAGE_CHANGES)) { echo render_error(403); diff --git a/public/manage/forums.php b/public/manage/forums.php index 485f9b32..d08529a2 100644 --- a/public/manage/forums.php +++ b/public/manage/forums.php @@ -2,6 +2,7 @@ require_once __DIR__ . '/../../misuzu.php'; switch ($_GET['v'] ?? null) { + default: case 'listing': echo 'forum listing here'; break; diff --git a/public/manage/index.php b/public/manage/index.php index c479764b..eb04a280 100644 --- a/public/manage/index.php +++ b/public/manage/index.php @@ -4,6 +4,7 @@ require_once __DIR__ . '/../../misuzu.php'; $templating = $app->getTemplating(); switch ($_GET['v'] ?? null) { + default: case 'overview': echo $templating->render('@manage.general.overview'); break; @@ -19,8 +20,4 @@ switch ($_GET['v'] ?? null) { case 'settings': echo 'somewhat soon i guess'; break; - - default: - header('Location: ?v=overview'); - break; } diff --git a/public/manage/users.php b/public/manage/users.php index 992ba6bd..468b84d8 100644 --- a/public/manage/users.php +++ b/public/manage/users.php @@ -18,6 +18,7 @@ $tpl->vars([ ]); switch ($_GET['v'] ?? null) { + default: case 'listing': if (!$canManageUsers && !$canManagePerms) { echo render_error(403);