MDL-49360 core_lib: add new method get_local_referer()

This commit also replace all usages of $_SERVER['HTTP_REFERER'] and get_referer().
This commit is contained in:
Simey Lameze
2015-07-27 11:59:28 +08:00
parent cd02b264bd
commit ac62233074
20 changed files with 76 additions and 52 deletions
+1 -1
View File
@@ -78,7 +78,7 @@ if ($courseid) {
}
// Return to previous page
$referer = clean_param($_SERVER['HTTP_REFERER'], PARAM_LOCALURL);
$referer = get_local_referer(false);
if (!empty($referer)) {
redirect($referer);
} else {