From 86b08f44a417f53b03e9a57b4b6dedeabdad0e32 Mon Sep 17 00:00:00 2001 From: Sam Minnee Date: Wed, 13 Jan 2010 00:06:50 +0000 Subject: [PATCH] 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 --- code/CMSMain.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/CMSMain.php b/code/CMSMain.php index 9dac31f2..707c96c2 100755 --- a/code/CMSMain.php +++ b/code/CMSMain.php @@ -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');