feature 2548 multisize - implement delete_element_derivatives

git-svn-id: http://piwigo.org/svn/trunk@12917 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
rvelices
2012-01-17 21:02:16 +00:00
parent 89933672f2
commit c6265c515d
3 changed files with 61 additions and 61 deletions
+2 -3
View File
@@ -2,7 +2,7 @@
// +-----------------------------------------------------------------------+
// | Piwigo - a PHP based photo gallery |
// +-----------------------------------------------------------------------+
// | Copyright(C) 2008-2011 Piwigo Team http://piwigo.org |
// | Copyright(C) 2008-2012 Piwigo Team http://piwigo.org |
// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
// +-----------------------------------------------------------------------+
@@ -458,11 +458,10 @@ SELECT date_available,
if ($max_elements>0)
{ // get some thumbnails ...
$query = '
SELECT DISTINCT id, path, name, representative_ext, file
SELECT DISTINCT i.*
FROM '.IMAGES_TABLE.' i INNER JOIN '.IMAGE_CATEGORY_TABLE.' AS ic ON id=image_id
'.$where_sql.'
AND date_available=\''.$dates[$i]['date_available'].'\'
AND tn_ext IS NOT NULL
ORDER BY '.DB_RANDOM_FUNCTION.'()
LIMIT '.$max_elements.'
;';