Skip to content

Commit

Permalink
MINOR #4973 Automatically generate URLSegment for default records on …
Browse files Browse the repository at this point in the history
…SiteTree and ErrorPage instead of explicitly setting them (from r94352)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@95599 467b73ca-7a2a-4603-9d3b-597d59a354a9
  • Loading branch information
Sean Harvey committed Dec 16, 2009
1 parent e615db9 commit afb06e4
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 3 deletions.
1 change: 0 additions & 1 deletion core/model/ErrorPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ function requireDefaultRecords() {
$errorpage = new ErrorPage();
$errorpage->ErrorCode = 404;
$errorpage->Title = _t('ErrorPage.DEFAULTERRORPAGETITLE', 'Page not found');
$errorpage->URLSegment = 'page-not-found';
$errorpage->Content = _t('ErrorPage.DEFAULTERRORPAGECONTENT', '<p>Sorry, it seems you were trying to access a page that doesn\'t exist.</p><p>Please check the spelling of the URL you were trying to access and try again.</p>');
$errorpage->write();

Expand Down
2 changes: 0 additions & 2 deletions core/model/SiteTree.php
Original file line number Diff line number Diff line change
Expand Up @@ -1215,15 +1215,13 @@ function requireDefaultRecords() {
$aboutus = new Page();
$aboutus->Title = _t('SiteTree.DEFAULTABOUTTITLE', 'About Us');
$aboutus->Content = _t('SiteTree.DEFAULTABOUTCONTENT', '<p>You can fill this page out with your own content, or delete it and create your own pages.<br /></p>');
$aboutus->URLSegment = "about-us";
$aboutus->write();
$aboutus->publish("Stage", "Live");
DB::alteration_message("About Us created","created");

$contactus = new Page();
$contactus->Title = _t('SiteTree.DEFAULTCONTACTTITLE', 'Contact Us');
$contactus->Content = _t('SiteTree.DEFAULTCONTACTCONTENT', '<p>You can fill this page out with your own content, or delete it and create your own pages.<br /></p>');
$contactus->URLSegment = "contact-us";
$contactus->write();
$contactus->publish("Stage", "Live");

Expand Down

0 comments on commit afb06e4

Please sign in to comment.