Merge branch 'MDL-49360-master' of git://github.com/lameze/moodle

This commit is contained in:
Dan Poltawski 2015-07-27 12:08:46 +01:00
commit 5dee13ee92
20 changed files with 72 additions and 51 deletions

View file

@ -2549,8 +2549,10 @@ function require_login($courseorid = null, $autologinguest = true, $cm = null, $
if ($setwantsurltome) {
$SESSION->wantsurl = qualified_me();
}
if (!empty($_SERVER['HTTP_REFERER'])) {
$SESSION->fromurl = $_SERVER['HTTP_REFERER'];
$referer = get_local_referer(false);
if (!empty($referer)) {
$SESSION->fromurl = $referer;
}
// Give auth plugins an opportunity to authenticate or redirect to an external login page