diff options
author | Simon L'nu <simon.lnu@gmail.com> | 2012-06-26 22:31:15 -0400 |
---|---|---|
committer | Simon L'nu <simon.lnu@gmail.com> | 2012-06-26 22:31:15 -0400 |
commit | 5b35a02d260d1f2573895c29f4710b08348ee8ba (patch) | |
tree | c59dc06ec20ae59b3f0f0b0f17bff2477ae0e2a4 /mod/events.php | |
parent | f04647ca4bba6302f344bd16ba037cde89cf9ae5 (diff) | |
parent | b02c7339671179aa7f4644bbde804791d8fefa25 (diff) | |
download | volse-hubzilla-5b35a02d260d1f2573895c29f4710b08348ee8ba.tar.gz volse-hubzilla-5b35a02d260d1f2573895c29f4710b08348ee8ba.tar.bz2 volse-hubzilla-5b35a02d260d1f2573895c29f4710b08348ee8ba.zip |
Merge remote-tracking branch 'remotes/upstream/master'
* remotes/upstream/master:
service class restrict the email connector
stray s
typos
add event titles to discovered birthday events
change required doco
change event behaviour so that title is required but description is not
event summary/title
propagate remote deletes
remove possibly unnecessary checks for likes or comments created by Diaspora users
store signature info for remote users too
was passing the wrong arguments to the signature storage function
add some debug logging
revert extra Diaspora disabling changes to try to eliminate Mustard double-posting
Clean up the Diaspora connectivity:
improve remote delete forwarding
typos in bbcode, add service class restrictions to jot uploads
rev update
Diffstat (limited to 'mod/events.php')
-rwxr-xr-x | mod/events.php | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/mod/events.php b/mod/events.php index 2a6fb692e..4a6d3f100 100755 --- a/mod/events.php +++ b/mod/events.php @@ -57,12 +57,13 @@ function events_post(&$a) { if(strcmp($finish,$start) < 0) $finish = $start; + $summary = escape_tags(trim($_POST['summary'])); $desc = escape_tags(trim($_POST['desc'])); $location = escape_tags(trim($_POST['location'])); $type = 'event'; - if((! $desc) || (! $start)) { - notice( t('Event description and start time are required.') . EOL); + if((! $summary) || (! $start)) { + notice( t('Event title and start time are required.') . EOL); goaway($a->get_baseurl() . '/events/new'); } @@ -107,6 +108,7 @@ function events_post(&$a) { $datarray = array(); $datarray['start'] = $start; $datarray['finish'] = $finish; + $datarray['summary'] = $summary; $datarray['desc'] = $desc; $datarray['location'] = $location; $datarray['type'] = $type; @@ -278,9 +280,11 @@ function events_content(&$a) { $last_date = $d; $edit = ((! $rr['cid']) ? array($a->get_baseurl().'/events/event/'.$rr['id'],t('Edit event'),'','') : null); - - list($title, $_trash) = explode("<br",bbcode($rr['desc']),2); - $title = strip_tags($title); + $title = strip_tags(bbcode($rr['summary'])); + if(! $title) { + list($title, $_trash) = explode("<br",bbcode($rr['desc']),2); + $title = strip_tags($title); + } $html = format_event_html($rr); $rr['desc'] = bbcode($rr['desc']); $rr['location'] = bbcode($rr['location']); @@ -351,6 +355,7 @@ function events_content(&$a) { $n_checked = ((x($orig_event) && $orig_event['nofinish']) ? ' checked="checked" ' : ''); $a_checked = ((x($orig_event) && $orig_event['adjust']) ? ' checked="checked" ' : ''); + $t_orig = ((x($orig_event)) ? $orig_event['summary'] : ''); $d_orig = ((x($orig_event)) ? $orig_event['desc'] : ''); $l_orig = ((x($orig_event)) ? $orig_event['location'] : ''); $eid = ((x($orig_event)) ? $orig_event['id'] : 0); @@ -405,10 +410,11 @@ function events_content(&$a) { '$eid' => $eid, '$cid' => $cid, '$uri' => $uri, + '$title' => t('Event details'), - '$desc' => sprintf( t('Format is %s %s. Starting date and Description are required.'),$dateformat,$timeformat), + '$desc' => sprintf( t('Format is %s %s. Starting date and Title are required.'),$dateformat,$timeformat), - '$s_text' => t('Event Starts:') . ' <span class="required">*</span> ', + '$s_text' => t('Event Starts:') . ' <span class="required" title="' . t('Required') . '">*</span>', '$s_dsel' => datesel($f,'start',$syear+5,$syear,false,$syear,$smonth,$sday), '$s_tsel' => timesel('start',$shour,$sminute), '$n_text' => t('Finish date/time is not known or not relevant'), @@ -418,10 +424,12 @@ function events_content(&$a) { '$f_tsel' => timesel('finish',$fhour,$fminute), '$a_text' => t('Adjust for viewer timezone'), '$a_checked' => $a_checked, - '$d_text' => t('Description:') . ' <span class="required">*</span>', + '$d_text' => t('Description:'), '$d_orig' => $d_orig, '$l_text' => t('Location:'), '$l_orig' => $l_orig, + '$t_text' => t('Title:') . ' <span class="required" title="' . t('Required') . '">*</span>', + '$t_orig' => $t_orig, '$sh_text' => t('Share this event'), '$sh_checked' => $sh_checked, '$acl' => (($cid) ? '' : populate_acl(((x($orig_event)) ? $orig_event : $a->user),false)), |