mirror of
https://github.com/wilr/silverstripe-googlesitemaps.git
synced 2024-10-22 11:05:48 +02:00
A fix so that non-indexed pages remain non-indexed
Pages that were set to be "non-indexed" were being reset to their default priorities the next time that the page was saved. This fix makes sure that this doesn't happen.
This commit is contained in:
parent
e801e91636
commit
620e09bd7c
@ -81,7 +81,7 @@ class GoogleSitemapSiteTreeDecorator extends SiteTreeDecorator {
|
||||
return max(0.1, 1.0 - ($numParents / 10));
|
||||
}
|
||||
elseif ($this->owner->getField('Priority') == -1) {
|
||||
return 0;
|
||||
return -1;
|
||||
}
|
||||
else {
|
||||
$priority = abs($this->owner->getField('Priority'));
|
||||
@ -129,4 +129,4 @@ class GoogleSitemapSiteTreeDecorator extends SiteTreeDecorator {
|
||||
$this->owner->ChangeFreq = 'always';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user