X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=mod%2Fevents.php;h=fb68d53dbc020593ca5cdd282a85735af0a165f6;hb=a9ec56ace1756726517650d96192df5320f445fe;hp=b0b54601fdf09f653b9d94d12935ec57bdeebb52;hpb=086dc25dd1d3e4bb23444948a508aa0c8ee03dc5;p=friendica.git diff --git a/mod/events.php b/mod/events.php index b0b54601fd..fb68d53dbc 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'); } @@ -105,17 +112,7 @@ function events_content(&$a) { $o =""; // tabs - $tpl = get_markup_template('profile_tabs.tpl'); - $o .= replace_macros($tpl,array( - '$url' => $a->get_baseurl() . '/profile/' . $a->user['nickname'], - '$phototab' => $a->get_baseurl() . '/photos/' . $a->user['nickname'], - '$status' => t('Status'), - '$profile' => t('Profile'), - '$photos' => t('Photos'), - '$events' => t('Events') , - '$notes' => t('Personal Notes'), - '$activetab' => "events", - )); + $o .= profile_tabs($a, True); $o .= '