BUGFIX: Use doDeleteFromLive when deleting pages from live, so that onBeforeUnpublish and onAfterUnpublish are called. (from r91381)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.4@96811 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sam Minnee 2010-01-13 00:06:50 +00:00
parent adfab8b55f
commit 86b08f44a4

View File

@ -561,12 +561,12 @@ JS;
$descendantsRemoved = 0;
foreach( $descendantIDs as $descID )
if( $descendant = DataObject::get_by_id('SiteTree', $descID) ) {
$descendant->delete();
$descendant->doDeleteFromLive();
$descendantsRemoved++;
}
// delete the record
$record->delete();
$record->doDeleteFromLive();
}
Versioned::reading_stage('Stage');