diff --git a/phpBB/templates/Default/viewforum_body.tpl b/phpBB/templates/Default/viewforum_body.tpl
index 44fbf7f484..2909d02d0c 100644
--- a/phpBB/templates/Default/viewforum_body.tpl
+++ b/phpBB/templates/Default/viewforum_body.tpl
@@ -8,6 +8,7 @@
|
Topic |
Replies |
+ Topic Poster |
Views |
Last Post |
@@ -16,6 +17,7 @@
{FOLDER} |
{TOPIC_TITLE} |
{REPLIES} |
+ {TOPIC_POSTER} |
{VIEWS} |
{LAST_POST} |
diff --git a/phpBB/viewforum.php b/phpBB/viewforum.php
index cb5b69d7af..d091850794 100644
--- a/phpBB/viewforum.php
+++ b/phpBB/viewforum.php
@@ -81,10 +81,11 @@ if(!isset($start))
$start = 0;
}
-$sql = "SELECT t.*, u.username, u.user_id, p.post_time
+$sql = "SELECT t.*, u.username, u.user_id, u2.username as user2, u2.user_id as id2, p.post_time
FROM " . TOPICS_TABLE ." t
LEFT JOIN ". USERS_TABLE. " u ON t.topic_poster = u.user_id
LEFT JOIN ".POSTS_TABLE." p ON p.post_id = t.topic_last_post_id
+ LEFT JOIN " . USERS_TABLE . " u2 ON p.poster_id = u2.user_id
WHERE t.forum_id = '$forum_id'
ORDER BY topic_time DESC
LIMIT $start, $topics_per_page";
@@ -102,18 +103,20 @@ if($total_topics)
$topic_title = stripslashes($topic_rowset[$x]["topic_title"]);
$topic_id = $topic_rowset[$x]["topic_id"];
$replies = $topic_rowset[$x]["topic_replies"];
+ $topic_poster = stripslashes($topic_rowset[$x]["username"]);
$views = $topic_rowset[$x]["topic_views"];
$last_post_time = date($date_format, $topic_rowset[$x]["post_time"]);
- $last_post_user = $topic_rowset[$x]["username"];
+ $last_post_user = $topic_rowset[$x]["user2"];
$folder_img = "
";
$template->set_var(array("FORUM_ID" => $forum_id,
"POST_TOPIC_URL" => POST_TOPIC_URL,
"TOPIC_ID" => $topic_id,
"FOLDER" => $folder_img,
+ "TOPIC_POSTER" => "".$topic_poster."",
"REPLIES" => $replies,
"TOPIC_TITLE" => $topic_title,
"VIEWS" => $views,
- "LAST_POST" => $last_post_time . "
" . $last_post_user .""));
+ "LAST_POST" => $last_post_time . "
" . $last_post_user .""));
$template->parse("topics", "topicrow", true);
}
$count = 1;