weblib MDL-20276 Reverted fix to deal with relative URLs

This commit is contained in:
samhemelryk
2009-09-16 09:17:25 +00:00
parent 4881edc9d2
commit 36c3a49955
+5
View File
@@ -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;
}