Skip to content

Commit

Permalink
fix conversion of relative URLs in Hot Potatoes "<=" and "=>" buttons…
Browse files Browse the repository at this point in the history
… on sites where slasharguments as disabled (Site Admin -> Server -> HTTP -> Use slash arguments)
  • Loading branch information
gbateson committed Jun 7, 2008
1 parent 8a7f4c1 commit 4200f65
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mod/hotpot/lib.php
Expand Up @@ -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];
Expand Down

0 comments on commit 4200f65

Please sign in to comment.