BUGFIX #5811 Fixed default selection of root node when CMS first opened (no currentPage set in session)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.4@110439 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sean Harvey 2010-09-05 02:32:07 +00:00 committed by Sam Minnee
parent 1aaa4b069b
commit c134b8e020

View File

@ -516,12 +516,10 @@ JS;
function RootForm() {
$siteConfig = SiteConfig::current_site_config();
$fields = $siteConfig->getCMSFields();
if(Object::has_extension('SiteConfig',"Translatable")){
$fields->push(new HiddenField('Locale','', $siteConfig->Locale ));
if(Object::has_extension('SiteConfig',"Translatable")) {
$fields->push(new HiddenField('Locale','', $siteConfig->Locale));
}
$fields->push(new HiddenField('ID', '', $siteConfig->ID));
$form = new Form($this, 'RootForm', $fields, $siteConfig->getCMSActions());
$form->setHTMLID('Form_EditForm');
$form->loadDataFrom($siteConfig);