mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 22:28:51 +00:00
Also improve topics feed.
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10353 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
7ac774432e
commit
d64516057f
1 changed files with 10 additions and 10 deletions
|
@ -1184,17 +1184,16 @@ class phpbb_feed_topics extends phpbb_feed_base
|
||||||
{
|
{
|
||||||
global $db, $config;
|
global $db, $config;
|
||||||
|
|
||||||
$excluded_forum_ids = $this->excluded_forums();
|
$forum_ids_read = $this->get_readable_forums();
|
||||||
if (empty($excluded_forum_ids))
|
if (empty($forum_ids_read))
|
||||||
{
|
{
|
||||||
// Whole board
|
return false;
|
||||||
$sql_where_more = '';
|
|
||||||
}
|
}
|
||||||
else
|
|
||||||
|
$in_fid_ary = array_diff($forum_ids_read, $this->get_excluded_forums(), $this->get_passworded_forums());
|
||||||
|
if (empty($in_fid_ary))
|
||||||
{
|
{
|
||||||
// Not excluded forums or global topic
|
return false;
|
||||||
$sql_where_more = 'AND (' . $db->sql_in_set('t.forum_id', $excluded_forum_ids, true) . '
|
|
||||||
OR t.topic_type = ' . POST_GLOBAL . ')';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->sql = array(
|
$this->sql = array(
|
||||||
|
@ -1211,10 +1210,11 @@ class phpbb_feed_topics extends phpbb_feed_base
|
||||||
'ON' => 'f.forum_id = t.forum_id',
|
'ON' => 'f.forum_id = t.forum_id',
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
'WHERE' => "p.post_id = t.topic_first_post_id
|
'WHERE' => 'p.post_id = t.topic_first_post_id
|
||||||
AND t.topic_moved_id = 0
|
AND t.topic_moved_id = 0
|
||||||
AND t.topic_approved = 1
|
AND t.topic_approved = 1
|
||||||
$sql_where_more",
|
AND (' . $db->sql_in_set('t.forum_id', $in_fid_ary) . '
|
||||||
|
OR t.topic_type = ' . POST_GLOBAL . ')',
|
||||||
'ORDER_BY' => 't.topic_time DESC',
|
'ORDER_BY' => 't.topic_time DESC',
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue