mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-03-28 17:42:57 +01:00
fixes #2396 avoid duplicate image_id in link to manage uploaded photos
This commit is contained in:
@@ -26,7 +26,7 @@ DELETE FROM '.CADDIE_TABLE.'
|
||||
pwg_query($query);
|
||||
|
||||
$inserts = array();
|
||||
foreach (explode(',', $_GET['batch']) as $image_id)
|
||||
foreach (array_unique(explode(',', $_GET['batch'])) as $image_id)
|
||||
{
|
||||
$inserts[] = array(
|
||||
'user_id' => $user['id'],
|
||||
|
||||
@@ -479,7 +479,7 @@ $(function () {
|
||||
// pwg.caddie.add(uploadedPhotos) instead of relying on huge GET parameter
|
||||
// (and remove useless code from admin/photos_add_direct.php)
|
||||
|
||||
$(".batchLink").attr("href", "admin.php?page=photos_add§ion=direct&batch=" + uploadedPhotos.join(","));
|
||||
$(".batchLink").attr("href", "admin.php?page=photos_add§ion=direct&batch=" + [...new Set(uploadedPhotos)].join(","));
|
||||
$(".batchLink").html(sprintf(batch_Label, uploadedPhotos.length));
|
||||
|
||||
$(".afterUploadActions").show();
|
||||
|
||||
Reference in New Issue
Block a user