mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 14:27:22 +01:00
Merge branch 'w11_MDL-26480_20_redirect' of git://github.com/skodak/moodle
This commit is contained in:
commit
4bbe460316
@ -2468,6 +2468,11 @@ function redirect($url, $message='', $delay=-1) {
|
||||
$encodedurl = preg_replace('/^.*href="([^"]*)".*$/', "\\1", clean_text('<a href="'.$encodedurl.'" />'));
|
||||
|
||||
if ($delay == 0 && !$debugdisableredirect && !headers_sent()) {
|
||||
// workaround for IIS bug http://support.microsoft.com/kb/q176113/
|
||||
if (session_id()) {
|
||||
session_get_instance()->write_close();
|
||||
}
|
||||
|
||||
//302 might not work for POST requests, 303 is ignored by obsolete clients.
|
||||
@header($_SERVER['SERVER_PROTOCOL'] . ' 303 See Other');
|
||||
@header('Location: '.$url);
|
||||
|
Loading…
x
Reference in New Issue
Block a user