aboutsummaryrefslogtreecommitdiffstats
path: root/mod/events.php
diff options
context:
space:
mode:
authorOlivier Migeot <olivier@migeot.org>2011-10-04 11:45:57 +0200
committerOlivier Migeot <olivier@migeot.org>2011-10-04 11:45:57 +0200
commit273594af62c960b5a52da5ec1cf6d6bd450415ba (patch)
tree5f79914d28c343f7642ecb13b99f9e0e3f5090a7 /mod/events.php
parent1548449586f17c0ef9bfab0ffb16f2a495fc6082 (diff)
parentdfd5cc57c2134067dc6229b8583b5e808f160004 (diff)
downloadvolse-hubzilla-273594af62c960b5a52da5ec1cf6d6bd450415ba.tar.gz
volse-hubzilla-273594af62c960b5a52da5ec1cf6d6bd450415ba.tar.bz2
volse-hubzilla-273594af62c960b5a52da5ec1cf6d6bd450415ba.zip
Merge remote branch 'upstream/master'
Diffstat (limited to 'mod/events.php')
-rw-r--r--mod/events.php9
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');
}