upgrade: MDL-19763 Improve the redirect that forces a DB upgrade when there are major changes

Also fix redirect, so 303 redirects don't need to fully initialise $OUTPUT.
This commit is contained in:
tjhunt 2009-07-10 08:44:01 +00:00
parent 8dff48bf45
commit 5e39d7aa09
5 changed files with 55 additions and 31 deletions

View file

@ -4941,6 +4941,8 @@ function redirect($url, $message='', $delay=-1) {
//302 might not work for POST requests, 303 is ignored by obsolete clients.
@header($_SERVER['SERVER_PROTOCOL'] . ' 303 See Other');
@header('Location: '.$url);
echo bootstrap_renderer::plain_redirect_message($encodedurl);
exit;
}
// Include a redirect message, even with a HTTP redirect, because that is recommended practice.