From 2e5030b7f692e755ffd3858cf50a2be2f6142b9e Mon Sep 17 00:00:00 2001 From: James Atkinson Date: Sat, 24 Feb 2001 23:58:30 +0000 Subject: [PATCH] Added link to view profile for last post user git-svn-id: file:///svn/phpbb/trunk@53 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/index.php | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/phpBB/index.php b/phpBB/index.php index e644fdda6d..f7f9cdb580 100644 --- a/phpBB/index.php +++ b/phpBB/index.php @@ -51,7 +51,7 @@ $sql = "SELECT c.* if(!$q_categories = $db->sql_query($sql)) { $db_error = $db->sql_error(); - error_die(QUERY_ERROR, $db_error["message"]); + error_die($db, QUERY_ERROR, $db_error["message"]); } $total_categories = $db->sql_numrows(); @@ -65,7 +65,7 @@ if($total_categories) { $limit_forums = " WHERE f.cat_id = $viewcat "; } - $sql = "SELECT f.*, u.username, p.post_time + $sql = "SELECT f.*, u.username, u.user_id, p.post_time FROM ".FORUMS_TABLE." f LEFT JOIN ".POSTS_TABLE." p ON p.post_id = f.forum_last_post_id LEFT JOIN ".USERS_TABLE." u ON u.user_id = p.poster_id @@ -115,9 +115,12 @@ if($total_categories) $topics = $forum_rows[$j]["forum_topics"]; if($forum_rows[$j]["username"] != "" && $forum_rows[$j]["post_time"] > 0) { - $last_post_user = $forum_rows[$j]["username"]; - $last_post_time = date($date_format, $forum_rows[$j]["post_time"]); - $last_post = $last_post_time." by ".$last_post_user; + $last_post_user = $forum_rows[$j]["username"]; + $last_post_userid = $forum_rows[$j]["user_id"]; + $last_post_time = date($date_format, $forum_rows[$j]["post_time"]); + $last_post = $last_post_time."
by "; + $last_post .= "".$last_post_user.""; } else {