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 /include/event.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 'include/event.php')
-rw-r--r-- | include/event.php | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/include/event.php b/include/event.php index 866ae8c3f..8aef0a263 100644 --- a/include/event.php +++ b/include/event.php @@ -12,6 +12,9 @@ function format_event_html($ev) { $o = '<div class="vevent">' . "\r\n"; + + $o .= '<p class="summary event-summary">' . bbcode($ev['summary']) . '</p>' . "\r\n"; + $o .= '<p class="description event-description">' . bbcode($ev['desc']) . '</p>' . "\r\n"; $o .= '<p class="event-start">' . t('Starts:') . ' <abbr class="dtstart" title="' @@ -114,6 +117,9 @@ function format_event_bbcode($ev) { $o = ''; + if($ev['summary']) + $o .= '[event-summary]' . $ev['summary'] . '[/event-summary]'; + if($ev['desc']) $o .= '[event-description]' . $ev['desc'] . '[/event-description]'; @@ -148,6 +154,9 @@ function bbtoevent($s) { $ev = array(); $match = ''; + if(preg_match("/\[event\-summary\](.*?)\[\/event\-summary\]/is",$s,$match)) + $ev['summary'] = $match[1]; + $match = ''; if(preg_match("/\[event\-description\](.*?)\[\/event\-description\]/is",$s,$match)) $ev['desc'] = $match[1]; $match = ''; @@ -244,6 +253,7 @@ function event_store($arr) { `edited` = '%s', `start` = '%s', `finish` = '%s', + `summary` = '%s', `desc` = '%s', `location` = '%s', `type` = '%s', @@ -258,6 +268,7 @@ function event_store($arr) { dbesc($arr['edited']), dbesc($arr['start']), dbesc($arr['finish']), + dbesc($arr['summary']), dbesc($arr['desc']), dbesc($arr['location']), dbesc($arr['type']), @@ -306,9 +317,9 @@ function event_store($arr) { // New event. Store it. - $r = q("INSERT INTO `event` ( `uid`,`cid`,`uri`,`created`,`edited`,`start`,`finish`,`desc`,`location`,`type`, + $r = q("INSERT INTO `event` ( `uid`,`cid`,`uri`,`created`,`edited`,`start`,`finish`,`summary`, `desc`,`location`,`type`, `adjust`,`nofinish`,`allow_cid`,`allow_gid`,`deny_cid`,`deny_gid`) - VALUES ( %d, %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d, %d, '%s', '%s', '%s', '%s' ) ", + VALUES ( %d, %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d, %d, '%s', '%s', '%s', '%s' ) ", intval($arr['uid']), intval($arr['cid']), dbesc($arr['uri']), @@ -316,6 +327,7 @@ function event_store($arr) { dbesc($arr['edited']), dbesc($arr['start']), dbesc($arr['finish']), + dbesc($arr['summary']), dbesc($arr['desc']), dbesc($arr['location']), dbesc($arr['type']), |