Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

API CHANGE Removed SiteTree->Status database field, and any manual se…

…tting of this value in SiteTree logic. Please use SiteTree->IsAddedToStage and similar dynamic getters for this purpose isntead.

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@92544 467b73ca-7a2a-4603-9d3b-597d59a354a9
  • Loading branch information...
commit 393652aa49975c0cab21539f98f75479221117a6 1 parent f7f3bc7
@chillu chillu authored
View
1  core/control/ContentController.php
@@ -419,7 +419,6 @@ 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");
}
View
1  core/model/ErrorPage.php
@@ -65,7 +65,6 @@ function requireDefaultRecords() {
$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->Status = 'New page';
$errorpage->write();
DB::alteration_message('404 page created', 'created');
View
16 core/model/SiteTree.php
@@ -75,7 +75,6 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
"Sort" => "Int",
"HasBrokenFile" => "Boolean",
"HasBrokenLink" => "Boolean",
- "Status" => "Varchar",
"ReportClass" => "Varchar",
"CanViewType" => "Enum('Anyone, LoggedInUsers, OnlyTheseUsers, Inherit', 'Inherit')",
"CanEditType" => "Enum('LoggedInUsers, OnlyTheseUsers, Inherit', 'Inherit')",
@@ -120,7 +119,6 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
static $defaults = array(
"ShowInMenus" => 1,
"ShowInSearch" => 1,
- "Status" => "New page",
"CanViewType" => "Inherit",
"CanEditType" => "Inherit"
);
@@ -1230,7 +1228,6 @@ function requireDefaultRecords() {
$homepage->Title = _t('SiteTree.DEFAULTHOMETITLE', 'Home');
$homepage->Content = _t('SiteTree.DEFAULTHOMECONTENT', '<p>Welcome to SilverStripe! This is the default homepage. You can edit this page by opening <a href="admin/">the CMS</a>. You can now access the <a href="http://doc.silverstripe.org">developer documentation</a>, or begin <a href="http://doc.silverstripe.org/doku.php?id=tutorials">the tutorials.</a></p>');
$homepage->URLSegment = "home";
- $homepage->Status = "Published";
$homepage->write();
$homepage->publish("Stage", "Live");
$homepage->flushCache();
@@ -1242,7 +1239,6 @@ function requireDefaultRecords() {
$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->Status = "Published";
$aboutus->write();
$aboutus->publish("Stage", "Live");
DB::alteration_message("About Us created","created");
@@ -1251,7 +1247,6 @@ function requireDefaultRecords() {
$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->Status = "Published";
$contactus->write();
$contactus->publish("Stage", "Live");
@@ -1572,11 +1567,6 @@ function getCMSFields() {
if($this->HasBrokenLink || $this->HasBrokenFile) {
$statusMessage[] = _t('SiteTree.HASBROKENLINKS', "This page has broken links.");
}
-
- $message = "STATUS: $this->Status<br />";
- if(isset($statusMessage)) {
- $message .= "NOTE: " . implode("<br />", $statusMessage);
- }
$backLinksNote = '';
$backLinksTable = new LiteralField('BackLinksNote', '<p>' . _t('NOBACKLINKEDPAGES', 'There are no pages linked to this page.') . '</p>');
@@ -1690,7 +1680,6 @@ function getCMSFields() {
$editorGroupsField = new TreeMultiselectField("EditorGroups", $this->fieldLabel('EditorGroups'))
)
)
- //new NamedLabelField("Status", $message, "pageStatusMessage", true)
);
$viewersOptionsSource = array();
@@ -1860,7 +1849,7 @@ function doPublish() {
// Handle activities undertaken by decorators
$this->extend('onBeforePublish', $original);
- $this->Status = "Published";
+
//$this->PublishedByID = Member::currentUser()->ID;
$this->write();
$this->publish("Stage", "Live");
@@ -1938,7 +1927,6 @@ function doUnpublish() {
if (!$clone) $clone = Versioned::get_one_by_stage('SiteTree', 'Live', '"SiteTree_Live"."ID" = ' . $this->ID);
$clone->deleteFromStage('Live');
- $this->Status = "Unpublished";
$this->write();
$this->extend('onAfterUnpublish');
@@ -1950,7 +1938,6 @@ function doUnpublish() {
*/
function doRollbackTo($version) {
$this->publish($version, "Stage", true);
- $this->Status = "Saved (update)";
$this->writeWithoutVersion();
}
@@ -1962,7 +1949,6 @@ function doRevertToLive() {
// Use a clone to get the updates made by $this->publish
$clone = DataObject::get_by_id("SiteTree", $this->ID);
- $clone->Status = "Published";
$clone->writeWithoutVersion();
$this->extend('onAfterRevertToLive');
Please sign in to comment.
Something went wrong with that request. Please try again.