Skip to content

Commit

Permalink
[trunk] - feature:2961 Thanks to msakik for report
Browse files Browse the repository at this point in the history
git-svn-id: http://piwigo.org/svn/trunk@24525 68402e56-0260-453c-a942-63ccdbb3a9ee
  • Loading branch information
ddtddt committed Sep 18, 2013
1 parent d2149bc commit fe8e2c9
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions admin/batch_manager_global.php
Expand Up @@ -121,18 +121,20 @@

if ('del_tags' == $action)
{
if (count($_POST['del_tags']) == 0)
if (isset($_POST['del_tags']) and count($_POST['del_tags']) > 0)
{
array_push($page['errors'], l10n('Select at least one tag'));
}

$query = '
DELETE
FROM '.IMAGE_TAG_TABLE.'
WHERE image_id IN ('.implode(',', $collection).')
AND tag_id IN ('.implode(',', $_POST['del_tags']).')
;';
pwg_query($query);
}
else
{
array_push($page['errors'], l10n('Select at least one tag'));
}
}

if ('associate' == $action)
Expand Down

0 comments on commit fe8e2c9

Please sign in to comment.