From: sam_marshall Date: Mon, 25 Sep 2006 11:23:15 +0000 (+0000) Subject: Quick fix to the me() fix to the redirect function (for relative redirects). X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=20e1b1e5c0e70b631cb844963a6eeffe364e03a4;p=moodle.git Quick fix to the me() fix to the redirect function (for relative redirects). --- diff --git a/lib/weblib.php b/lib/weblib.php index a39831fc7f..6185a63bd5 100644 --- a/lib/weblib.php +++ b/lib/weblib.php @@ -4686,7 +4686,7 @@ function redirect($url, $message='', $delay=-1) { $url = $hostpart.$url; } else { // URLs not beginning with / are relative to path of current script, so add that on. - $url = $hostpart.me().'/../'.$url; + $url = $hostpart.preg_replace('|\?.*$|','',me()).'/../'.$url; } // Replace all ..s while (true) {