mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
Add an extension hook to the getIsModifiedOnStage method
This commit is contained in:
parent
7fc5a29f35
commit
d2f0eafa27
@ -2809,7 +2809,10 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
|
|||||||
$stageVersion = Versioned::get_versionnumber_by_stage('SiteTree', 'Stage', $this->ID);
|
$stageVersion = Versioned::get_versionnumber_by_stage('SiteTree', 'Stage', $this->ID);
|
||||||
$liveVersion = Versioned::get_versionnumber_by_stage('SiteTree', 'Live', $this->ID);
|
$liveVersion = Versioned::get_versionnumber_by_stage('SiteTree', 'Live', $this->ID);
|
||||||
|
|
||||||
return ($stageVersion && $stageVersion != $liveVersion);
|
$isModified = ($stageVersion && $stageVersion != $liveVersion);
|
||||||
|
$this->extend('getIsModifiedOnStage', $isModified);
|
||||||
|
|
||||||
|
return $isModified;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user