mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge pull request #6489 from robbieaverill/bugfix/fallback-layout-for-security
FIX Regression in using template_main to render the Security area
This commit is contained in:
commit
b44b8e8209
@ -514,15 +514,17 @@ class Security extends Controller implements TemplateGlobalProvider
|
|||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Use sitetree pages to render the security page
|
// Use the default setting for which Page to use to render the security page
|
||||||
$tmpPage = new SiteTree();
|
$pageClass = (string) $this->stat('template_main');
|
||||||
|
$tmpPage = new $pageClass;
|
||||||
$tmpPage->Title = $title;
|
$tmpPage->Title = $title;
|
||||||
/** @skipUpgrade */
|
/** @skipUpgrade */
|
||||||
$tmpPage->URLSegment = 'Security';
|
$tmpPage->URLSegment = 'Security';
|
||||||
// Disable ID-based caching of the log-in page by making it a random number
|
// Disable ID-based caching of the log-in page by making it a random number
|
||||||
$tmpPage->ID = -1 * rand(1, 10000000);
|
$tmpPage->ID = -1 * rand(1, 10000000);
|
||||||
|
|
||||||
$controller = ContentController::create($tmpPage);
|
$controllerClass = $tmpPage->getControllerName();
|
||||||
|
$controller = $controllerClass::create($tmpPage);
|
||||||
$controller->setDataModel($this->model);
|
$controller->setDataModel($this->model);
|
||||||
$controller->doInit();
|
$controller->doInit();
|
||||||
return $controller;
|
return $controller;
|
||||||
|
Loading…
Reference in New Issue
Block a user