MDL-53945 mnet: replace hardcoded admin dir with cfg
Several places in admin/mnet pull in required files using a hardcoded admin dir string, as this is configurable it needs to use $CFG->admin instead. Places where the url is passed through moodle_url don't need to be updated as that already automatically translates the urls for us.
This commit is contained in:
@@ -60,7 +60,8 @@ class mnet_simple_host_form extends moodleform {
|
||||
}
|
||||
if ($host = $DB->get_record('mnet_host', array('wwwroot' => $wwwroot))) {
|
||||
global $CFG;
|
||||
return array('wwwroot' => get_string('hostexists', 'mnet', $CFG->wwwroot . '/admin/mnet/peers.php?hostid=' . $host->id));
|
||||
return array('wwwroot' => get_string('hostexists', 'mnet',
|
||||
$CFG->wwwroot . '/' . $CFG->admin . '/mnet/peers.php?hostid=' . $host->id));
|
||||
}
|
||||
return array();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user