mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
MDL-65412 core_customfield: check configdata link exists
This commit is contained in:
parent
bc342f101a
commit
baf5551cac
1 changed files with 10 additions and 8 deletions
|
@ -105,6 +105,7 @@ class field_controller extends \core_customfield\field_controller {
|
||||||
$errors['configdata[displaysize]'] = get_string('errorconfigdisplaysize', 'customfield_text');
|
$errors['configdata[displaysize]'] = get_string('errorconfigdisplaysize', 'customfield_text');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isset($data['configdata']['link'])) {
|
||||||
$link = $data['configdata']['link'];
|
$link = $data['configdata']['link'];
|
||||||
if (strlen($link)) {
|
if (strlen($link)) {
|
||||||
require_once($CFG->dirroot . '/lib/validateurlsyntax.php');
|
require_once($CFG->dirroot . '/lib/validateurlsyntax.php');
|
||||||
|
@ -115,6 +116,7 @@ class field_controller extends \core_customfield\field_controller {
|
||||||
$errors['configdata[link]'] = get_string('errorconfigdisplaysize', 'customfield_text');
|
$errors['configdata[link]'] = get_string('errorconfigdisplaysize', 'customfield_text');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return $errors;
|
return $errors;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue