diff options
author | Joas Schilling <nickvergessen@gmx.de> | 2015-04-06 11:13:33 +0200 |
---|---|---|
committer | Joas Schilling <nickvergessen@gmx.de> | 2015-04-06 11:13:33 +0200 |
commit | c60497f0091f6b6bbbd046a548c2f81e18ead23a (patch) | |
tree | 668e2646b5de5c0acb81bd0c54e983724ee5befb | |
parent | 009a8cb2d594f170a46cba1a1937c2da20e1825e (diff) | |
parent | 957b23765f60f1f4d3a2cdb660cfb48024b88ece (diff) | |
download | forums-c60497f0091f6b6bbbd046a548c2f81e18ead23a.tar forums-c60497f0091f6b6bbbd046a548c2f81e18ead23a.tar.gz forums-c60497f0091f6b6bbbd046a548c2f81e18ead23a.tar.bz2 forums-c60497f0091f6b6bbbd046a548c2f81e18ead23a.tar.xz forums-c60497f0091f6b6bbbd046a548c2f81e18ead23a.zip |
Merge pull request #3402 from brunoais/ticket/13621
[ticket/13621] Prepend $where_sql and postpend closing bracket on statements with return
-rw-r--r-- | phpBB/phpbb/content_visibility.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/phpBB/phpbb/content_visibility.php b/phpBB/phpbb/content_visibility.php index 700009da6a..0ba0489cb7 100644 --- a/phpBB/phpbb/content_visibility.php +++ b/phpBB/phpbb/content_visibility.php @@ -237,7 +237,7 @@ class content_visibility if (!sizeof($forum_ids)) { // The user can see all posts/topics in all specified forums - return $this->db->sql_in_set($table_alias . 'forum_id', $approve_forums); + return $where_sql . $this->db->sql_in_set($table_alias . 'forum_id', $approve_forums) . ')'; } else { @@ -248,8 +248,8 @@ class content_visibility else { // The user is just a normal user - return $table_alias . $mode . '_visibility = ' . ITEM_APPROVED . ' - AND ' . $this->db->sql_in_set($table_alias . 'forum_id', $forum_ids, false, true); + return $where_sql . $table_alias . $mode . '_visibility = ' . ITEM_APPROVED . ' + AND ' . $this->db->sql_in_set($table_alias . 'forum_id', $forum_ids, false, true) . ')'; } $where_sql .= '(' . $table_alias . $mode . '_visibility = ' . ITEM_APPROVED . ' |