diff options
| author | Joas Schilling <nickvergessen@gmx.de> | 2012-08-30 18:07:00 +0200 |
|---|---|---|
| committer | Joas Schilling <nickvergessen@gmx.de> | 2012-08-30 18:07:00 +0200 |
| commit | 1c043254c00023a5fe17b1131fa605ca11d823a0 (patch) | |
| tree | 28ca5f235f803be8de8955b0f1bbd5713ac4dd62 /phpBB/feed.php | |
| parent | df83f22b718e56ff06a2c35a15cec1039df35db9 (diff) | |
| download | forums-1c043254c00023a5fe17b1131fa605ca11d823a0.tar forums-1c043254c00023a5fe17b1131fa605ca11d823a0.tar.gz forums-1c043254c00023a5fe17b1131fa605ca11d823a0.tar.bz2 forums-1c043254c00023a5fe17b1131fa605ca11d823a0.tar.xz forums-1c043254c00023a5fe17b1131fa605ca11d823a0.zip | |
[feature/soft-delete] Add get_visibility_sql_forums based on global
The resulting query is 4-times faster, as the forum_id IN () arrays are
smaller and we need less AND/OR to build the hole query. The main difference
between those two functions is, that this one takes an array of included ids and
the _global one takes an array of excluded ids.
PHPBB3-9657
Diffstat (limited to 'phpBB/feed.php')
| -rw-r--r-- | phpBB/feed.php | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/phpBB/feed.php b/phpBB/feed.php index b6d93a45f8..2e1589d999 100644 --- a/phpBB/feed.php +++ b/phpBB/feed.php @@ -751,16 +751,11 @@ class phpbb_feed_overall extends phpbb_feed_post_base return false; } - // m_approve forums - $fid_m_approve = $this->get_moderator_approve_forums(); - $sql_m_approve = (!empty($fid_m_approve)) ? 'OR ' . $db->sql_in_set('forum_id', $fid_m_approve) : ''; - // Determine topics with recent activity $sql = 'SELECT topic_id, topic_last_post_time FROM ' . TOPICS_TABLE . ' - WHERE ' . $db->sql_in_set('forum_id', $forum_ids) . ' - AND topic_moved_id = 0 - AND ' . phpbb_content_visibility::get_visibility_sql_global('topic') . ' + WHERE topic_moved_id = 0 + AND ' . phpbb_content_visibility::get_visibility_sql_forums('topic', $forum_ids) . ' ORDER BY topic_last_post_time DESC'; $result = $db->sql_query_limit($sql, $this->num_items); |
