SilverStripe\Admin\LeftAndMain::redirect
Overloaded redirection logic to trigger a fake redirect on ajax requests.
While this violates HTTP principles, its the only way to work around the fact that browsers handle HTTP redirects opaquely, no intervention via JS is possible. In isolation, that's not a problem - but combined with history.pushState() it means we would request the same redirection URL twice if we want to update the URL as well. See LeftAndMain.js for the required jQuery ajaxComplete handlers.
Signature
public function redirect(string
$url,
[integer
$code = 302] )
Parameters
$url
— string$code
— integer
Returns
- HTTPResponse|string