diff options
author | Joas Schilling <nickvergessen@gmx.de> | 2013-07-11 22:35:55 -0400 |
---|---|---|
committer | Joas Schilling <nickvergessen@gmx.de> | 2013-07-11 22:35:55 -0400 |
commit | 5ab0090e6c9fa1b497938a932cdf28ba55a17e7c (patch) | |
tree | 7e9222e8e8004ff9ee59a1525db0de7226de6327 /phpBB/includes/feed | |
parent | 53c0647aed4a4995d3ae00ed775ff563eaa61b9a (diff) | |
download | forums-5ab0090e6c9fa1b497938a932cdf28ba55a17e7c.tar forums-5ab0090e6c9fa1b497938a932cdf28ba55a17e7c.tar.gz forums-5ab0090e6c9fa1b497938a932cdf28ba55a17e7c.tar.bz2 forums-5ab0090e6c9fa1b497938a932cdf28ba55a17e7c.tar.xz forums-5ab0090e6c9fa1b497938a932cdf28ba55a17e7c.zip |
[ticket/9657] Remove sql_visibility as it is always non-empty
PHPBB3-9657
Diffstat (limited to 'phpBB/includes/feed')
-rw-r--r-- | phpBB/includes/feed/forum.php | 7 | ||||
-rw-r--r-- | phpBB/includes/feed/overall.php | 4 | ||||
-rw-r--r-- | phpBB/includes/feed/topic.php | 4 |
3 files changed, 4 insertions, 11 deletions
diff --git a/phpBB/includes/feed/forum.php b/phpBB/includes/feed/forum.php index fc217c203c..4a159ff3d4 100644 --- a/phpBB/includes/feed/forum.php +++ b/phpBB/includes/feed/forum.php @@ -90,14 +90,12 @@ class phpbb_feed_forum extends phpbb_feed_post_base function get_sql() { - $sql_visibility = $this->content_visibility->get_visibility_sql('topic', $this->forum_id); - // Determine topics with recent activity $sql = 'SELECT topic_id, topic_last_post_time FROM ' . TOPICS_TABLE . ' WHERE forum_id = ' . $this->forum_id . ' AND topic_moved_id = 0 - ' . (($sql_visibility) ? ' AND ' . $sql_visibility : '') . ' + AND ' . $this->content_visibility->get_visibility_sql('topic', $this->forum_id) . ' ORDER BY topic_last_post_time DESC'; $result = $this->db->sql_query_limit($sql, $this->num_items); @@ -116,8 +114,6 @@ class phpbb_feed_forum extends phpbb_feed_post_base return false; } - $sql_visibility = $this->content_visibility->get_visibility_sql('post', $this->forum_id, 'p.'); - $this->sql = array( 'SELECT' => 'p.post_id, p.topic_id, p.post_time, p.post_edit_time, p.post_visibility, p.post_subject, p.post_text, p.bbcode_bitfield, p.bbcode_uid, p.enable_bbcode, p.enable_smilies, p.enable_magic_url, ' . 'u.username, u.user_id', @@ -127,6 +123,7 @@ class phpbb_feed_forum extends phpbb_feed_post_base ), 'WHERE' => $this->db->sql_in_set('p.topic_id', $topic_ids) . ' ' . (($sql_visibility) ? ' AND ' . $sql_visibility : '') . ' + AND ' . $this->content_visibility->get_visibility_sql('post', $this->forum_id, 'p.') . ' AND p.post_time >= ' . $min_post_time . ' AND p.poster_id = u.user_id', 'ORDER_BY' => 'p.post_time DESC', diff --git a/phpBB/includes/feed/overall.php b/phpBB/includes/feed/overall.php index af45840d69..869df7cde0 100644 --- a/phpBB/includes/feed/overall.php +++ b/phpBB/includes/feed/overall.php @@ -56,8 +56,6 @@ class phpbb_feed_overall extends phpbb_feed_post_base return false; } - $sql_visibility = $this->content_visibility->get_visibility_sql('post', array(), 'p.'); - // Get the actual data $this->sql = array( 'SELECT' => 'f.forum_id, f.forum_name, ' . @@ -74,7 +72,7 @@ class phpbb_feed_overall extends phpbb_feed_post_base ), ), 'WHERE' => $this->db->sql_in_set('p.topic_id', $topic_ids) . ' - ' . (($sql_visibility) ? ' AND ' . $sql_visibility : '') . ' + AND ' . $this->content_visibility->get_visibility_sql('post', array(), 'p.') . ' AND p.post_time >= ' . $min_post_time . ' AND u.user_id = p.poster_id', 'ORDER_BY' => 'p.post_time DESC', diff --git a/phpBB/includes/feed/topic.php b/phpBB/includes/feed/topic.php index 10f86486c6..36f958ac60 100644 --- a/phpBB/includes/feed/topic.php +++ b/phpBB/includes/feed/topic.php @@ -93,8 +93,6 @@ class phpbb_feed_topic extends phpbb_feed_post_base function get_sql() { - $sql_visibility = $this->content_visibility->get_visibility_sql('post', $this->forum_id, 'p.'); - $this->sql = array( 'SELECT' => 'p.post_id, p.post_time, p.post_edit_time, p.post_visibility, p.post_subject, p.post_text, p.bbcode_bitfield, p.bbcode_uid, p.enable_bbcode, p.enable_smilies, p.enable_magic_url, ' . 'u.username, u.user_id', @@ -103,7 +101,7 @@ class phpbb_feed_topic extends phpbb_feed_post_base USERS_TABLE => 'u', ), 'WHERE' => 'p.topic_id = ' . $this->topic_id . ' - ' . (($sql_visibility) ? ' AND ' . $sql_visibility : '') . ' + AND ' . $this->content_visibility->get_visibility_sql('post', $this->forum_id, 'p.') . ' AND p.poster_id = u.user_id', 'ORDER_BY' => 'p.post_time DESC', ); |