aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2015-02-09 18:58:43 -0800
committerfriendica <info@friendica.com>2015-02-09 18:58:43 -0800
commitfce51876c9d2d8803acddaa9c5b4980eb82ec357 (patch)
treee94b52b76ab6c4c75abd3e2e39b30d0f70d01c78 /mod
parentad731b7c7bc1fa0a0af10127154e1aa8dc94ef24 (diff)
downloadvolse-hubzilla-fce51876c9d2d8803acddaa9c5b4980eb82ec357.tar.gz
volse-hubzilla-fce51876c9d2d8803acddaa9c5b4980eb82ec357.tar.bz2
volse-hubzilla-fce51876c9d2d8803acddaa9c5b4980eb82ec357.zip
bring some styling back to the colorbox and improve the event preview ability
Diffstat (limited to 'mod')
-rwxr-xr-xmod/events.php12
1 files changed, 12 insertions, 0 deletions
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'] . '>'