mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-07 20:08:53 +00:00
A forum with no forums/cats now shows a nice message insted of a big ugly messed up template
git-svn-id: file:///svn/phpbb/trunk@56 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
04978aa044
commit
ead4422667
3 changed files with 11 additions and 0 deletions
|
@ -253,6 +253,7 @@ CREATE TABLE phpbb_topics (
|
|||
topic_poster int(10) DEFAULT '0' NOT NULL,
|
||||
topic_time int(10) DEFAULT '0' NOT NULL,
|
||||
topic_views int(10) DEFAULT '0' NOT NULL,
|
||||
topic_replies int(10) DEFAULT '0' NOT NULL,
|
||||
forum_id int(10) DEFAULT '0' NOT NULL,
|
||||
topic_status tinyint(3) DEFAULT '0' NOT NULL,
|
||||
topic_notify tinyint(3) DEFAULT '0',
|
||||
|
|
|
@ -34,6 +34,12 @@ function error_die($db, $error_code = "", $error_msg = "")
|
|||
{
|
||||
switch($error_code)
|
||||
{
|
||||
case GENERAL_ERROR:
|
||||
if(!$error_msg)
|
||||
{
|
||||
$error_msg = "An Error Occured";
|
||||
}
|
||||
break;
|
||||
case SQL_CONNECT:
|
||||
$db_error = $db->sql_error();
|
||||
$error_msg = "Error: phpBB could not connect to the database. Reason: " . $db_error["message"];
|
||||
|
|
|
@ -175,6 +175,10 @@ if($total_categories)
|
|||
} // for ... categories
|
||||
|
||||
}// if ... total_categories
|
||||
else
|
||||
{
|
||||
error_die($db, GENERAL_ERROR, "There are no Categories or Foums on this board.");
|
||||
}
|
||||
$template->pparse("output", "body");
|
||||
|
||||
include('page_tail.'.$phpEx);
|
||||
|
|
Loading…
Add table
Reference in a new issue