From 2ec0206283d9a7112657829ddc8e9faa3011b35a Mon Sep 17 00:00:00 2001 From: "Paul S. Owen" Date: Sun, 17 Jun 2001 23:53:04 +0000 Subject: Switched forum_auth to the forums table git-svn-id: file:///svn/phpbb/trunk@506 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/viewtopic.php | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) (limited to 'phpBB/viewtopic.php') diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index c5fe3c8581..aac18e3b01 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -139,7 +139,7 @@ else $join_sql_table = (!isset($post_id)) ? "" : "".POSTS_TABLE." p, ".POSTS_TABLE." p2,"; $join_sql = (!isset($post_id)) ? "t.topic_id = $topic_id" : "p.post_id = $post_id AND t.topic_id = p.topic_id AND p2.topic_id = p.topic_id AND p2.post_id <= $post_id"; $count_sql = (!isset($post_id)) ? "" : ", COUNT(p2.post_id) AS prev_posts"; -/* + $order_sql = (!isset($post_id)) ? "" : "GROUP BY p.post_id, t.topic_id, t.topic_title, t.topic_status, t.topic_replies, t.topic_time, f.forum_name, f.forum_id, f.auth_view, f.auth_read, f.auth_post, f.auth_reply, f.auth_edit, f.auth_delete, f.auth_votecreate, f.auth_vote, f.auth_attachments ORDER BY p.post_id ASC"; $sql = "SELECT t.topic_id, t.topic_title, t.topic_status, t.topic_replies, t.topic_time, f.forum_name, f.forum_id, f.auth_view, f.auth_read, f.auth_post, f.auth_reply, f.auth_edit, f.auth_delete, f.auth_votecreate, f.auth_vote, f.auth_attachments" . $count_sql . " @@ -147,16 +147,6 @@ else WHERE $join_sql AND f.forum_id = t.forum_id $order_sql"; -*/ - $order_sql = (!isset($post_id)) ? "" : "GROUP BY p.post_id, t.topic_id, t.topic_title, t.topic_status, t.topic_replies, t.topic_time, f.forum_name, f.forum_id, fa.auth_view, fa.auth_read, fa.auth_post, fa.auth_reply, fa.auth_edit, fa.auth_delete, fa.auth_announce, fa.auth_sticky, fa.auth_votecreate, fa.auth_vote ORDER BY p.post_id ASC"; - - $sql = "SELECT t.topic_id, t.topic_title, t.topic_status, t.topic_replies, t.topic_time, f.forum_name, f.forum_id, fa.auth_view, fa.auth_read, fa.auth_post, fa.auth_reply, fa.auth_edit, fa.auth_announce, fa.auth_sticky, fa.auth_delete, fa.auth_votecreate, fa.auth_vote" . $count_sql . " - FROM $join_sql_table ".TOPICS_TABLE." t, ".FORUMS_TABLE." f, ".AUTH_FORUMS_TABLE." fa - WHERE $join_sql - AND f.forum_id = t.forum_id - AND fa.forum_id = f.forum_id - $order_sql"; - // This closes out the opening braces above // Needed for the view/next query @@ -456,6 +446,8 @@ for($x = 0; $x < $total_posts; $x++) $profile_img = "\"$l_profileof"; + $pm_img = "\"""; + $email_img = ($postrow[$x]['user_viewemail'] == 1) ? "\"$l_email" : ""; $www_img = ($postrow[$x]['user_website']) ? "\"$l_viewsite\"" : ""; @@ -554,6 +546,7 @@ for($x = 0; $x < $total_posts; $x++) "POST_SUBJECT" => $post_subject, "MESSAGE" => $message, "PROFILE_IMG" => $profile_img, + "PM_IMG" => $pm_img, "EMAIL_IMG" => $email_img, "WWW_IMG" => $www_img, "ICQ_STATUS_IMG" => $icq_status_img, -- cgit v1.2.1