From 620e09bd7c25396a1cc32fa8a394d924ddb1dc40 Mon Sep 17 00:00:00 2001 From: hdrlab Date: Wed, 19 Dec 2012 20:23:20 +1300 Subject: [PATCH] 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. --- code/GoogleSitemapDecorator.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/GoogleSitemapDecorator.php b/code/GoogleSitemapDecorator.php index 4e85382..9867bc0 100644 --- a/code/GoogleSitemapDecorator.php +++ b/code/GoogleSitemapDecorator.php @@ -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'; } } -} \ No newline at end of file +}