aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Parviainen <saparvia@caterva.eu>2014-10-19 08:33:18 +0200
committerStefan Parviainen <saparvia@caterva.eu>2014-10-19 08:33:18 +0200
commitd9817779fbeaebf4b75c0670da7013bf4482b72b (patch)
tree14077e6ab97a613c485cb164243208eb2c596497
parent7c4f55af9f8e28a761155eaf6d0d379b28d88f23 (diff)
downloadvolse-hubzilla-d9817779fbeaebf4b75c0670da7013bf4482b72b.tar.gz
volse-hubzilla-d9817779fbeaebf4b75c0670da7013bf4482b72b.tar.bz2
volse-hubzilla-d9817779fbeaebf4b75c0670da7013bf4482b72b.zip
Give an error if event is supposed to end before it starts. Closes friendica/red#534
-rwxr-xr-xmod/events.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/mod/events.php b/mod/events.php
index 337852170..e5ae7c662 100755
--- a/mod/events.php
+++ b/mod/events.php
@@ -67,8 +67,10 @@ function events_post(&$a) {
// 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;
+ if(strcmp($finish,$start) < 0) {
+ notice( t('Event can not end before it has started.') . EOL);
+ goaway($a->get_baseurl() . '/events/new');
+ }
$summary = escape_tags(trim($_POST['summary']));
$desc = escape_tags(trim($_POST['desc']));