BUGFIX Only trigger BackLinkTracking updates in SiteTree->onBeforeWrite() if the URLSegment is an actual change (type 2), not only a type change. This messed up batch publications, are previously published pages were marked as changed in subsequent write calls to the same object. (from r78337)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@81466 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sam Minnee 2009-07-09 05:55:17 +00:00
parent ceb0afeb78
commit c280542b9b

View File

@ -1022,7 +1022,7 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
DataObject::set_context_obj(null);
// If the URLSegment has been changed, rewrite links
if($this->isChanged('URLSegment')) {
if($this->isChanged('URLSegment', 2)) {
if($this->hasMethod('BackLinkTracking')) {
$links = $this->BackLinkTracking();
if($links) {