mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
BUGFIX: Use doDeleteFromLive when deleting pages from live, so that onBeforeUnpublish and onAfterUnpublish are called. (from r91381) (from r96811)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@102674 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
b367ecd2d4
commit
fd2037f603
@ -515,12 +515,12 @@ JS;
|
|||||||
$descendantsRemoved = 0;
|
$descendantsRemoved = 0;
|
||||||
foreach( $descendantIDs as $descID )
|
foreach( $descendantIDs as $descID )
|
||||||
if( $descendant = DataObject::get_by_id('SiteTree', $descID) ) {
|
if( $descendant = DataObject::get_by_id('SiteTree', $descID) ) {
|
||||||
$descendant->delete();
|
$descendant->doDeleteFromLive();
|
||||||
$descendantsRemoved++;
|
$descendantsRemoved++;
|
||||||
}
|
}
|
||||||
|
|
||||||
// delete the record
|
// delete the record
|
||||||
$record->delete();
|
$record->doDeleteFromLive();
|
||||||
}
|
}
|
||||||
|
|
||||||
Versioned::reading_stage('Stage');
|
Versioned::reading_stage('Stage');
|
||||||
|
Loading…
Reference in New Issue
Block a user