From 14c6a0a4af67323b4243d507a69e054d35d6ea2a Mon Sep 17 00:00:00 2001 From: uid42062 Date: Wed, 4 Jul 2001 23:33:02 +0000 Subject: [PATCH] Various updates for message.php and others git-svn-id: file:///svn/phpbb/trunk@560 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/index.php | 28 ++++++++-------------------- 1 file changed, 8 insertions(+), 20 deletions(-) diff --git a/phpBB/index.php b/phpBB/index.php index 9c4227e044..8e2ecbfeda 100644 --- a/phpBB/index.php +++ b/phpBB/index.php @@ -68,7 +68,7 @@ if($userdata['user_id'] != ANONYMOUS) WHERE topic_time > $last_update_time"; if(!$s_topic_times = $db->sql_query($sql)) { - error_die(SQL_QUERY, "Could not query topic times.", __LINE__, __FILE__); + message_die(SQL_QUERY, "Could not query topic times.", __LINE__, __FILE__); } if($db->sql_numrows($s_topic_times)) @@ -85,7 +85,7 @@ if($userdata['user_id'] != ANONYMOUS) WHERE user_id = " . $userdata['user_id']; if(!$s_topic_times = $db->sql_query($sql)) { - error_die(SQL_QUERY, "Could not update user topics list.", __LINE__, __FILE__); + message_die(SQL_QUERY, "Could not update user topics list.", __LINE__, __FILE__); } } } @@ -121,7 +121,7 @@ $sql = "SELECT c.cat_id, c.cat_title, c.cat_order ORDER BY c.cat_order"; if(!$q_categories = $db->sql_query($sql)) { - error_die(SQL_QUERY, "Could not query categories list.", __LINE__, __FILE__); + message_die(GENERAL_ERROR, "Could not query categories list", "", __LINE__, __FILE__, $sql); } $total_categories = $db->sql_numrows(); @@ -184,15 +184,7 @@ if($total_categories) if(!$q_forums = $db->sql_query($sql)) { - if(DEBUG) - { - $error = $db->sql_error(); - error_die(SQL_QUERY, "Could not query forums information.
Reason: ".$error['message']."
Query: $sql", __LINE__, __FILE__); - } - else - { - error_die(SQL_QUERY, "Could not query forums information.", __LINE__, __FILE__); - } + message_die(GENERAL_ERROR, "Could not query forums information", "", __LINE__, __FILE__, $sql); } $total_forums = $db->sql_numrows($q_forums); $forum_rows = $db->sql_fetchrowset($q_forums); @@ -206,11 +198,11 @@ if($total_categories) WHERE aa.forum_id = f.forum_id AND aa.auth_mod = " . TRUE . " AND ug.group_id = aa.group_id - AND u.user_id = ug.user_id + AND u.user_id = ug.user_id ORDER BY f.forum_id, u.user_id"; if(!$q_forum_mods = $db->sql_query($sql)) { - error_die(SQL_QUERY, "Could not query forum moderator information.", __LINE__, __FILE__); + message_die(GENERAL_ERROR, "Could not query forum moderator information", "", __LINE__, __FILE__, $sql); } $forum_mods_list = $db->sql_fetchrowset($q_forum_mods); @@ -241,7 +233,6 @@ if($total_categories) if( $is_auth_ary[$forum_id]['auth_view'] && ( ($forum_rows[$j]['cat_id'] == $cat_id && $viewcat == -1) || $cat_id == $viewcat) ) { - if(!$gen_cat[$cat_id]) { $template->assign_block_vars("catrow", array( @@ -287,14 +278,11 @@ if($total_categories) $last_post .= "" . $last_poster . " "; $last_post .= "\"View"; - } else { - - $last_post = "No Posts"; + $last_post = $lang['No_Posts']; $forum_rows[$j]['forum_name'] = stripslashes($forum_rows[$j]['forum_name']); - } unset($moderators_links); @@ -351,7 +339,7 @@ if($total_categories) }// if ... total_categories else { - error_die(GENERAL_ERROR, "There are no Categories or Forums on this board."); + message_die(GENERAL_MESSAGE, "There are no Categories or Forums on this board", "", __LINE__, __FILE__, $sql); } $template->pparse("body");