mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 22:28:51 +00:00
Make sure ORDER BY is SELECTed
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10398 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
fffe436914
commit
e5c228d564
1 changed files with 7 additions and 2 deletions
|
@ -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) . '
|
||||
|
|
Loading…
Add table
Reference in a new issue