Merge branch 'MDL-30042-MOODLE_20_STABLE-1' of git://git.luns.net.uk/moodle into MOODLE_20_STABLE

This commit is contained in:
Eloy Lafuente (stronk7)
2011-11-23 03:07:45 +01:00
+7
View File
@@ -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));
}