diff --git a/main/auth/shibboleth/app/shibboleth.class.php b/main/auth/shibboleth/app/shibboleth.class.php index 73cdd8c3db..5bf9ad91fb 100644 --- a/main/auth/shibboleth/app/shibboleth.class.php +++ b/main/auth/shibboleth/app/shibboleth.class.php @@ -126,17 +126,10 @@ class Shibboleth $first_slash_pos = strpos($rootWeb, '/', 8); $rootWeb_wo_uri = substr($rootWeb, 0, $first_slash_pos); $url = $rootWeb_wo_uri . $course_url . '_stop'; - header("Location: $url"); + Redirect::go($url); } } - else - { - $_SESSION['request_uri']; - } - - $url = api_get_path('WEB_PATH') . $url; - header("Location: $url"); - die; + Redirect::go(); } /** diff --git a/main/inc/local.inc.php b/main/inc/local.inc.php index ff755bdc70..fd10e877a0 100644 --- a/main/inc/local.inc.php +++ b/main/inc/local.inc.php @@ -1132,7 +1132,9 @@ if (isset($_cid)) { $sql="UPDATE $tbl_course SET last_visit= '$time' WHERE code='$_cid'"; Database::query($sql); } -if (isset($_SESSION['request_uri']) && !empty($_SESSION['request_uri'])){ + +$no_redirection = isset($no_redirection) ? $no_redirection : false; +if (!$no_redirection && (isset($_SESSION['request_uri']) && !empty($_SESSION['request_uri']))){ $req= $_SESSION['request_uri']; unset($_SESSION['request_uri']); header('Location: '.$req);