From 36c3a49955079b3cec4e3ada151ed2b67faf0fa9 Mon Sep 17 00:00:00 2001 From: samhemelryk Date: Wed, 16 Sep 2009 09:17:25 +0000 Subject: [PATCH] weblib MDL-20276 Reverted fix to deal with relative URLs --- lib/weblib.php | 5 +++++ 1 file changed, 5 insertions(+) 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; } -- 2.39.5