From 100e3268612fd1094e28d985252829ec207457db Mon Sep 17 00:00:00 2001 From: wrossiter Date: Wed, 12 Aug 2009 07:58:08 +0000 Subject: [PATCH] MINOR: changed priority to a float field to prevent localization from messing with the values. --- code/GoogleSitemapDecorator.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/GoogleSitemapDecorator.php b/code/GoogleSitemapDecorator.php index 2c2fd31..f4c42f2 100644 --- a/code/GoogleSitemapDecorator.php +++ b/code/GoogleSitemapDecorator.php @@ -11,7 +11,7 @@ class GoogleSitemapDecorator extends SiteTreeDecorator { function extraStatics() { return array( 'db' => array( - "Priority" => "Float", + "Priority" => "Varchar(5)", ) ); } @@ -72,7 +72,7 @@ class GoogleSitemapDecorator extends SiteTreeDecorator { * The default value of the priority field depends on the depth of the page in * the site tree, so it must be calculated dynamically. */ - function getPriority() { + function getPriority() { if(!$this->owner->getField('Priority')) { $parentStack = $this->owner->parentStack(); $numParents = is_array($parentStack) ? count($parentStack) - 1: 0;