diff options
author | Andreas Fischer <bantu@phpbb.com> | 2010-01-08 22:38:02 +0000 |
---|---|---|
committer | Andreas Fischer <bantu@phpbb.com> | 2010-01-08 22:38:02 +0000 |
commit | e5c228d564b26ea39a499f3139590eaf39ef7d12 (patch) | |
tree | 1f5d46e4b763d1eb31e501353d8d071d7af53ea4 /phpBB/feed.php | |
parent | fffe43691434d4bbc1dc314f6e86553752c0816f (diff) | |
download | forums-e5c228d564b26ea39a499f3139590eaf39ef7d12.tar forums-e5c228d564b26ea39a499f3139590eaf39ef7d12.tar.gz forums-e5c228d564b26ea39a499f3139590eaf39ef7d12.tar.bz2 forums-e5c228d564b26ea39a499f3139590eaf39ef7d12.tar.xz forums-e5c228d564b26ea39a499f3139590eaf39ef7d12.zip |
Make sure ORDER BY is SELECTed
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10398 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/feed.php')
-rw-r--r-- | phpBB/feed.php | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/phpBB/feed.php b/phpBB/feed.php index d12f66b29b..63e62e0dde 100644 --- a/phpBB/feed.php +++ b/phpBB/feed.php @@ -724,7 +724,7 @@ class phpbb_feed_overall extends phpbb_feed_post_base $forum_ids[] = 0; // Determine post ids first for optimization - $sql = 'SELECT post_id + $sql = 'SELECT post_id, post_time FROM ' . POSTS_TABLE . ' WHERE post_approved = 1 AND ' . $db->sql_in_set('forum_id', $forum_ids) . ' @@ -738,6 +738,11 @@ class phpbb_feed_overall extends phpbb_feed_post_base } $db->sql_freeresult($result); + if (empty($post_ids)) + { + return false; + } + $this->sql = array( 'SELECT' => 'f.forum_id, f.forum_name, f.forum_desc_options, ' . 't.topic_id, t.topic_title, t.topic_time, t.topic_replies, t.topic_views, ' . @@ -977,7 +982,7 @@ class phpbb_feed_topic extends phpbb_feed_post_base trigger_error('SORRY_AUTH_READ'); } - $sql = 'SELECT forum_id + $sql = 'SELECT forum_id, left_id FROM ' . FORUMS_TABLE . ' WHERE forum_type = ' . FORUM_POST . ' AND ' . $db->sql_in_set('forum_id', $in_fid_ary) . ' |