Skip to content

Commit

Permalink
Bug 1739 fixed : Recent pictures page returns database error
Browse files Browse the repository at this point in the history
If there's no image in database, don't select thems !

git-svn-id: http://piwigo.org/svn/trunk@6599 68402e56-0260-453c-a942-63ccdbb3a9ee
  • Loading branch information
nikrou committed Jun 24, 2010
1 parent 3aaa5b2 commit 4b4293f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion admin/element_set.php
Expand Up @@ -195,7 +195,8 @@
$page['title'] = l10n('Recent pictures');
$query = 'SELECT MAX(date_available) AS date
FROM '.IMAGES_TABLE;
if ($row = pwg_db_fetch_assoc( pwg_query($query) ) )
$row = pwg_db_fetch_assoc(pwg_query($query));
if (!empty($row['date']))
{
$query = 'SELECT id
FROM '.IMAGES_TABLE.'
Expand Down

0 comments on commit 4b4293f

Please sign in to comment.