aboutsummaryrefslogtreecommitdiffstats
path: root/include/event.php
diff options
context:
space:
mode:
authorSebastian Egbers <sebastian@egbers.info>2012-06-26 08:33:41 +0200
committerSebastian Egbers <sebastian@egbers.info>2012-06-26 08:33:41 +0200
commit0f0fb2e2f3b9819e4f1b65c3ea1b96e78c008381 (patch)
tree8f38f64f6239f1c132b0e2118a4a9b42ba801752 /include/event.php
parent8c251aebc77a6daacfe20598fc861df4c243a726 (diff)
parenta4b407eb54c67a0c9b8137b44fbd20b43eccb224 (diff)
downloadvolse-hubzilla-0f0fb2e2f3b9819e4f1b65c3ea1b96e78c008381.tar.gz
volse-hubzilla-0f0fb2e2f3b9819e4f1b65c3ea1b96e78c008381.tar.bz2
volse-hubzilla-0f0fb2e2f3b9819e4f1b65c3ea1b96e78c008381.zip
Merge branch 'master' of https://github.com/friendica/friendica
Diffstat (limited to 'include/event.php')
-rw-r--r--include/event.php16
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']),