diff options
author | Fabio Comuni <fabrix.xm@gmail.com> | 2011-09-16 09:39:29 +0200 |
---|---|---|
committer | Fabio Comuni <fabrix.xm@gmail.com> | 2011-09-16 09:39:29 +0200 |
commit | 9d2afc2d3c12f6b70eae11487e491e2d8604ed60 (patch) | |
tree | ced4fb400d25762866a773115b122f6c9cc498de /mod/events.php | |
parent | 019b735ec75989336826e5ad5db6377803ecb050 (diff) | |
parent | 2e43b291e73f6d7c36a9d8743fc2635dc3444841 (diff) | |
download | volse-hubzilla-9d2afc2d3c12f6b70eae11487e491e2d8604ed60.tar.gz volse-hubzilla-9d2afc2d3c12f6b70eae11487e491e2d8604ed60.tar.bz2 volse-hubzilla-9d2afc2d3c12f6b70eae11487e491e2d8604ed60.zip |
Merge remote-tracking branch 'friendika/master' into newui
Diffstat (limited to 'mod/events.php')
-rw-r--r-- | mod/events.php | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/mod/events.php b/mod/events.php index 27ca69830..5bc9807ed 100644 --- a/mod/events.php +++ b/mod/events.php @@ -45,13 +45,20 @@ function events_post(&$a) { $finish = datetime_convert('UTC','UTC',$finish); } + // Don't allow the event to finish before it begins. + // It won't hurt anything, but somebody will file a bug report + // and we'll waste a bunch of time responding to it. Time that + // could've been spent doing something else. + + if(strcmp($finish,$start) < 0) + $finish = $start; $desc = escape_tags(trim($_POST['desc'])); $location = escape_tags(trim($_POST['location'])); $type = 'event'; if((! $desc) || (! $start)) { - notice('Event description and start time are required.'); + notice( t('Event description and start time are required.') . EOL); goaway($a->get_baseurl() . '/events/new'); } |