Skip to content

Commit

Permalink
BUG Dummy Page_Controller initiated during login now is correctly ini…
Browse files Browse the repository at this point in the history
…tialised via dependency injection
  • Loading branch information
tractorcow committed Oct 11, 2012
1 parent fca9831 commit c99991b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions security/Security.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ public function login() {
// 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;
Expand Down Expand Up @@ -436,7 +436,7 @@ public function lostpassword() {
$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;
Expand Down Expand Up @@ -495,7 +495,7 @@ public function passwordsent($request) {
$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;
Expand Down Expand Up @@ -553,7 +553,7 @@ public function changepassword() {
$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;
Expand Down

0 comments on commit c99991b

Please sign in to comment.