diff options
author | plegall <plg@piwigo.org> | 2005-09-03 21:20:24 +0000 |
---|---|---|
committer | plegall <plg@piwigo.org> | 2005-09-03 21:20:24 +0000 |
commit | eac1724ee5e20967d989916b76fc9076411be758 (patch) | |
tree | cb07a9bb1c32a567f1f8d948bce00c16bf6b7c9d /admin/intro.php | |
parent | c614c0798e96109170d2382121e897cc5b80cb06 (diff) |
- bug fixed : no display of first added element date in admin/intro if no
element in the gallery.
git-svn-id: http://piwigo.org/svn/trunk@861 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r-- | admin/intro.php | 31 |
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(*) |