Browse Source

Avoid duplicate counts of the same file being deleted.

pull/960/head
Rosie Le Faive 1 year ago
parent
commit
8686dbf74b
  1. 7
      src/Form/ConfirmDeleteMediaAndFile.php

7
src/Form/ConfirmDeleteMediaAndFile.php

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

Loading…
Cancel
Save