diff --git a/core/model/SiteTree.php b/core/model/SiteTree.php index 6d7006ded..970b6a42b 100755 --- a/core/model/SiteTree.php +++ b/core/model/SiteTree.php @@ -1295,31 +1295,37 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid if($this->class == 'SiteTree') { if(!SiteTree::get_by_link('home')) { $homepage = new Page(); - $homepage->Title = _t('SiteTree.DEFAULTHOMETITLE', 'Home'); $homepage->Content = _t('SiteTree.DEFAULTHOMECONTENT', '
Welcome to SilverStripe! This is the default homepage. You can edit this page by opening the CMS. You can now access the developer documentation, or begin the tutorials.
'); - $homepage->URLSegment = "home"; + $homepage->URLSegment = 'home'; + $homepage->Status = 'Published'; + $homepage->Sort = 1; $homepage->write(); - $homepage->publish("Stage", "Live"); + $homepage->publish('Stage', 'Live'); $homepage->flushCache(); - DB::alteration_message("Home page created","created"); + DB::alteration_message('Home page created', 'created'); } if(DB::query("SELECT COUNT(*) FROM \"SiteTree\"")->value() == 1) { $aboutus = new Page(); $aboutus->Title = _t('SiteTree.DEFAULTABOUTTITLE', 'About Us'); $aboutus->Content = _t('SiteTree.DEFAULTABOUTCONTENT', 'You can fill this page out with your own content, or delete it and create your own pages.
You can fill this page out with your own content, or delete it and create your own pages.