aboutsummaryrefslogtreecommitdiffstats
path: root/admin
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--admin/intro.php31
1 files changed, 20 insertions, 11 deletions
diff --git a/admin/intro.php b/admin/intro.php
index 450f39902..71a657c03 100644
--- a/admin/intro.php
+++ b/admin/intro.php
@@ -158,12 +158,6 @@ SELECT COUNT(*)
;';
list($nb_comments) = mysql_fetch_row(pwg_query($query));
-$query = '
-SELECT MIN(date_available)
- FROM '.IMAGES_TABLE.'
-;';
-list($first_date) = mysql_fetch_row(pwg_query($query));
-
$template->assign_vars(
array(
'PWG_VERSION' => PHPWG_VERSION,
@@ -181,11 +175,6 @@ $template->assign_vars(
'DB_USERS' => sprintf(l10n('%d users'), $nb_users),
'DB_GROUPS' => sprintf(l10n('%d groups'), $nb_groups),
'DB_COMMENTS' => sprintf(l10n('%d comments'), $nb_comments),
- 'DB_DATE' =>
- sprintf(
- l10n('first element added on %s'),
- format_date($first_date, 'mysql_datetime')
- ),
'U_CHECK_UPGRADE' =>
add_session_id(PHPWG_ROOT_PATH.'admin.php?action=check_upgrade'),
'U_PHPINFO' =>
@@ -193,6 +182,26 @@ $template->assign_vars(
)
);
+if ($nb_elements > 0)
+{
+ $query = '
+SELECT MIN(date_available)
+ FROM '.IMAGES_TABLE.'
+;';
+ list($first_date) = mysql_fetch_row(pwg_query($query));
+
+ $template->assign_block_vars(
+ 'first_added',
+ array(
+ 'DB_DATE' =>
+ sprintf(
+ l10n('first element added on %s'),
+ format_date($first_date, 'mysql_datetime')
+ )
+ )
+ );
+}
+
// waiting elements
$query = '
SELECT COUNT(*)