use HTTP status codes with error messages

This commit is contained in:
Shish
2012-02-16 15:37:05 +00:00
parent 5fc7d6e574
commit af7704825b
17 changed files with 59 additions and 63 deletions

View File

@@ -109,7 +109,7 @@ class Forum extends Extension {
if($hasErrors)
{
$this->theme->display_error($page, "Error", $errors);
$this->theme->display_error(500, "Error", $errors);
$this->theme->display_new_thread_composer($page, $_POST["message"], $_POST["title"], false);
break;
}
@@ -149,7 +149,7 @@ class Forum extends Extension {
if ($hasErrors)
{
$this->theme->display_error($page, "Error", $errors);
$this->theme->display_error(500, "Error", $errors);
$this->theme->display_new_post_composer($page, $_POST["threadID"], $_POST["message"], $_POST["title"], false);
break;
}
@@ -166,7 +166,7 @@ class Forum extends Extension {
{
$page->set_mode("redirect");
$page->set_redirect(make_link("forum/index"));
//$this->theme->display_error($page, "Invalid action", "You should check forum/index.");
//$this->theme->display_error(400, "Invalid action", "You should check forum/index.");
break;
}
}