diff options
author | rxu <rxu@mail.ru> | 2017-06-28 00:58:03 +0700 |
---|---|---|
committer | Marc Alexander <admin@m-a-styles.de> | 2018-01-01 13:56:04 +0100 |
commit | f8fbe3793680af1dae2db2829cfc84068831c52f (patch) | |
tree | 54c7108b28fb58688a8695a0b592c163314a09f9 /phpBB/phpbb/notification | |
parent | ff18802656e72981f6ecb613d756bc19f2462689 (diff) | |
download | forums-f8fbe3793680af1dae2db2829cfc84068831c52f.tar forums-f8fbe3793680af1dae2db2829cfc84068831c52f.tar.gz forums-f8fbe3793680af1dae2db2829cfc84068831c52f.tar.bz2 forums-f8fbe3793680af1dae2db2829cfc84068831c52f.tar.xz forums-f8fbe3793680af1dae2db2829cfc84068831c52f.zip |
[ticket/14972] replace all occurrences of sizeof() with the count()
PHPBB3-14972
Diffstat (limited to 'phpBB/phpbb/notification')
-rw-r--r-- | phpBB/phpbb/notification/manager.php | 2 | ||||
-rw-r--r-- | phpBB/phpbb/notification/type/pm.php | 2 | ||||
-rw-r--r-- | phpBB/phpbb/notification/type/post.php | 10 | ||||
-rw-r--r-- | phpBB/phpbb/notification/type/topic.php | 2 |
4 files changed, 8 insertions, 8 deletions
diff --git a/phpBB/phpbb/notification/manager.php b/phpBB/phpbb/notification/manager.php index 1cd7e5bc9a..ac6bb3c6da 100644 --- a/phpBB/phpbb/notification/manager.php +++ b/phpBB/phpbb/notification/manager.php @@ -339,7 +339,7 @@ class manager } } - if (!sizeof($notify_users)) + if (!count($notify_users)) { return; } diff --git a/phpBB/phpbb/notification/type/pm.php b/phpBB/phpbb/notification/type/pm.php index 8fb9172911..c51586afb9 100644 --- a/phpBB/phpbb/notification/type/pm.php +++ b/phpBB/phpbb/notification/type/pm.php @@ -99,7 +99,7 @@ class pm extends \phpbb\notification\type\base 'ignore_users' => array(), ), $options); - if (!sizeof($pm['recipients'])) + if (!count($pm['recipients'])) { return array(); } diff --git a/phpBB/phpbb/notification/type/post.php b/phpBB/phpbb/notification/type/post.php index 03221e7c7a..254f4c07b3 100644 --- a/phpBB/phpbb/notification/type/post.php +++ b/phpBB/phpbb/notification/type/post.php @@ -202,9 +202,9 @@ class post extends \phpbb\notification\type\base 'username' => $this->get_data('post_username'), )), $responders); - $responders_cnt = sizeof($responders); + $responders_cnt = count($responders); $responders = $this->trim_user_ary($responders); - $trimmed_responders_cnt = $responders_cnt - sizeof($responders); + $trimmed_responders_cnt = $responders_cnt - count($responders); foreach ($responders as $responder) { @@ -337,7 +337,7 @@ class post extends \phpbb\notification\type\base */ public function trim_user_ary($users) { - if (sizeof($users) > 4) + if (count($users) > 4) { array_splice($users, 3); } @@ -357,7 +357,7 @@ class post extends \phpbb\notification\type\base */ public function pre_create_insert_array($post, $notify_users) { - if (!sizeof($notify_users) || !$this->inherit_read_status) + if (!count($notify_users) || !$this->inherit_read_status) { return array(); } @@ -426,7 +426,7 @@ class post extends \phpbb\notification\type\base // Do not add more than 25 responders, // we trim the username list to "a, b, c and x others" anyway // so there is no use to add all of them anyway. - if (sizeof($responders) > 25) + if (count($responders) > 25) { return array(); } diff --git a/phpBB/phpbb/notification/type/topic.php b/phpBB/phpbb/notification/type/topic.php index 671c34fe96..5c42afa8c8 100644 --- a/phpBB/phpbb/notification/type/topic.php +++ b/phpBB/phpbb/notification/type/topic.php @@ -261,7 +261,7 @@ class topic extends \phpbb\notification\type\base */ public function pre_create_insert_array($post, $notify_users) { - if (!sizeof($notify_users) || !$this->inherit_read_status) + if (!count($notify_users) || !$this->inherit_read_status) { return array(); } |