mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUG Dummy Page_Controller initiated during login now is correctly initialised via dependency injection
This commit is contained in:
parent
fca9831e66
commit
c99991ba7a
@ -341,7 +341,7 @@ class Security extends Controller {
|
||||
// Disable ID-based caching of the log-in page by making it a random number
|
||||
$tmpPage->ID = -1 * rand(1,10000000);
|
||||
|
||||
$controller = new Page_Controller($tmpPage);
|
||||
$controller = Page_Controller::create($tmpPage);
|
||||
$controller->setDataModel($this->model);
|
||||
$controller->init();
|
||||
//Controller::$currentController = $controller;
|
||||
@ -436,7 +436,7 @@ class Security extends Controller {
|
||||
$tmpPage->Title = _t('Security.LOSTPASSWORDHEADER', 'Lost Password');
|
||||
$tmpPage->URLSegment = 'Security';
|
||||
$tmpPage->ID = -1; // Set the page ID to -1 so we dont get the top level pages as its children
|
||||
$controller = new Page_Controller($tmpPage);
|
||||
$controller = Page_Controller::create($tmpPage);
|
||||
$controller->init();
|
||||
} else {
|
||||
$controller = $this;
|
||||
@ -495,7 +495,7 @@ class Security extends Controller {
|
||||
$tmpPage->Title = _t('Security.LOSTPASSWORDHEADER');
|
||||
$tmpPage->URLSegment = 'Security';
|
||||
$tmpPage->ID = -1; // Set the page ID to -1 so we dont get the top level pages as its children
|
||||
$controller = new Page_Controller($tmpPage);
|
||||
$controller = Page_Controller::create($tmpPage);
|
||||
$controller->init();
|
||||
} else {
|
||||
$controller = $this;
|
||||
@ -553,7 +553,7 @@ class Security extends Controller {
|
||||
$tmpPage->Title = _t('Security.CHANGEPASSWORDHEADER', 'Change your password');
|
||||
$tmpPage->URLSegment = 'Security';
|
||||
$tmpPage->ID = -1; // Set the page ID to -1 so we dont get the top level pages as its children
|
||||
$controller = new Page_Controller($tmpPage);
|
||||
$controller = Page_Controller::create($tmpPage);
|
||||
$controller->init();
|
||||
} else {
|
||||
$controller = $this;
|
||||
|
Loading…
Reference in New Issue
Block a user