From 376a031f4c01495b5afd4a1981bbff6c9584491c Mon Sep 17 00:00:00 2001 From: gbateson Date: Sat, 7 Jun 2008 01:41:18 +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 d5f9daeee70..b8c80b095ba 100644 --- a/mod/hotpot/lib.php +++ b/mod/hotpot/lib.php @@ -1807,7 +1807,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];