mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-19 09:48:53 +00:00
Merge pull request #3402 from brunoais/ticket/13621
[ticket/13621] Prepend $where_sql and postpend closing bracket on statements with return
This commit is contained in:
commit
c60497f009
1 changed files with 3 additions and 3 deletions
|
@ -237,7 +237,7 @@ class content_visibility
|
||||||
if (!sizeof($forum_ids))
|
if (!sizeof($forum_ids))
|
||||||
{
|
{
|
||||||
// The user can see all posts/topics in all specified forums
|
// 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
|
else
|
||||||
{
|
{
|
||||||
|
@ -248,8 +248,8 @@ class content_visibility
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// The user is just a normal user
|
// The user is just a normal user
|
||||||
return $table_alias . $mode . '_visibility = ' . ITEM_APPROVED . '
|
return $where_sql . $table_alias . $mode . '_visibility = ' . ITEM_APPROVED . '
|
||||||
AND ' . $this->db->sql_in_set($table_alias . 'forum_id', $forum_ids, false, true);
|
AND ' . $this->db->sql_in_set($table_alias . 'forum_id', $forum_ids, false, true) . ')';
|
||||||
}
|
}
|
||||||
|
|
||||||
$where_sql .= '(' . $table_alias . $mode . '_visibility = ' . ITEM_APPROVED . '
|
$where_sql .= '(' . $table_alias . $mode . '_visibility = ' . ITEM_APPROVED . '
|
||||||
|
|
Loading…
Add table
Reference in a new issue