From 7a150c48dbcaab3910199f6659ceb5c778340f51 Mon Sep 17 00:00:00 2001 From: Andrew O'Neil Date: Mon, 20 Aug 2007 05:21:39 +0000 Subject: [PATCH] Publish error page after installation is complete git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@40531 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- core/control/ContentController.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/core/control/ContentController.php b/core/control/ContentController.php index a2d78232e..8d2f143e9 100644 --- a/core/control/ContentController.php +++ b/core/control/ContentController.php @@ -322,6 +322,14 @@ HTML; * This action is called by the installation system */ function successfullyinstalled() { + // The manifest should be built by now, so it's safe to publish the 404 page + $fourohfour = Versioned::get_one_by_stage('ErrorPage', 'Stage', 'ErrorCode = 404'); + if($fourohfour) { + $fourohfour->Status = "Published"; + $fourohfour->write(); + $fourohfour->publish("Stage", "Live"); + } + $title = new Varchar("Title"); $content = new HTMLText("Content"); $username = Session::get('username');