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/includes/ucp/ucp_attachments.php | |
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/includes/ucp/ucp_attachments.php')
-rw-r--r-- | phpBB/includes/ucp/ucp_attachments.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/phpBB/includes/ucp/ucp_attachments.php b/phpBB/includes/ucp/ucp_attachments.php index 66c3109b3d..c1b623cd71 100644 --- a/phpBB/includes/ucp/ucp_attachments.php +++ b/phpBB/includes/ucp/ucp_attachments.php @@ -38,7 +38,7 @@ class ucp_attachments $delete = (isset($_POST['delete'])) ? true : false; $delete_ids = array_keys($request->variable('attachment', array(0))); - if ($delete && sizeof($delete_ids)) + if ($delete && count($delete_ids)) { // Validate $delete_ids... $sql = 'SELECT attach_id @@ -56,7 +56,7 @@ class ucp_attachments $db->sql_freeresult($result); } - if ($delete && sizeof($delete_ids)) + if ($delete && count($delete_ids)) { $s_hidden_fields = array( 'delete' => 1 @@ -75,12 +75,12 @@ class ucp_attachments unset($attachment_manager); meta_refresh(3, $this->u_action); - $message = ((sizeof($delete_ids) == 1) ? $user->lang['ATTACHMENT_DELETED'] : $user->lang['ATTACHMENTS_DELETED']) . '<br /><br />' . sprintf($user->lang['RETURN_UCP'], '<a href="' . $this->u_action . '">', '</a>'); + $message = ((count($delete_ids) == 1) ? $user->lang['ATTACHMENT_DELETED'] : $user->lang['ATTACHMENTS_DELETED']) . '<br /><br />' . sprintf($user->lang['RETURN_UCP'], '<a href="' . $this->u_action . '">', '</a>'); trigger_error($message); } else { - confirm_box(false, (sizeof($delete_ids) == 1) ? 'DELETE_ATTACHMENT' : 'DELETE_ATTACHMENTS', build_hidden_fields($s_hidden_fields)); + confirm_box(false, (count($delete_ids) == 1) ? 'DELETE_ATTACHMENT' : 'DELETE_ATTACHMENTS', build_hidden_fields($s_hidden_fields)); } } |