From d6e1f28ef4fca96b034bb6ffeae6e57e2d974fed Mon Sep 17 00:00:00 2001 From: Adam Olley Date: Fri, 4 Nov 2016 09:10:30 +1030 Subject: [PATCH] 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. --- admin/mnet/peer_forms.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin/mnet/peer_forms.php b/admin/mnet/peer_forms.php index b50f869c79d..5769e6de24c 100644 --- a/admin/mnet/peer_forms.php +++ b/admin/mnet/peer_forms.php @@ -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(); }