BUG Dummy Page_Controller initiated during login now is correctly initialised via dependency injection

This commit is contained in:
Damian Mooyman 2012-10-11 13:45:54 +13:00
parent fca9831e66
commit c99991ba7a

View File

@ -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;