diff options
author | James Atkinson <thefinn@users.sourceforge.net> | 2001-02-25 01:22:36 +0000 |
---|---|---|
committer | James Atkinson <thefinn@users.sourceforge.net> | 2001-02-25 01:22:36 +0000 |
commit | ead4422667100b087c68b95164185feffc43336c (patch) | |
tree | a1b3ed58650800e968a98ed4ce02e431749f3c54 | |
parent | 04978aa04408e988fd39bc1495b7536b47e3f66c (diff) | |
download | forums-ead4422667100b087c68b95164185feffc43336c.tar forums-ead4422667100b087c68b95164185feffc43336c.tar.gz forums-ead4422667100b087c68b95164185feffc43336c.tar.bz2 forums-ead4422667100b087c68b95164185feffc43336c.tar.xz forums-ead4422667100b087c68b95164185feffc43336c.zip |
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
-rw-r--r-- | phpBB/db/mysql_schema.sql | 1 | ||||
-rw-r--r-- | phpBB/functions/error.php | 6 | ||||
-rw-r--r-- | phpBB/index.php | 4 |
3 files changed, 11 insertions, 0 deletions
diff --git a/phpBB/db/mysql_schema.sql b/phpBB/db/mysql_schema.sql index 6bf3a54686..fbebc990a4 100644 --- a/phpBB/db/mysql_schema.sql +++ b/phpBB/db/mysql_schema.sql @@ -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', diff --git a/phpBB/functions/error.php b/phpBB/functions/error.php index acfce126c2..29a985c714 100644 --- a/phpBB/functions/error.php +++ b/phpBB/functions/error.php @@ -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"]; diff --git a/phpBB/index.php b/phpBB/index.php index f7f9cdb580..b5716bc6b6 100644 --- a/phpBB/index.php +++ b/phpBB/index.php @@ -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); |