mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
API CHANGE Removed Director::history(), history was no longer recorded. Removed Director::__construct(), as Director is a static utility class without instance state (fixes #6385)
This commit is contained in:
parent
a63215c6a5
commit
60ca784aae
@ -42,21 +42,6 @@ class Director {
|
||||
*/
|
||||
static protected $callbacks;
|
||||
|
||||
function __construct() {
|
||||
if(isset($_GET['debug_profile'])) Profiler::mark("Director", "construct");
|
||||
Session::addToArray('history', substr($_SERVER['REQUEST_URI'], strlen(Director::baseURL())));
|
||||
if(isset($_GET['debug_profile'])) Profiler::unmark("Director", "construct");
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a URL from this user's navigation history.
|
||||
* @param pagesBack The number of pages back to go. The default, 1, returns the previous
|
||||
* page.
|
||||
*/
|
||||
static function history($pagesBack = 1) {
|
||||
return Session::get('history.' . intval(sizeof(Session::get('history')) - $pagesBack - 1));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Add URL matching rules to the Director.
|
||||
|
@ -211,9 +211,6 @@ class Security extends Controller {
|
||||
|
||||
$response->setBody($formText);
|
||||
return $response;
|
||||
|
||||
} else if(substr(Director::history(),0,15) == 'Security/logout') {
|
||||
$message = $messageSet['logInAgain'] ? $messageSet['logInAgain'] : $messageSet['default'];
|
||||
} else {
|
||||
$message = $messageSet['default'];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user