Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fix conversion of relative URLs in Hot Potatoes "<=" and "=>" buttons…

… on sites where slasharguments as disabled (Site Admin -> Server -> HTTP -> Use slash arguments)
  • Loading branch information...
commit 557ab204c0ca21985c4e70a834faff2636e725d9 1 parent 5125790
gbateson authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  mod/hotpot/lib.php
View
2  mod/hotpot/lib.php
@@ -1836,7 +1836,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];
Please sign in to comment.
Something went wrong with that request. Please try again.