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:
Sam Minnee 2009-10-15 22:36:26 +00:00
parent c50b1e4587
commit e36798bc9b

View File

@ -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";