aboutsummaryrefslogtreecommitdiffstats
path: root/admin/intro.php
diff options
context:
space:
mode:
Diffstat (limited to 'admin/intro.php')
-rw-r--r--admin/intro.php59
1 files changed, 11 insertions, 48 deletions
diff --git a/admin/intro.php b/admin/intro.php
index c454e50b4..ee0149841 100644
--- a/admin/intro.php
+++ b/admin/intro.php
@@ -2,7 +2,7 @@
// +-----------------------------------------------------------------------+
// | Piwigo - a PHP based photo gallery |
// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008-2013 Piwigo Team http://piwigo.org |
+// | Copyright(C) 2008-2014 Piwigo Team http://piwigo.org |
// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
// +-----------------------------------------------------------------------+
@@ -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,18 +189,15 @@ $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),
'DB_USERS' => l10n_dec('%d user', '%d users', $nb_users),
'DB_GROUPS' => l10n_dec('%d group', '%d groups', $nb_groups),
- 'DB_RATES' => ($nb_rates == 0) ? l10n('no rate') : sprintf(l10n('%d rates'), $nb_rates),
+ 'DB_RATES' => ($nb_rates == 0) ? l10n('no rate') : l10n('%d rates', $nb_rates),
'U_CHECK_UPGRADE' => PHPWG_ROOT_PATH.'admin.php?action=check_upgrade',
'U_PHPINFO' => PHPWG_ROOT_PATH.'admin.php?action=phpinfo',
'PHP_DATATIME' => $php_current_timestamp,
@@ -228,25 +213,6 @@ SELECT COUNT(*)
;';
list($nb_comments) = pwg_db_fetch_row(pwg_query($query));
$template->assign('DB_COMMENTS', l10n_dec('%d comment', '%d comments', $nb_comments));
-
- // unvalidated comments
- $query = '
-SELECT COUNT(*)
- FROM '.COMMENTS_TABLE.'
- WHERE validated=\'false\'
-;';
- list($nb_comments) = pwg_db_fetch_row(pwg_query($query));
-
- if ($nb_comments > 0)
- {
- $template->assign(
- 'unvalidated',
- array(
- 'URL' => PHPWG_ROOT_PATH.'admin.php?page=comments',
- 'INFO' => sprintf(l10n('%d waiting for validation'), $nb_comments)
- )
- );
- }
}
if ($nb_elements > 0)
@@ -261,10 +227,7 @@ SELECT MIN(date_available)
'first_added',
array(
'DB_DATE' =>
- sprintf(
- l10n('first photo added on %s'),
- format_date($first_date)
- )
+ l10n('first photo added on %s', format_date($first_date))
)
);
}