From fce51876c9d2d8803acddaa9c5b4980eb82ec357 Mon Sep 17 00:00:00 2001 From: friendica Date: Mon, 9 Feb 2015 18:58:43 -0800 Subject: bring some styling back to the colorbox and improve the event preview ability --- mod/events.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'mod') diff --git a/mod/events.php b/mod/events.php index 144b9dd5e..f209dab1d 100755 --- a/mod/events.php +++ b/mod/events.php @@ -85,11 +85,19 @@ function events_post(&$a) { $onerror_url = $a->get_baseurl() . "/events/" . $action . "?summary=$summary&description=$desc&location=$location&start=$start_text&finish=$finish_text&adjust=$adjust&nofinish=$nofinish"; if(strcmp($finish,$start) < 0 && !$nofinish) { notice( t('Event can not end before it has started.') . EOL); + if(intval($_REQUEST['preview'])) { + echo( t('Unable to generate preview.')); + killme(); + } goaway($onerror_url); } if((! $summary) || (! $start)) { notice( t('Event title and start time are required.') . EOL); + if(intval($_REQUEST['preview'])) { + echo( t('Unable to generate preview.')); + killme(); + } goaway($onerror_url); } @@ -104,6 +112,10 @@ function events_post(&$a) { ); if(! $x) { notice( t('Event not found.') . EOL); + if(intval($_REQUEST['preview'])) { + echo( t('Unable to generate preview.')); + killme(); + } return; } if($x[0]['allow_cid'] === '<' . $channel['channel_hash'] . '>' -- cgit v1.2.3