diff --git a/build/build_helper.php b/build/build_helper.php index 3ff1b89eab..ff93c22a12 100644 --- a/build/build_helper.php +++ b/build/build_helper.php @@ -39,8 +39,8 @@ class build_package $this->verbose = $verbose; // Get last two entries - $_latest = $this->versions[sizeof($this->versions) - 1]; - $_before = $this->versions[sizeof($this->versions) - 2]; + $_latest = $this->versions[count($this->versions) - 1]; + $_before = $this->versions[count($this->versions) - 2]; $this->locations = array( 'new_version' => dirname(dirname(__FILE__)) . '/phpBB/', diff --git a/build/package.php b/build/package.php index 178a27faad..18798d0602 100755 --- a/build/package.php +++ b/build/package.php @@ -33,7 +33,7 @@ echo "Now all three package types (patch, files, release) are built as well as t // Go trough all versions making a diff if we even have old versions // For phpBB 3.0.x we might choose a different update method, rendering the things below useless... -if (sizeof($package->old_packages)) +if (count($package->old_packages)) { chdir($package->locations['old_versions']); @@ -76,7 +76,7 @@ if (sizeof($package->old_packages)) // Create Directories along the way? $file = explode('/', $file); // Remove filename portion - $file[sizeof($file)-1] = ''; + $file[count($file)-1] = ''; chdir($dest_filename_dir); foreach ($file as $entry) @@ -169,7 +169,7 @@ if (sizeof($package->old_packages)) // Create Directories along the way? $file = explode('/', $file); // Remove filename portion - $file[sizeof($file)-1] = ''; + $file[count($file)-1] = ''; chdir($dest_filename_dir . '/install/update/old'); foreach ($file as $entry) @@ -214,7 +214,7 @@ if (sizeof($package->old_packages)) // Create Directories along the way? $file = explode('/', $file); // Remove filename portion - $file[sizeof($file)-1] = ''; + $file[count($file)-1] = ''; chdir($dest_filename_dir . '/install/update/new'); foreach ($file as $entry) @@ -321,7 +321,7 @@ $update_info = array( \'version\' => array(\'from\' => \'' . str_replace('_to_', '', $package->old_packages[$_package_name]) . '\', \'to\' => \'' . $package->get('new_version_number') . '\'), '; - if (sizeof($file_contents['all'])) + if (count($file_contents['all'])) { $index_contents .= "\t'files' => array(\n\t\t'" . implode("',\n\t\t'", $file_contents['all']) . "',\n\t),\n"; } @@ -330,7 +330,7 @@ $update_info = array( $index_contents .= "\t'files' => array(),\n"; } - if (sizeof($file_contents['binary'])) + if (count($file_contents['binary'])) { $index_contents .= "\t'binary' => array(\n\t\t'" . implode("',\n\t\t'", $file_contents['binary']) . "',\n\t),\n"; } @@ -339,7 +339,7 @@ $update_info = array( $index_contents .= "\t'binary' => array(),\n"; } - if (sizeof($file_contents['deleted'])) + if (count($file_contents['deleted'])) { $index_contents .= "\t'deleted' => array(\n\t\t'" . implode("',\n\t\t'", $file_contents['deleted']) . "',\n\t),\n"; } @@ -380,7 +380,7 @@ $compress_programs = array( 'zip' => 'zip -r' ); -if (sizeof($package->old_packages)) +if (count($package->old_packages)) { // Build Patch Files chdir($package->get('patch_directory')); diff --git a/phpBB/develop/add_permissions.php b/phpBB/develop/add_permissions.php index c575729d91..d7308a1acc 100644 --- a/phpBB/develop/add_permissions.php +++ b/phpBB/develop/add_permissions.php @@ -185,7 +185,7 @@ while ($row = $db->sql_fetchrow($result)) } $db->sql_freeresult($result); -if (sizeof($remove_auth_options)) +if (count($remove_auth_options)) { $db->sql_query('DELETE FROM ' . ACL_USERS_TABLE . ' WHERE auth_option_id IN (' . implode(', ', $remove_auth_options) . ')'); $db->sql_query('DELETE FROM ' . ACL_GROUPS_TABLE . ' WHERE auth_option_id IN (' . implode(', ', $remove_auth_options) . ')'); @@ -199,7 +199,7 @@ $prefixes = array('f_', 'a_', 'm_', 'u_'); foreach ($prefixes as $prefix) { $var = $prefix . 'permissions'; - if (sizeof(${$var})) + if (count(${$var})) { foreach (${$var} as $auth_option => $l_ary) { diff --git a/phpBB/develop/check_flash_bbcodes.php b/phpBB/develop/check_flash_bbcodes.php index 5dc112bfc0..282adad229 100644 --- a/phpBB/develop/check_flash_bbcodes.php +++ b/phpBB/develop/check_flash_bbcodes.php @@ -51,7 +51,7 @@ function check_table_flash_bbcodes($table_name, $id_field, $content_field, $uid_ $ids = get_table_flash_bbcode_pkids($table_name, $id_field, $content_field, $uid_field, $bitfield_field); - $size = sizeof($ids); + $size = count($ids); if ($size) { echo "Found $size potentially dangerous flash bbcodes.\n"; diff --git a/phpBB/develop/create_variable_overview.php b/phpBB/develop/create_variable_overview.php index ace2e4d953..da9a4fe683 100644 --- a/phpBB/develop/create_variable_overview.php +++ b/phpBB/develop/create_variable_overview.php @@ -489,12 +489,12 @@ foreach ($lang_references as $lang_var => $filenames) $html_data .= '' . $lang_var . '