1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-19 06:51:33 +02:00

[ticket/14972] replace all occurrences of sizeof() with the count()

PHPBB3-14972
This commit is contained in:
rxu
2017-06-28 00:58:03 +07:00
committed by Marc Alexander
parent ff18802656
commit f8fbe37936
165 changed files with 983 additions and 983 deletions

View File

@@ -166,7 +166,7 @@ class acp_icons
}
$db->sql_freeresult($result);
if (sizeof($smilies))
if (count($smilies))
{
foreach ($smilies as $row)
{
@@ -301,7 +301,7 @@ class acp_icons
}
// Ok, another row for adding an addition code for a pre-existing image...
if ($action == 'add' && $mode == 'smilies' && sizeof($smilies))
if ($action == 'add' && $mode == 'smilies' && count($smilies))
{
$template->assign_vars(array(
'S_ADD_CODE' => true,
@@ -378,7 +378,7 @@ class acp_icons
{
$smiley_count = $this->item_count($table);
$addable_smileys_count = sizeof($images);
$addable_smileys_count = count($images);
foreach ($images as $image)
{
if (!isset($image_add[$image]))
@@ -546,8 +546,8 @@ class acp_icons
{
if (preg_match_all("#'(.*?)', ?#", $pak_entry, $data))
{
if ((sizeof($data[1]) != 4 && $mode == 'icons') ||
((sizeof($data[1]) != 6 || (empty($data[1][4]) || empty($data[1][5]))) && $mode == 'smilies' ))
if ((count($data[1]) != 4 && $mode == 'icons') ||
((count($data[1]) != 6 || (empty($data[1][4]) || empty($data[1][5]))) && $mode == 'smilies' ))
{
trigger_error($user->lang['WRONG_PAK_TYPE'] . adm_back_link($this->u_action), E_USER_WARNING);
}
@@ -605,7 +605,7 @@ class acp_icons
if ($mode == 'smilies')
{
$smiley_count = $this->item_count($table);
if ($smiley_count + sizeof($pak_ary) > SMILEY_LIMIT)
if ($smiley_count + count($pak_ary) > SMILEY_LIMIT)
{
trigger_error($user->lang('TOO_MANY_SMILIES', SMILEY_LIMIT) . adm_back_link($this->u_action), E_USER_WARNING);
}
@@ -616,8 +616,8 @@ class acp_icons
$data = array();
if (preg_match_all("#'(.*?)', ?#", $pak_entry, $data))
{
if ((sizeof($data[1]) != 4 && $mode == 'icons') ||
(sizeof($data[1]) != 6 && $mode == 'smilies'))
if ((count($data[1]) != 4 && $mode == 'icons') ||
(count($data[1]) != 6 && $mode == 'smilies'))
{
trigger_error($user->lang['WRONG_PAK_TYPE'] . adm_back_link($this->u_action), E_USER_WARNING);
}