From: samhemelryk Date: Wed, 16 Sep 2009 09:17:25 +0000 (+0000) Subject: weblib MDL-20276 Reverted fix to deal with relative URLs X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=36c3a49955079b3cec4e3ada151ed2b67faf0fa9;p=moodle.git weblib MDL-20276 Reverted fix to deal with relative URLs --- diff --git a/lib/weblib.php b/lib/weblib.php index 2d0d0d1373..1816743b08 100644 --- a/lib/weblib.php +++ b/lib/weblib.php @@ -565,6 +565,11 @@ function prepare_url($url, $stripformparams=false) { } } + // Add wwwroot only if the URL does not already start with http:// or https:// + if (!preg_match('|https?://|', $output) ) { + $output = $CFG->wwwroot . $output; + } + return $output; }