MINOR: changed priority to a float field to prevent localization from messing with the values.

This commit is contained in:
wrossiter 2009-08-12 07:58:08 +00:00
parent d7eeffcb01
commit 100e326861
1 changed files with 2 additions and 2 deletions

View File

@ -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;