Forum: better error messages (Suggested by @anyeor)

This commit is contained in:
slawkens
2023-07-07 14:34:26 +02:00
parent df321154f6
commit 34725e0257
9 changed files with 83 additions and 44 deletions

View File

@@ -29,8 +29,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.';