From: moodler Date: Sat, 22 May 2004 05:13:08 +0000 (+0000) Subject: Prevent blank entries X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=27a353e6f90274ee7c719cc8fddfd73955001719;p=moodle.git Prevent blank entries --- diff --git a/calendar/event.php b/calendar/event.php index d7f9ffed33..77a50c046a 100644 --- a/calendar/event.php +++ b/calendar/event.php @@ -438,6 +438,10 @@ function validate_form(&$form, &$err) { + + $form->name = trim($form->name); + $form->description = trim($form->description); + if(empty($form->name)) { $err['name'] = get_string('errornoeventname', 'calendar'); }