aboutsummaryrefslogtreecommitdiffstats
path: root/admin/include/functions_upgrade.php
diff options
context:
space:
mode:
authormistic100 <mistic@piwigo.org>2013-10-19 17:43:04 +0000
committermistic100 <mistic@piwigo.org>2013-10-19 17:43:04 +0000
commitae707279a1945e383c312cd648d288606a79e341 (patch)
tree917bdc6e0609ed0eefed5f3693de3a017685acc4 /admin/include/functions_upgrade.php
parent35ff1b7c1f933799397a0ce0a6723cf82f416ff3 (diff)
remove all array_push (50% slower than []) + some changes missing for feature:2978
git-svn-id: http://piwigo.org/svn/trunk@25018 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--admin/include/functions_upgrade.php20
1 files changed, 10 insertions, 10 deletions
diff --git a/admin/include/functions_upgrade.php b/admin/include/functions_upgrade.php
index ed4b0f410..5ede711fe 100644
--- a/admin/include/functions_upgrade.php
+++ b/admin/include/functions_upgrade.php
@@ -93,7 +93,7 @@ AND id NOT IN (\'' . implode('\',\'', $standard_plugins) . '\')
$plugins = array();
while ($row = pwg_db_fetch_assoc($result))
{
- array_push($plugins, $row['id']);
+ $plugins[] = $row['id'];
}
if (!empty($plugins))
@@ -105,8 +105,8 @@ WHERE id IN (\'' . implode('\',\'', $plugins) . '\')
;';
pwg_query($query);
- array_push($page['infos'],
- l10n('As a precaution, following plugins have been deactivated. You must check for plugins upgrade before reactiving them:').'<p><i>'.implode(', ', $plugins).'</i></p>');
+ $page['infos'][] = l10n('As a precaution, following plugins have been deactivated. You must check for plugins upgrade before reactiving them:')
+ .'<p><i>'.implode(', ', $plugins).'</i></p>';
}
}
@@ -135,8 +135,8 @@ SELECT
$theme_names = array();
while ($row = pwg_db_fetch_assoc($result))
{
- array_push($theme_ids, $row['id']);
- array_push($theme_names, $row['name']);
+ $theme_ids[] = $row['id'];
+ $theme_names[] = $row['name'];
}
if (!empty($theme_ids))
@@ -148,8 +148,8 @@ DELETE
;';
pwg_query($query);
- array_push($page['infos'],
- l10n('As a precaution, following themes have been deactivated. You must check for themes upgrade before reactiving them:').'<p><i>'.implode(', ', $theme_names).'</i></p>');
+ $page['infos'][] = l10n('As a precaution, following themes have been deactivated. You must check for themes upgrade before reactiving them:')
+ .'<p><i>'.implode(', ', $theme_names).'</i></p>';
// what is the default theme?
$query = '
@@ -249,11 +249,11 @@ WHERE '.$conf['user_fields']['username'].'=\''.$username.'\'
if (!$conf['password_verify']($password, $row['password']))
{
- array_push($page['errors'], l10n('Invalid password!'));
+ $page['errors'][] = l10n('Invalid password!');
}
elseif ($row['status'] != 'admin' and $row['status'] != 'webmaster')
{
- array_push($page['errors'], l10n('You do not have access rights to run upgrade'));
+ $page['errors'][] = l10n('You do not have access rights to run upgrade');
}
else
{
@@ -279,7 +279,7 @@ function get_available_upgrade_ids()
if (is_file($upgrades_path.'/'.$node)
and preg_match('/^(.*?)-database\.php$/', $node, $match))
{
- array_push($available_upgrade_ids, $match[1]);
+ $available_upgrade_ids[] = $match[1];
}
}
}