MINOR Removed SiteTreeSubsites->onAfterWrite(), same behaviour already implemented in SiteTree (copying content from VirtualPage records, including its subclass SubsitesVirtualPage) (AIR-52)

This commit is contained in:
Ingo Schommer 2011-09-05 18:11:51 +02:00
parent 069c5ada3c
commit bb486548d6

View File

@ -112,20 +112,6 @@ class SiteTreeSubsites extends SiteTreeDecorator {
parent::onBeforeWrite();
}
function onAfterWrite(&$original) {
// Update any subsite virtual pages that might need updating
$oldState = Subsite::$disable_subsite_filter;
Subsite::$disable_subsite_filter = true;
$linkedPages = DataObject::get("SubsitesVirtualPage", "\"CopyContentFromID\" = {$this->owner->ID}");
if($linkedPages) foreach($linkedPages as $page) {
$page->copyFrom($page->CopyContentFrom());
$page->write();
}
Subsite::$disable_subsite_filter = $oldState;
}
function onAfterPublish(&$original) {
// Publish any subsite virtual pages that might need publishing
$oldState = Subsite::$disable_subsite_filter;