mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
MINOR virtual pages are now marked as broken if their pointer page is deleted (from r90996) (from r96737)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@102363 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
43fb34a748
commit
4a3986a28c
@ -1373,6 +1373,13 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
|
||||
$page->write();
|
||||
}
|
||||
|
||||
// Also write all VPs pointing here
|
||||
$suffix = Versioned::current_stage() == 'Live' ? '_Live' : '';
|
||||
foreach(DataObject::get('VirtualPage', "SiteTree$suffix.ID = SiteTree$suffix.ID AND CopyContentFromID = {$this->ID}") as $page) {
|
||||
// $page->write() calls syncLinkTracking, which does all the hard work for us.
|
||||
$page->write();
|
||||
}
|
||||
|
||||
parent::onAfterDelete();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user