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
This commit is contained in:
Andrew O'Neil 2007-08-20 05:21:39 +00:00
parent 16edb3a4c2
commit 7a150c48db
1 changed files with 8 additions and 0 deletions

View File

@ -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');