From 19e84922994cfd7205ac11ebc1431ddde1a9a1ca Mon Sep 17 00:00:00 2001 From: gbateson Date: Sat, 7 Jun 2008 01:43:47 +0000 Subject: [PATCH] fix conversion of relative URLs in Hot Potatoes "<=" and "=>" buttons on sites where slasharguments as disabled (Site Admin -> Server -> HTTP -> Use slash arguments) --- mod/hotpot/lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mod/hotpot/lib.php b/mod/hotpot/lib.php index 0ec25ca3ff7..e32a96927d5 100644 --- a/mod/hotpot/lib.php +++ b/mod/hotpot/lib.php @@ -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];