API CHANGE: Added SiteTree::doDeleteFromLive()

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@76723 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sam Minnee 2009-05-13 05:13:20 +00:00
parent 8c24a42cb8
commit c05728ad30

View File

@ -1521,6 +1521,13 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
return $result;
}
function doDeleteFromLive() {
$origStage = Versioned::current_stage();
Versioned::reading_stage('Live');
$this->delete();
Versioned::reading_stage($origStage);
}
/**
* Check if this page is new - that is, if it has yet to have been written
* to the database.