Permalink
Browse files

MDL-27464 continuation link sometimes links off-site

Integrating #CSTAGE-656, continuation link sometimes links off-site, into trunk.
  • Loading branch information...
1 parent 6bbf934 commit 8f9f666c902cb30ef6f519353f38c45a29fdf4a6 @matthewdaniel matthewdaniel committed with skodak Jul 23, 2011
Showing with 12 additions and 0 deletions.
  1. +6 −0 lib/deprecatedlib.php
  2. +6 −0 lib/weblib.php
View
@@ -1677,6 +1677,12 @@ function error ($message, $link='') {
}
}
+ // when printing an error the continue button should never link offsite
+ if (stripos($link, $CFG->wwwroot) === false &&
+ stripos($link, $CFG->httpswwwroot) === false) {
+ $link = $CFG->wwwroot.'/';
+ }
+
if (!empty($link)) {
print_continue($link);
}
View
@@ -5841,6 +5841,12 @@ function print_error($errorcode, $module='error', $link='', $a=NULL, $extralocat
}
}
+ // when printing an error the continue button should never link offsite
+ if (stripos($link, $CFG->wwwroot) === false &&
+ stripos($link, $CFG->httpswwwroot) === false) {
+ $link = $CFG->wwwroot.'/';
+ }
+
if (!empty($CFG->errordocroot)) {
$errordoclink = $CFG->errordocroot.'/en';
} else {

0 comments on commit 8f9f666

Please sign in to comment.