mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge pull request #863 from tractorcow/3.0-security-DI-fixes
BUG: Fixed use of DI in the Security controller
This commit is contained in:
commit
fe65da7250
@ -341,7 +341,7 @@ class Security extends Controller {
|
|||||||
// 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 = new Page_Controller($tmpPage);
|
$controller = Page_Controller::create($tmpPage);
|
||||||
$controller->setDataModel($this->model);
|
$controller->setDataModel($this->model);
|
||||||
$controller->init();
|
$controller->init();
|
||||||
//Controller::$currentController = $controller;
|
//Controller::$currentController = $controller;
|
||||||
@ -436,7 +436,7 @@ class Security extends Controller {
|
|||||||
$tmpPage->Title = _t('Security.LOSTPASSWORDHEADER', 'Lost Password');
|
$tmpPage->Title = _t('Security.LOSTPASSWORDHEADER', 'Lost Password');
|
||||||
$tmpPage->URLSegment = 'Security';
|
$tmpPage->URLSegment = 'Security';
|
||||||
$tmpPage->ID = -1; // Set the page ID to -1 so we dont get the top level pages as its children
|
$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();
|
$controller->init();
|
||||||
} else {
|
} else {
|
||||||
$controller = $this;
|
$controller = $this;
|
||||||
@ -495,7 +495,7 @@ class Security extends Controller {
|
|||||||
$tmpPage->Title = _t('Security.LOSTPASSWORDHEADER');
|
$tmpPage->Title = _t('Security.LOSTPASSWORDHEADER');
|
||||||
$tmpPage->URLSegment = 'Security';
|
$tmpPage->URLSegment = 'Security';
|
||||||
$tmpPage->ID = -1; // Set the page ID to -1 so we dont get the top level pages as its children
|
$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();
|
$controller->init();
|
||||||
} else {
|
} else {
|
||||||
$controller = $this;
|
$controller = $this;
|
||||||
@ -553,7 +553,7 @@ class Security extends Controller {
|
|||||||
$tmpPage->Title = _t('Security.CHANGEPASSWORDHEADER', 'Change your password');
|
$tmpPage->Title = _t('Security.CHANGEPASSWORDHEADER', 'Change your password');
|
||||||
$tmpPage->URLSegment = 'Security';
|
$tmpPage->URLSegment = 'Security';
|
||||||
$tmpPage->ID = -1; // Set the page ID to -1 so we dont get the top level pages as its children
|
$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();
|
$controller->init();
|
||||||
} else {
|
} else {
|
||||||
$controller = $this;
|
$controller = $this;
|
||||||
|
Loading…
Reference in New Issue
Block a user