}
if (empty($SESSION->wantsurl)) {
- $SESSION->wantsurl = array_key_exists('HTTP_REFERER',$_SERVER) ? $_SERVER["HTTP_REFERER"] : $CFG->wwwroot;
+ $SESSION->wantsurl = array_key_exists('HTTP_REFERER',$_SERVER) ? $_SERVER["HTTP_REFERER"] : $CFG->wwwroot.'/';
}
if (get_moodle_cookie() == '') {
if ($id) {
$redirecto = $CFG->wwwroot . '/course/view.php?id=' . $id; //Course page
} else {
- $redirecto = $CFG->wwwroot;
+ $redirecto = $CFG->wwwroot.'/';
}
redirect ($redirecto, get_string('backupcancelled')); //Site page
exit;
if (isset($_SERVER['HTTP_REFERER'])) {
$referrer = $_SERVER['HTTP_REFERER'];
} else {
- $referrer = $CFG->wwwroot;
+ $referrer = $CFG->wwwroot.'/';
}