]> git.mjollnir.org Git - moodle.git/commitdiff
fix conversion of relative URLs in Hot Potatoes "<=" and "=>" buttons on sites where...
authorgbateson <gbateson>
Sat, 7 Jun 2008 01:43:47 +0000 (01:43 +0000)
committergbateson <gbateson>
Sat, 7 Jun 2008 01:43:47 +0000 (01:43 +0000)
mod/hotpot/lib.php

index 0ec25ca3ff76575e747189bdc6cd8769eea295ee..e32a96927d5ed7dbcabe257cb0c34414aef30fd8 100644 (file)
@@ -1973,7 +1973,7 @@ function hotpot_convert_navbutton_url($baseurl, $reference, $url, $course, $stri
     $url = hotpot_convert_url($baseurl, $reference, $url, false);
 
     // is this a $url for another hotpot in this course ?
-    if (preg_match("|^$baseurl(.*)$|", $url, $matches)) {
+    if (preg_match("|^".preg_quote($baseurl)."(.*)$|", $url, $matches)) {
         if ($records = get_records_select('hotpot', "course='$course' AND reference='".$matches[1]."'")) {
             $ids = array_keys($records);
             $url = "$CFG->wwwroot/mod/hotpot/view.php?hp=".$ids[0];