Browse Source

Avoid duplicate counts of the same file being deleted.

pull/960/head
Rosie Le Faive 2 years ago
parent
commit
8686dbf74b
  1. 3
      src/Form/ConfirmDeleteMediaAndFile.php

3
src/Form/ConfirmDeleteMediaAndFile.php

@ -137,9 +137,12 @@ class ConfirmDeleteMediaAndFile extends DeleteMultipleForm {
$inaccessible_entities[] = $file; $inaccessible_entities[] = $file;
continue; continue;
} }
if (!array_key_exists($file->id(), $delete_files)) {
$delete_files[$file->id()] = $file; $delete_files[$file->id()] = $file;
$total_count++; $total_count++;
} }
}
} }
} }

Loading…
Cancel
Save