diff options
| author | James Atkinson <thefinn@users.sourceforge.net> | 2001-05-25 07:02:48 +0000 |
|---|---|---|
| committer | James Atkinson <thefinn@users.sourceforge.net> | 2001-05-25 07:02:48 +0000 |
| commit | 7ab6eaf3de7bbe47e70d8925464d6118c9d605e8 (patch) | |
| tree | 983bd5981f5c7a46429a22b81bc43016496c33e2 /phpBB/viewtopic.php | |
| parent | cbed447842b9c7ceb3bc844862412fe0472e3dd9 (diff) | |
| download | forums-7ab6eaf3de7bbe47e70d8925464d6118c9d605e8.tar forums-7ab6eaf3de7bbe47e70d8925464d6118c9d605e8.tar.gz forums-7ab6eaf3de7bbe47e70d8925464d6118c9d605e8.tar.bz2 forums-7ab6eaf3de7bbe47e70d8925464d6118c9d605e8.tar.xz forums-7ab6eaf3de7bbe47e70d8925464d6118c9d605e8.zip | |
Users sigs display correctly.
Some minor improvments to posting...still LOTS to be done
git-svn-id: file:///svn/phpbb/trunk@326 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/viewtopic.php')
| -rw-r--r-- | phpBB/viewtopic.php | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index 18ecba9c21..ed03bc4820 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -67,7 +67,7 @@ if(isset($HTTP_GET_VARS['view'])) f.forum_type, f.forum_name, f.forum_id, u.username, u.user_id FROM ".TOPICS_TABLE." t, ".FORUMS_TABLE." f, ".FORUM_MODS_TABLE." fm, ".USERS_TABLE." u WHERE t.topic_id in - (select min(topic_id) from ".TOPICS_TABLE." WHERE topic_time ".$operator." (select topic_time as t_time from ".TOPICS_TABLE." where topic_id = $topic_id)) + (select max(topic_id) from ".TOPICS_TABLE." WHERE topic_time ".$operator." (select topic_time as t_time from ".TOPICS_TABLE." where topic_id = $topic_id)) AND f.forum_id = ".$HTTP_GET_VARS[POST_FORUM_URL]." AND f.forum_id = t.forum_id AND fm.forum_id = t.forum_id @@ -138,7 +138,15 @@ if(!$total_rows = $db->sql_numrows($result)) } else { - error_die(GENERAL_ERROR, "The forum you selected does not exist. Please go back and try again."); + if(DEBUG) + { + $error = $db->sql_error(); + error_die(GENERAL_ERROR, "The forum/topic you selected does not exist.<br>Reason: ".$error['message']."<br>Query: $sql", __LINE__, __FILE__); + } + else + { + error_die(GENERAL_ERROR, "The forum you selected does not exist. Please go back and try again."); + } } } $forum_row = $db->sql_fetchrowset($result); @@ -184,7 +192,7 @@ if(!isset($start)) $start = 0; } -$sql = "SELECT u.username, u.user_id, u.user_posts, u.user_from, u.user_website, u.user_icq, u.user_aim, u.user_yim, u.user_regdate, u.user_msnm, u.user_viewemail, u.user_rank, p.post_time, p.post_id, p.bbcode_uid, pt.post_text +$sql = "SELECT u.username, u.user_id, u.user_posts, u.user_from, u.user_website, u.user_icq, u.user_aim, u.user_yim, u.user_regdate, u.user_msnm, u.user_viewemail, u.user_rank, u.user_sig, p.post_time, p.post_id, p.bbcode_uid, pt.post_text FROM ".POSTS_TABLE." p, ".USERS_TABLE." u, ".POSTS_TEXT_TABLE." pt WHERE p.topic_id = $topic_id AND p.poster_id = u.user_id @@ -392,7 +400,7 @@ flush(); // right away and dosan't have to wait for this update query to finish. // $sql = "UPDATE ".TOPICS_TABLE." SET topic_views = topic_views + 1 WHERE topic_id = $topic_id"; -// We don't care too much if this query succeeds or not so I'm not going to bother checking +// We don't care too much if this query succeeds or not so I'm not going to bother checking $db->sql_query($sql); include('includes/page_tail.'.$phpEx); |
