diff options
| author | Andreas Fischer <bantu@phpbb.com> | 2010-01-12 00:45:56 +0000 |
|---|---|---|
| committer | Andreas Fischer <bantu@phpbb.com> | 2010-01-12 00:45:56 +0000 |
| commit | 085f89e1c14153c8bcc4084e5c7a1a8438bb1a0e (patch) | |
| tree | a3dcd5f9c766b7e6360d44c4e3516b6424e90b88 | |
| parent | aa14d12abb0bb7c441a426d2a8a346c0f4a56686 (diff) | |
| download | forums-085f89e1c14153c8bcc4084e5c7a1a8438bb1a0e.tar forums-085f89e1c14153c8bcc4084e5c7a1a8438bb1a0e.tar.gz forums-085f89e1c14153c8bcc4084e5c7a1a8438bb1a0e.tar.bz2 forums-085f89e1c14153c8bcc4084e5c7a1a8438bb1a0e.tar.xz forums-085f89e1c14153c8bcc4084e5c7a1a8438bb1a0e.zip | |
min() is actually pointless there.
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10402 89ea8834-ac86-4346-8a33-228a782c2dd0
| -rw-r--r-- | phpBB/feed.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/phpBB/feed.php b/phpBB/feed.php index b11a0fd386..6dc237d8dd 100644 --- a/phpBB/feed.php +++ b/phpBB/feed.php @@ -752,11 +752,12 @@ class phpbb_feed_overall extends phpbb_feed_post_base $result = $db->sql_query_limit($sql, $this->num_items); $topic_ids = array(); - $topic_last_post_time = PHP_INT_MAX; + $min_post_time = 0; while ($row = $db->sql_fetchrow()) { $topic_ids[] = (int) $row['topic_id']; - $topic_last_post_time = min($topic_last_post_time, (int) $row['topic_last_post_time']); + + $min_post_time = (int) $row['topic_last_post_time']; } $db->sql_freeresult($result); @@ -783,7 +784,7 @@ class phpbb_feed_overall extends phpbb_feed_post_base 'WHERE' => $db->sql_in_set('p.topic_id', $topic_ids) . ' AND (p.post_approved = 1 OR ' . $db->sql_in_set('p.forum_id', $this->get_moderator_approve_forums()) . ') - AND p.post_time >= ' . $topic_last_post_time . ' + AND p.post_time >= ' . $min_post_time . ' AND u.user_id = p.poster_id', 'ORDER_BY' => 'p.post_time DESC', ); |
