mirror of
https://github.com/wilr/silverstripe-googlesitemaps.git
synced 2024-10-22 11:05:48 +02:00
MINOR: changed priority to a float field to prevent localization from messing with the values.
This commit is contained in:
parent
d7eeffcb01
commit
100e326861
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user