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 | |
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
-rw-r--r-- | admin/intro.php | 31 | ||||
-rw-r--r-- | doc/ChangeLog | 5 | ||||
-rw-r--r-- | template/yoga/admin/intro.tpl | 5 |
3 files changed, 29 insertions, 12 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(*) diff --git a/doc/ChangeLog b/doc/ChangeLog index 5770eb929..b00a6a902 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,5 +1,10 @@ 2005-09-03 Pierrick LE GALL + * bug fixed : no display of first added element date in + admin/intro if no element in the gallery. + +2005-09-03 Pierrick LE GALL + * new : template yoga, made by yoDan, helped by chrisaga for integration becomes the official template. diff --git a/template/yoga/admin/intro.tpl b/template/yoga/admin/intro.tpl index ac50d986a..58c6b2510 100644 --- a/template/yoga/admin/intro.tpl +++ b/template/yoga/admin/intro.tpl @@ -27,6 +27,10 @@ <!-- BEGIN waiting --> (<a href="{waiting.URL}">{waiting.INFO}</a>) <!-- END waiting --> + + <!-- BEGIN first_added --> + ({first_added.DB_DATE}) + <!-- END first_added --> </li> <li>{DB_CATEGORIES}</li> <li>{DB_USERS}</li> @@ -37,7 +41,6 @@ (<a href="{unvalidated.URL}">{unvalidated.INFO}</a>) <!-- END unvalidated --> </li> - <li>{DB_DATE}</li> </ul> </dd> |