Skip to content

Commit

Permalink
MDL-63037 mnet: fix hostexists string usage
Browse files Browse the repository at this point in the history
  • Loading branch information
snake committed Nov 8, 2022
1 parent 7184155 commit d34d35d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions admin/mnet/peer_forms.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,8 @@ function validation($data, $files) {
$wwwroot = 'http://'.$wwwroot;
}
if ($host = $DB->get_record('mnet_host', array('wwwroot' => $wwwroot))) {
global $CFG;
return array('wwwroot' => get_string('hostexists', 'mnet',
new moodle_url('/admin/mnet/peers.php', array('hostid' => $host->id))));
$str = get_string('hostexists', 'mnet', (new moodle_url('/admin/mnet/peers.php', ['hostid' => $host->id]))->out());
return array('wwwroot' => $str);
}
return array();
}
Expand Down
2 changes: 1 addition & 1 deletion lang/en/mnet.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
$string['host'] = 'host';
$string['hostcoursenotfound'] = 'Host or course not found';
$string['hostdeleted'] = 'Host deleted';
$string['hostexists'] = 'A record already exists for a host with that hostname (it may be deleted). <a href="{$a}">click here</a> to edit that record.';
$string['hostexists'] = 'A record already exists for a host with that hostname (it may be deleted). <a href="{$a}">Click here</a> to edit that record.';
$string['hostlist'] = 'List of networked hosts';
$string['hostname'] = 'Hostname';
$string['hostnamehelp'] = 'The fully-qualified domain name of the remote host, e.g. www.example.com';
Expand Down

0 comments on commit d34d35d

Please sign in to comment.