From 73de615e7c07281c6d117983cad8dafb12c164ff Mon Sep 17 00:00:00 2001 From: Sam Minnee Date: Tue, 12 Jan 2010 23:11:48 +0000 Subject: [PATCH] BUGFIX: Call onBeforeUnpublish/onAfterUnpublish events in doDeleteFromLive, because they amount to the same thing. (from r90001) git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@96732 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- core/model/SiteTree.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core/model/SiteTree.php b/core/model/SiteTree.php index cdef30896..8a8bbd786 100755 --- a/core/model/SiteTree.php +++ b/core/model/SiteTree.php @@ -1951,10 +1951,14 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid } function doDeleteFromLive() { + $this->extend('onBeforeUnpublish'); + $origStage = Versioned::current_stage(); Versioned::reading_stage('Live'); $this->delete(); - Versioned::reading_stage($origStage); + Versioned::reading_stage($origStage); + + $this->extend('onAfterUnpublish'); } /**