mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUGFIX: Fallback for arrays which do not contain 'alreadyLoggedIn' values
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@95968 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
f204f96b1f
commit
6b59dc3e78
@ -189,8 +189,15 @@ class Security extends Controller {
|
||||
$response = ($controller) ? $controller->getResponse() : new SS_HTTPResponse();
|
||||
$response->setStatusCode(403);
|
||||
|
||||
//If 'alreadyLoggedIn' is not specified in the array, then use the default
|
||||
//which should have been specified in the lines above
|
||||
if(isset($messageSet['alreadyLoggedIn']))
|
||||
$message=$messageSet['alreadyLoggedIn'];
|
||||
else
|
||||
$message=$messageSet['default'];
|
||||
|
||||
// Replace %s with the log in link
|
||||
$body = sprintf($messageSet['alreadyLoggedIn'],
|
||||
$body = sprintf($message,
|
||||
Controller::join_links(Director::baseURL(), 'Security/login',
|
||||
'?BackURL=' . urlencode($_SERVER['REQUEST_URI'])));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user