mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-24 17:22:55 +02:00
[ticket/14972] replace all occurrences of sizeof() with the count()
PHPBB3-14972
This commit is contained in:
@@ -229,12 +229,12 @@ class content_visibility
|
||||
return $get_forums_visibility_sql_overwrite;
|
||||
}
|
||||
|
||||
if (sizeof($approve_forums))
|
||||
if (count($approve_forums))
|
||||
{
|
||||
// Remove moderator forums from the rest
|
||||
$forum_ids = array_diff($forum_ids, $approve_forums);
|
||||
|
||||
if (!sizeof($forum_ids))
|
||||
if (!count($forum_ids))
|
||||
{
|
||||
// The user can see all posts/topics in all specified forums
|
||||
return $where_sql . $this->db->sql_in_set($table_alias . 'forum_id', $approve_forums) . ')';
|
||||
@@ -304,7 +304,7 @@ class content_visibility
|
||||
return $visibility_sql_overwrite;
|
||||
}
|
||||
|
||||
if (sizeof($exclude_forum_ids))
|
||||
if (count($exclude_forum_ids))
|
||||
{
|
||||
$where_sqls[] = '(' . $this->db->sql_in_set($table_alias . 'forum_id', $exclude_forum_ids, true) . '
|
||||
AND ' . $table_alias . $mode . '_visibility = ' . ITEM_APPROVED . ')';
|
||||
@@ -314,7 +314,7 @@ class content_visibility
|
||||
$where_sqls[] = $table_alias . $mode . '_visibility = ' . ITEM_APPROVED;
|
||||
}
|
||||
|
||||
if (sizeof($approve_forums))
|
||||
if (count($approve_forums))
|
||||
{
|
||||
$where_sqls[] = $this->db->sql_in_set($table_alias . 'forum_id', $approve_forums);
|
||||
return '(' . implode(' OR ', $where_sqls) . ')';
|
||||
@@ -565,7 +565,7 @@ class content_visibility
|
||||
$sql_ary[$recipient_field] = " + $count_increase";
|
||||
}
|
||||
|
||||
if (sizeof($sql_ary))
|
||||
if (count($sql_ary))
|
||||
{
|
||||
$forum_sql = array();
|
||||
|
||||
|
Reference in New Issue
Block a user