aboutsummaryrefslogtreecommitdiffstats
path: root/admin/intro.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/intro.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/intro.php31
1 files changed, 8 insertions, 23 deletions
diff --git a/admin/intro.php b/admin/intro.php
index b8d6c8dd4..53fe33c9f 100644
--- a/admin/intro.php
+++ b/admin/intro.php
@@ -45,7 +45,7 @@ if (isset($_GET['action']) and 'check_upgrade' == $_GET['action'])
{
if (!fetchRemote(PHPWG_URL.'/download/latest_version', $result))
{
- array_push($page['errors'], l10n('Unable to check for upgrade.'));
+ $page['errors'][] = l10n('Unable to check for upgrade.');
}
else
{
@@ -73,33 +73,21 @@ if (isset($_GET['action']) and 'check_upgrade' == $_GET['action'])
if ('' == $versions['latest'])
{
- array_push(
- $page['errors'],
- l10n('Check for upgrade failed for unknown reasons.')
- );
+ $page['errors'][] = l10n('Check for upgrade failed for unknown reasons.');
}
// concatenation needed to avoid automatic transformation by release
// script generator
else if ('%'.'PWGVERSION'.'%' == $versions['current'])
{
- array_push(
- $page['infos'],
- l10n('You are running on development sources, no check possible.')
- );
+ $page['infos'][] = l10n('You are running on development sources, no check possible.');
}
else if (version_compare($versions['current'], $versions['latest']) < 0)
{
- array_push(
- $page['infos'],
- l10n('A new version of Piwigo is available.')
- );
+ $page['infos'][] = l10n('A new version of Piwigo is available.');
}
else
{
- array_push(
- $page['infos'],
- l10n('You are running the latest version of Piwigo.')
- );
+ $page['infos'][] = l10n('You are running the latest version of Piwigo.');
}
}
}
@@ -201,12 +189,9 @@ $template->assign(
'DB_VERSION' => $db_version,
'DB_ELEMENTS' => l10n_dec('%d photo', '%d photos', $nb_elements),
'DB_CATEGORIES' =>
- l10n_dec('%d album including', '%d albums including',
- $nb_categories).
- l10n_dec('%d physical', '%d physicals',
- $nb_physical).
- l10n_dec(' and %d virtual', ' and %d virtuals',
- $nb_virtual),
+ l10n_dec('%d album including', '%d albums including', $nb_categories).
+ l10n_dec('%d physical', '%d physicals', $nb_physical).
+ l10n_dec(' and %d virtual', ' and %d virtuals', $nb_virtual),
'DB_IMAGE_CATEGORY' => l10n_dec('%d association', '%d associations', $nb_image_category),
'DB_TAGS' => l10n_dec('%d tag', '%d tags', $nb_tags),
'DB_IMAGE_TAG' => l10n_dec('%d association', '%d associations', $nb_image_tag),