mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
MINOR added batch deletion back for workflow (from r88916)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@89201 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
c50b1e4587
commit
e36798bc9b
@ -1892,6 +1892,7 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
|
||||
// Call delete on a cloned object so that this one doesn't lose its ID
|
||||
$this->flushCache();
|
||||
$clone = DataObject::get_by_id("SiteTree", $this->ID);
|
||||
if (!$clone) $clone = Versioned::get_one_by_stage('SiteTree', 'Live', '"SiteTree_Live"."ID" = ' . $this->ID);
|
||||
$clone->deleteFromStage('Live');
|
||||
|
||||
$this->Status = "Unpublished";
|
||||
|
Loading…
Reference in New Issue
Block a user