aboutsummaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorrxu <rxu@mail.ru>2017-06-28 00:58:03 +0700
committerMarc Alexander <admin@m-a-styles.de>2018-01-01 13:56:04 +0100
commitf8fbe3793680af1dae2db2829cfc84068831c52f (patch)
tree54c7108b28fb58688a8695a0b592c163314a09f9 /build
parentff18802656e72981f6ecb613d756bc19f2462689 (diff)
downloadforums-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 'build')
-rw-r--r--build/build_helper.php4
-rwxr-xr-xbuild/package.php16
2 files changed, 10 insertions, 10 deletions
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'));