Fixed "Priority" appears twice in CMS error
Cleanly ensure that even if updateCMSFields is called twice (due to other decorators) that it doesn't cause an error. See here: http://www.silverstripe.org/all-other-modules/show/14827#post296739
This commit is contained in:
parent
61ad4dce88
commit
2048c3ea64
|
@ -38,7 +38,10 @@ class GoogleSitemapSiteTreeDecorator extends SiteTreeDecorator {
|
|||
'0.2' => '9',
|
||||
'0.1' => '10 - ' . _t('SiteTree.PRIORITYLEASTIMPORTANT', "Least important")
|
||||
);
|
||||
|
||||
|
||||
/* Remove GoogleSitemap tab if it already exists */
|
||||
$fields->removeByName('GoogleSitemap');
|
||||
|
||||
$tabset = $fields->findOrMakeTab('Root.Content');
|
||||
|
||||
$message = "<p>";
|
||||
|
@ -129,4 +132,4 @@ class GoogleSitemapSiteTreeDecorator extends SiteTreeDecorator {
|
|||
$this->owner->ChangeFreq = 'always';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue