From 1016e189a3311a653ad7bafed0de1d1c05bd9eac Mon Sep 17 00:00:00 2001 From: Sam Minnee Date: Wed, 28 Jan 2009 04:45:34 +0000 Subject: [PATCH] Made selection of custom security templates easier git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@70860 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- security/Security.php | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/security/Security.php b/security/Security.php index 780df4105..39ec6fff8 100644 --- a/security/Security.php +++ b/security/Security.php @@ -348,11 +348,7 @@ class Security extends Controller { Session::clear('Security.Message'); // custom processing - if(SSViewer::hasTemplate("Security_login")) { - return $customisedController->renderWith(array("Security_login", $this->stat('template_main'))); - } else { - return $customisedController->renderWith($this->stat('template_main')); - } + return $customisedController->renderWith(array('Security_login', 'Security', $this->stat('template_main'))); } function basicauthlogin() { @@ -390,7 +386,7 @@ class Security extends Controller { )); //Controller::$currentController = $controller; - return $customisedController->renderWith($this->stat('template_main')); + return $customisedController->renderWith(array('Security_lostpassword', 'Security', $this->stat('template_main'))); } @@ -448,7 +444,7 @@ class Security extends Controller { )); //Controller::$currentController = $controller; - return $customisedController->renderWith($this->stat('template_main')); + return $customisedController->renderWith(array('Security_passwordsent', 'Security', $this->stat('template_main'))); } @@ -517,7 +513,7 @@ class Security extends Controller { } //Controller::$currentController = $controller; - return $customisedController->renderWith($this->stat('template_main')); + return $customisedController->renderWith(array('Security_changepassword', 'Security', $this->stat('template_main'))); } /**