BUG adding a more descriptive message when the CMS session times out. It used to say "Forbidden", now it says "Not logged in".

This commit is contained in:
Julian Seidenberg 2013-08-06 13:10:55 +12:00
parent c5442810cf
commit 17e0432252

View File

@ -188,7 +188,10 @@ class Security extends Controller {
if(Director::is_ajax()) {
$response = ($controller) ? $controller->getResponse() : new SS_HTTPResponse();
$response->setStatusCode(403);
if(!Member::currentUser()) $response->setBody('NOTLOGGEDIN:');
if(!Member::currentUser()) {
$response->setBody(_t('ContentController.NOTLOGGEDIN','Not logged in'));
$response->setStatusDescription(_t('ContentController.NOTLOGGEDIN','Not logged in'));
}
return $response;
} else {
// Prepare the messageSet provided