From a5b8e4f9c42bc0473d02559bfeb290687e6cf851 Mon Sep 17 00:00:00 2001 From: Sam Minnee Date: Tue, 19 Feb 2008 00:15:23 +0000 Subject: [PATCH] Merged revisions 43321 via svnmerge from svn://svn.silverstripe.com/silverstripe/modules/cms/branches/2.1.0-rc3oriwave2 ........ r43321 | hsmith | 2007-10-11 17:50:49 +1300 (Thu, 11 Oct 2007) | 2 lines Added LeftAndMainSubsites->augmentNewSiteTreeItem that allows extensions of LeftAndMain to provide the current SubsiteID for the new item. CMSMain->getNewItem now calls $this->extend('augmentNewSiteTreeItem', $newItem); ........ git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@49765 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- code/CMSMain.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/code/CMSMain.php b/code/CMSMain.php index 1fb7e28d..56927ded 100644 --- a/code/CMSMain.php +++ b/code/CMSMain.php @@ -450,6 +450,9 @@ JS; if($setID) $newItem->ID = $id; + # Some modules like subsites add extra fields that need to be set when the new item is created + $this->extend('augmentNewSiteTreeItem', $newItem); + return $newItem; }