From 52544a73858205d7aad76d5ca61390a2d4fbd809 Mon Sep 17 00:00:00 2001 From: James Atkinson Date: Fri, 23 Feb 2001 20:34:43 +0000 Subject: View forum page is started. Need private forum checking git-svn-id: file:///svn/phpbb/trunk@34 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/functions/error.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'phpBB/functions/error.php') diff --git a/phpBB/functions/error.php b/phpBB/functions/error.php index e4277883a2..6b53da1838 100644 --- a/phpBB/functions/error.php +++ b/phpBB/functions/error.php @@ -24,6 +24,7 @@ function error_die($db, $error_code = "", $error_msg = "") { + global $template, $phpEx; if(!$error_msg) { switch($error_code) @@ -42,10 +43,15 @@ function error_die($db, $error_code = "", $error_msg = "") case SESSION_CREATE: $error_msg = "Error creating session. Could not log you in. Please go back and try again."; break; + case NO_POSTS: + $error_msg = "There are no posts in this forum. Click on the 'Post New Topic' link on this page to post one."; } } - - die($error_msg); + $template->set_file(array("error_body" => "error_body.tpl")); + $template->set_var(array("ERROR_MESSAGE" => $error_msg)); + $template->pparse("output", "error_body"); + include('page_tail.'.$phpEx); + exit(); } -- cgit v1.2.1