Skip to content
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...
1 parent 8a7f4c1 commit 4200f652add5fced5869d6ff8e932f1e792bbb53 gbateson committed Jun 7, 2008
Showing with 1 addition and 1 deletion.
  1. +1 −1 mod/hotpot/lib.php
View
2 mod/hotpot/lib.php
@@ -1964,7 +1964,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];

0 comments on commit 4200f65

Please sign in to comment.
Something went wrong with that request. Please try again.