Changeset 861


Ignore:
Timestamp:
Sep 3, 2005, 11:20:24 PM (19 years ago)
Author:
plg
Message:
  • bug fixed : no display of first added element date in admin/intro if no element in the gallery.
Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/intro.php

    r817 r861  
    158158;';
    159159list($nb_comments) = mysql_fetch_row(pwg_query($query));
    160 
    161 $query = '
    162 SELECT MIN(date_available)
    163   FROM '.IMAGES_TABLE.'
    164 ;';
    165 list($first_date) = mysql_fetch_row(pwg_query($query));
    166160
    167161$template->assign_vars(
     
    182176    'DB_GROUPS' => sprintf(l10n('%d groups'), $nb_groups),
    183177    'DB_COMMENTS' => sprintf(l10n('%d comments'), $nb_comments),
    184     'DB_DATE' =>
    185       sprintf(
    186         l10n('first element added on %s'),
    187         format_date($first_date, 'mysql_datetime')
    188         ),
    189178    'U_CHECK_UPGRADE' =>
    190179      add_session_id(PHPWG_ROOT_PATH.'admin.php?action=check_upgrade'),
     
    193182    )
    194183  );
     184
     185if ($nb_elements > 0)
     186{
     187  $query = '
     188SELECT MIN(date_available)
     189  FROM '.IMAGES_TABLE.'
     190;';
     191  list($first_date) = mysql_fetch_row(pwg_query($query));
     192
     193  $template->assign_block_vars(
     194    'first_added',
     195    array(
     196      'DB_DATE' =>
     197      sprintf(
     198        l10n('first element added on %s'),
     199        format_date($first_date, 'mysql_datetime')
     200        )
     201      )
     202    );
     203}
    195204
    196205// waiting elements
  • trunk/doc/ChangeLog

    r859 r861  
     12005-09-03 Pierrick LE GALL
     2
     3        * bug fixed : no display of first added element date in
     4        admin/intro if no element in the gallery.
     5
    162005-09-03 Pierrick LE GALL
    27
  • trunk/template/yoga/admin/intro.tpl

    r859 r861  
    2828        (<a href="{waiting.URL}">{waiting.INFO}</a>)
    2929        <!-- END waiting -->
     30
     31        <!-- BEGIN first_added -->
     32        ({first_added.DB_DATE})
     33        <!-- END first_added -->
    3034      </li>
    3135      <li>{DB_CATEGORIES}</li>
     
    3842        <!-- END unvalidated -->
    3943      </li>
    40       <li>{DB_DATE}</li>
    4144    </ul>
    4245  </dd>
Note: See TracChangeset for help on using the changeset viewer.