MDL-53945 mnet: Use moodle_url to provide string with url
Using moodle_url where possible is preferable to hardcoding uri's as moodle_url is able to take care of alot of the formatting for us. In this instance, it handles the $CFG->admin url path for us.
This commit is contained in:
@@ -61,7 +61,7 @@ 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 . '/' . $CFG->admin . '/mnet/peers.php?hostid=' . $host->id));
|
||||
new moodle_url('/admin/mnet/peers.php', array('hostid' => $host->id))));
|
||||
}
|
||||
return array();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user