Announcements fix #1

This commit is contained in:
Ice
2008-01-29 22:53:16 +00:00
parent 3665665d9a
commit 71c5a983a9

View File

@@ -56,7 +56,6 @@ function phpbb_fetch_posts($forum_sql, $number_of_posts, $text_length, $time, $t
t.topic_views,
t.poll_title,
t.topic_replies,
t.forum_id,
t.topic_poster,
u.username,
u.user_id,
@@ -73,20 +72,25 @@ function phpbb_fetch_posts($forum_sql, $number_of_posts, $text_length, $time, $t
p.bbcode_uid,
f.forum_name
FROM
' . TOPICS_TABLE . ' AS t,
' . USERS_TABLE . ' AS u,
' . POSTS_TABLE . ' AS p,
' . FORUMS_TABLE . ' AS f
' . TOPICS_TABLE . ' AS t
LEFT JOIN
' . USERS_TABLE . ' as u
ON
t.topic_poster = u.user_id
LEFT JOIN
' . FORUMS_TABLE . ' as f
ON
t.forum_id=f.forum_id
LEFT JOIN
' . POSTS_TABLE . ' as p
ON
t.topic_first_post_id = p.post_id
WHERE
' . $topic_type . '
' . $from_forum . '
' . $post_time . '
t.topic_poster = u.user_id AND
t.topic_first_post_id = p.post_id AND
t.topic_status <> 2 AND
t.topic_approved = 1 AND
t.forum_id = f.forum_id
t.topic_approved = 1
ORDER BY
t.topic_time DESC';
@@ -219,7 +223,7 @@ function phpbb_fetch_posts($forum_sql, $number_of_posts, $text_length, $time, $t
t.topic_last_post_id = p.post_id AND
t.topic_status <> 2 AND
t.topic_approved = 1 AND
t.forum_id = f.forum_id
f.forum_id = t.forum_id
ORDER BY
t.topic_last_post_time DESC';