mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
BUGFIX: SiteTree::onAfterPublish() will still pass an object to the handlers on the first publish
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@63823 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
b79c0661a4
commit
09cb773f5c
@ -1252,6 +1252,7 @@ class SiteTree extends DataObject {
|
||||
*/
|
||||
function doPublish() {
|
||||
$original = Versioned::get_one_by_stage("SiteTree", "Live", "`SiteTree`.`ID` = $this->ID");
|
||||
if(!$original) $original = new SiteTree();
|
||||
|
||||
// Handle activities undertaken by decorators
|
||||
$this->extend('onBeforePublish', $original);
|
||||
|
Loading…
x
Reference in New Issue
Block a user