Merge branch 'MDL-30042-MOODLE_20_STABLE-1' of git://git.luns.net.uk/moodle into MOODLE_20_STABLE
This commit is contained in:
@@ -37,6 +37,13 @@ if (!is_enabled_auth('mnet')) {
|
||||
|
||||
// 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));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user