diff options
author | nikrou <nikrou@piwigo.org> | 2010-06-24 18:48:24 +0000 |
---|---|---|
committer | nikrou <nikrou@piwigo.org> | 2010-06-24 18:48:24 +0000 |
commit | 4b4293ffffb62d8df2191c4626240c3d735fae44 (patch) | |
tree | ad9b6a3c3ae8b144e8211a4ca22e4dd946b54a55 /admin/element_set.php | |
parent | 3aaa5b2dfd3434e62d4116cba48853c8293a7f78 (diff) |
Bug 1739 fixed : Recent pictures page returns database error
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
Diffstat (limited to '')
-rw-r--r-- | admin/element_set.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/admin/element_set.php b/admin/element_set.php index c19272084..58113861d 100644 --- a/admin/element_set.php +++ b/admin/element_set.php @@ -195,7 +195,8 @@ elseif ('recent'== $_GET['cat']) $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.' |