Forum: better error messages (Suggested by @anyeor)

This commit is contained in:
slawkens
2023-07-07 14:34:26 +02:00
parent c392fa7272
commit 8cf0e80019
9 changed files with 82 additions and 42 deletions

View File

@@ -31,8 +31,12 @@ if(Forum::isModerator())
header('Location: ' . getForumThreadLink($post['first_post'], (int) $_page));
}
}
else
echo 'Post with ID ' . $id . ' does not exist.';
else {
$errors[] = 'Post with ID ' . $id . ' does not exist.';
displayErrorBoxWithBackButton($errors, getLink('forum'));
}
}
else {
$errors[] = 'You are not logged in or you are not moderator.';
displayErrorBoxWithBackButton($errors, getLink('forum'));
}
else
echo 'You are not logged in or you are not moderator.';