MDL-37432 Calendar: Added check for empty calendar url

This commit is contained in:
Rajesh Taneja
2013-01-21 10:28:32 +08:00
parent a5ec499521
commit 378cb038b2
+3 -1
View File
@@ -123,7 +123,9 @@ class calendar_addsubscription_form extends moodleform {
}
}
} else if (($data['importfrom'] == CALENDAR_IMPORT_FROM_URL)) {
if (clean_param($data['url'], PARAM_URL) !== $data['url']) {
// Clean input calendar url.
$url = clean_param($data['url'], PARAM_URL);
if (empty($url) || ($url !== $data['url'])) {
$errors['url'] = get_string('invalidurl', 'error');
}
} else {