mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-08-07 09:13:02 +02: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);
|
pwg_query($query);
|
||||||
|
|
||||||
$inserts = array();
|
$inserts = array();
|
||||||
foreach (explode(',', $_GET['batch']) as $image_id)
|
foreach (array_unique(explode(',', $_GET['batch'])) as $image_id)
|
||||||
{
|
{
|
||||||
$inserts[] = array(
|
$inserts[] = array(
|
||||||
'user_id' => $user['id'],
|
'user_id' => $user['id'],
|
||||||
|
|||||||
@@ -479,7 +479,7 @@ $(function () {
|
|||||||
// pwg.caddie.add(uploadedPhotos) instead of relying on huge GET parameter
|
// pwg.caddie.add(uploadedPhotos) instead of relying on huge GET parameter
|
||||||
// (and remove useless code from admin/photos_add_direct.php)
|
// (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));
|
$(".batchLink").html(sprintf(batch_Label, uploadedPhotos.length));
|
||||||
|
|
||||||
$(".afterUploadActions").show();
|
$(".afterUploadActions").show();
|
||||||
|
|||||||
Reference in New Issue
Block a user