mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
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:
parent
8c24a42cb8
commit
c05728ad30
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user