From bb486548d6ec229339aa569e9736ba5fc202bad8 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Mon, 5 Sep 2011 18:11:51 +0200 Subject: [PATCH] MINOR Removed SiteTreeSubsites->onAfterWrite(), same behaviour already implemented in SiteTree (copying content from VirtualPage records, including its subclass SubsitesVirtualPage) (AIR-52) --- code/SiteTreeSubsites.php | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/code/SiteTreeSubsites.php b/code/SiteTreeSubsites.php index 19d4bcb..3a38f2e 100644 --- a/code/SiteTreeSubsites.php +++ b/code/SiteTreeSubsites.php @@ -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;