mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-03-28 17:42:57 +01:00
merge r17980 from trunk to branch 2.4
little code refactoring over r17424 bug fixed on Edit Photo page when associating with no album. git-svn-id: http://piwigo.org/svn/branches/2.4@17982 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
@@ -1602,7 +1602,16 @@ DELETE '.IMAGE_CATEGORY_TABLE.'.*
|
||||
FROM '.IMAGE_CATEGORY_TABLE.'
|
||||
JOIN '.IMAGES_TABLE.' ON image_id=id
|
||||
WHERE id IN ('.implode(',', $images).')
|
||||
'.((is_array($categories) and count($categories)>0) ? 'AND category_id NOT IN ('.implode(',', $categories).')' : null).'
|
||||
';
|
||||
|
||||
if (is_array($categories) and count($categories) > 0)
|
||||
{
|
||||
$query.= '
|
||||
AND category_id NOT IN ('.implode(',', $categories).')
|
||||
';
|
||||
}
|
||||
|
||||
$query.= '
|
||||
AND (storage_category_id IS NULL OR storage_category_id != category_id)
|
||||
;';
|
||||
pwg_query($query);
|
||||
|
||||
Reference in New Issue
Block a user