aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/viewforum.php
diff options
context:
space:
mode:
authorJames Atkinson <thefinn@users.sourceforge.net>2001-06-11 00:58:08 +0000
committerJames Atkinson <thefinn@users.sourceforge.net>2001-06-11 00:58:08 +0000
commitcb44575d8ac73c719e252556c64572a6e84e4f7f (patch)
treecfa963e88c5e97a6ab7e765ce6cc6dcf924fe72d /phpBB/viewforum.php
parentb71e098cdc39752a32c50a7147f893f582e86d26 (diff)
downloadforums-cb44575d8ac73c719e252556c64572a6e84e4f7f.tar
forums-cb44575d8ac73c719e252556c64572a6e84e4f7f.tar.gz
forums-cb44575d8ac73c719e252556c64572a6e84e4f7f.tar.bz2
forums-cb44575d8ac73c719e252556c64572a6e84e4f7f.tar.xz
forums-cb44575d8ac73c719e252556c64572a6e84e4f7f.zip
Posting preview done, ability for anonymous users to post with a username
git-svn-id: file:///svn/phpbb/trunk@463 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/viewforum.php')
-rw-r--r--phpBB/viewforum.php14
1 files changed, 12 insertions, 2 deletions
diff --git a/phpBB/viewforum.php b/phpBB/viewforum.php
index 64f24c85fc..a211a81e33 100644
--- a/phpBB/viewforum.php
+++ b/phpBB/viewforum.php
@@ -192,7 +192,7 @@ $select_post_days .= "</select>";
// Grab all the basic data for
// this forum
//
-$sql = "SELECT t.*, u.username, u.user_id, u2.username as user2, u2.user_id as id2, p.post_time
+$sql = "SELECT t.*, u.username, u.user_id, u2.username as user2, u2.user_id as id2, p.post_time, p.post_username
FROM ".TOPICS_TABLE." t, ".USERS_TABLE." u, ".POSTS_TABLE." p, ".USERS_TABLE." u2
WHERE t.forum_id = $forum_id
AND t.topic_poster = u.user_id
@@ -202,6 +202,7 @@ $sql = "SELECT t.*, u.username, u.user_id, u2.username as user2, u2.user_id as i
$limit_posts_time
ORDER BY t.topic_type DESC, p.post_time DESC
LIMIT $start, ".$board_config['topics_per_page'];
+
if(!$t_result = $db->sql_query($sql))
{
error_die(SQL_QUERY, "Couldn't obtain topic information.", __LINE__, __FILE__);
@@ -363,7 +364,16 @@ if($total_topics)
$topic_poster_profile_url = append_sid("profile.$phpEx?mode=viewprofile&".POST_USERS_URL."=".$topic_rowset[$x]['user_id']);
$last_post_time = create_date($board_config['default_dateformat'], $topic_rowset[$x]['post_time'], $board_config['default_timezone']);
- $last_post_user = $topic_rowset[$x]['user2'];
+
+ if($topic_rowset[$x]['id2'] == ANONYMOUS && $topic_rowset[$x]['post_username'] != '')
+ {
+ $last_post_user = $topic_rowset[$x]['post_username'];
+ }
+ else
+ {
+ $last_post_user = $topic_rowset[$x]['user2'];
+ }
+
$last_post_profile_url = append_sid("profile.$phpEx?mode=viewprofile&".POST_USERS_URL."=".$topic_rowset[$x]['id2']);
$views = $topic_rowset[$x]['topic_views'];