Permalink
Browse files

Merge branch 'MDL-30042-MOODLE_21_STABLE-1' of git://git.luns.net.uk/…

…moodle into MOODLE_21_STABLE
  • Loading branch information...
2 parents 4df0583 + 5720c0b commit 5a66a2b9c575db2de53c3bb3da45a1c3e5526ef4 @stronk7 stronk7 committed Nov 23, 2011
Showing with 7 additions and 0 deletions.
  1. +7 −0 auth/mnet/jump.php
View
@@ -37,6 +37,13 @@
// If hostid hasn't been specified, try getting it using wwwroot
if (!$hostid) {
+ $hostwwwroot = trim($hostwwwroot);
+ $hostwwwroot = rtrim($hostwwwroot, '/');
+
+ // ensure the wwwroot starts with a http or https prefix
+ if (strtolower(substr($hostwwwroot, 0, 4)) != 'http') {
+ $hostwwwroot = 'http://'.$hostwwwroot;
+ }
$hostid = $DB->get_field('mnet_host', 'id', array('wwwroot' => $hostwwwroot));
}

0 comments on commit 5a66a2b

Please sign in to comment.