1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-21 14:02:59 +02:00
This commit is contained in:
Ryan Cramer
2019-10-16 09:02:59 -04:00
parent adbc5bf95a
commit 22fe5bf9ef

View File

@@ -976,7 +976,9 @@ class FieldtypeFile extends FieldtypeMulti implements ConfigurableModule {
// pagefiles is a default/fallback value from another page and should not be deleted
} else if($pagefiles instanceof Pagefiles) {
$pagefiles->deleteAll();
// $pagefiles->removeAll() not used here because it queues delete to $page->save(),
// which does not occur when a field is removed from a template
foreach($pagefiles as $pagefile) $pagefile->unlink();
} else if($pagefiles instanceof Pagefile) {
$pagefiles->unlink();