mirror of
https://github.com/moodle/moodle.git
synced 2025-03-14 04:30:15 +01:00
Merge branch 'MDL-49198_master' of https://github.com/markn86/moodle
This commit is contained in:
commit
4b525e7508
@ -157,6 +157,13 @@ class external_service_form extends moodleform {
|
||||
|
||||
$errors = parent::validation($data, $files);
|
||||
|
||||
// Add field validation check for duplicate name.
|
||||
if (!empty($data['name'])) {
|
||||
if ($DB->record_exists('external_services', array('name' => $data['name']))) {
|
||||
$errors['name'] = get_string('nameexists', 'webservice');
|
||||
}
|
||||
}
|
||||
|
||||
// Add field validation check for duplicate shortname.
|
||||
// Allow duplicated "empty" shortnames.
|
||||
if (!empty($data['shortname'])) {
|
||||
|
@ -126,6 +126,7 @@ $string['missingusername'] = 'Missing username';
|
||||
$string['missingversionfile'] = 'Coding error: version.php file is missing for the component {$a}';
|
||||
$string['mobilewsdisabled'] = 'Disabled';
|
||||
$string['mobilewsenabled'] = 'Enabled';
|
||||
$string['nameexists'] = 'This name is already in use by another service';
|
||||
$string['nocapabilitytouseparameter'] = 'The user does not have the required capability to use the parameter {$a}';
|
||||
$string['nofunctions'] = 'This service has no functions.';
|
||||
$string['norequiredcapability'] = 'No required capability';
|
||||
|
Loading…
x
Reference in New Issue
Block a user