mirror of
https://github.com/processwire/processwire.git
synced 2025-08-21 22:06:12 +02:00
Fix issue processwire/processwire-issues#992
This commit is contained in:
@@ -976,7 +976,9 @@ class FieldtypeFile extends FieldtypeMulti implements ConfigurableModule {
|
|||||||
// pagefiles is a default/fallback value from another page and should not be deleted
|
// pagefiles is a default/fallback value from another page and should not be deleted
|
||||||
|
|
||||||
} else if($pagefiles instanceof Pagefiles) {
|
} 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) {
|
} else if($pagefiles instanceof Pagefile) {
|
||||||
$pagefiles->unlink();
|
$pagefiles->unlink();
|
||||||
|
Reference in New Issue
Block a user