diff options
Diffstat (limited to 'phpBB/includes/functions_messenger.php')
-rw-r--r-- | phpBB/includes/functions_messenger.php | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/phpBB/includes/functions_messenger.php b/phpBB/includes/functions_messenger.php index 4eda5ac6cb..b866e108c0 100644 --- a/phpBB/includes/functions_messenger.php +++ b/phpBB/includes/functions_messenger.php @@ -84,7 +84,7 @@ class messenger return; } - $pos = isset($this->addresses['to']) ? sizeof($this->addresses['to']) : 0; + $pos = isset($this->addresses['to']) ? count($this->addresses['to']) : 0; $this->addresses['to'][$pos]['email'] = trim($address); @@ -109,7 +109,7 @@ class messenger return; } - $pos = isset($this->addresses['cc']) ? sizeof($this->addresses['cc']) : 0; + $pos = isset($this->addresses['cc']) ? count($this->addresses['cc']) : 0; $this->addresses['cc'][$pos]['email'] = trim($address); $this->addresses['cc'][$pos]['name'] = trim($realname); } @@ -124,7 +124,7 @@ class messenger return; } - $pos = isset($this->addresses['bcc']) ? sizeof($this->addresses['bcc']) : 0; + $pos = isset($this->addresses['bcc']) ? count($this->addresses['bcc']) : 0; $this->addresses['bcc'][$pos]['email'] = trim($address); $this->addresses['bcc'][$pos]['name'] = trim($realname); } @@ -140,7 +140,7 @@ class messenger return; } - $pos = isset($this->addresses['im']) ? sizeof($this->addresses['im']) : 0; + $pos = isset($this->addresses['im']) ? count($this->addresses['im']) : 0; $this->addresses['im'][$pos]['uid'] = trim($address); $this->addresses['im'][$pos]['name'] = trim($realname); } @@ -503,7 +503,7 @@ class messenger $vars = array('headers'); extract($phpbb_dispatcher->trigger_event('core.modify_email_headers', compact($vars))); - if (sizeof($this->extra_headers)) + if (count($this->extra_headers)) { $headers = array_merge($headers, $this->extra_headers); } @@ -814,7 +814,7 @@ class queue } $package_size = $data_ary['package_size']; - $num_items = (!$package_size || sizeof($data_ary['data']) < $package_size) ? sizeof($data_ary['data']) : $package_size; + $num_items = (!$package_size || count($data_ary['data']) < $package_size) ? count($data_ary['data']) : $package_size; /* * This code is commented out because it causes problems on some web hosts. @@ -823,9 +823,9 @@ class queue * web host and the package size setting is wrong. // If the amount of emails to be sent is way more than package_size than we need to increase it to prevent backlogs... - if (sizeof($data_ary['data']) > $package_size * 2.5) + if (count($data_ary['data']) > $package_size * 2.5) { - $num_items = sizeof($data_ary['data']); + $num_items = count($data_ary['data']); } */ @@ -914,7 +914,7 @@ class queue } // No more data for this object? Unset it - if (!sizeof($this->queue_data[$object]['data'])) + if (!count($this->queue_data[$object]['data'])) { unset($this->queue_data[$object]); } @@ -930,7 +930,7 @@ class queue } } - if (!sizeof($this->queue_data)) + if (!count($this->queue_data)) { @unlink($this->cache_file); } @@ -965,7 +965,7 @@ class queue */ function save() { - if (!sizeof($this->data)) + if (!count($this->data)) { return; } @@ -979,7 +979,7 @@ class queue foreach ($this->queue_data as $object => $data_ary) { - if (isset($this->data[$object]) && sizeof($this->data[$object])) + if (isset($this->data[$object]) && count($this->data[$object])) { $this->data[$object]['data'] = array_merge($data_ary['data'], $this->data[$object]['data']); } @@ -1067,7 +1067,7 @@ function smtpmail($addresses, $subject, $message, &$err_msg, $headers = false) $mail_rcpt = $mail_to = $mail_cc = array(); // Build correct addresses for RCPT TO command and the client side display (TO, CC) - if (isset($addresses['to']) && sizeof($addresses['to'])) + if (isset($addresses['to']) && count($addresses['to'])) { foreach ($addresses['to'] as $which_ary) { @@ -1076,7 +1076,7 @@ function smtpmail($addresses, $subject, $message, &$err_msg, $headers = false) } } - if (isset($addresses['bcc']) && sizeof($addresses['bcc'])) + if (isset($addresses['bcc']) && count($addresses['bcc'])) { foreach ($addresses['bcc'] as $which_ary) { @@ -1084,7 +1084,7 @@ function smtpmail($addresses, $subject, $message, &$err_msg, $headers = false) } } - if (isset($addresses['cc']) && sizeof($addresses['cc'])) + if (isset($addresses['cc']) && count($addresses['cc'])) { foreach ($addresses['cc'] as $which_ary) { @@ -1802,11 +1802,11 @@ function mail_encode($str, $eol = "\r\n") $array = utf8_str_split($str); $str = ''; - while (sizeof($array)) + while (count($array)) { $text = ''; - while (sizeof($array) && intval((strlen($text . $array[0]) + 2) / 3) << 2 <= $split_length) + while (count($array) && intval((strlen($text . $array[0]) + 2) / 3) << 2 <= $split_length) { $text .= array_shift($array); } |