From c99991ba7a43aa14236fd0efc65e39aee591dc2d Mon Sep 17 00:00:00 2001 From: Damian Mooyman Date: Thu, 11 Oct 2012 13:45:54 +1300 Subject: [PATCH] BUG Dummy Page_Controller initiated during login now is correctly initialised via dependency injection --- security/Security.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/security/Security.php b/security/Security.php index 573657fe2..71a9fa6d8 100644 --- a/security/Security.php +++ b/security/Security.php @@ -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;