aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-06-25 21:27:34 -0700
committerfriendica <info@friendica.com>2012-06-25 21:27:34 -0700
commit0f0ffce1b652897663ec5a8bea9a5c6a4fd37b0d (patch)
tree0ca7fdc54c0e96c8fe374c77ea8bd6133db3d019
parent359a98cd22318badd9c5bb1115678181b75c9edc (diff)
downloadvolse-hubzilla-0f0ffce1b652897663ec5a8bea9a5c6a4fd37b0d.tar.gz
volse-hubzilla-0f0ffce1b652897663ec5a8bea9a5c6a4fd37b0d.tar.bz2
volse-hubzilla-0f0ffce1b652897663ec5a8bea9a5c6a4fd37b0d.zip
change required doco
-rw-r--r--include/bbcode.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/include/bbcode.php b/include/bbcode.php
index c64d5d036..dcffe82c5 100644
--- a/include/bbcode.php
+++ b/include/bbcode.php
@@ -1,4 +1,4 @@
-<?php
+s<?php
require_once("include/oembed.php");
require_once('include/event.php');
@@ -297,8 +297,11 @@ function bbcode($Text,$preserve_nl = false, $tryoembed = true) {
$Text = oembed_bbcode2html($Text);
// If we found an event earlier, strip out all the event code and replace with a reformatted version.
+ // Replace the event-start section with the entire formatted event. The other bbcode is stripped.
+ // Summary (e.g. title) is required, earlier revisions only required description (in addition to
+ // start which is always required). Allow desc with a missing summary for compatibility.
- if(x($ev,'desc') && x($ev,'start')) {
+ if((x($ev,'desc') || x($ev,'summary')) && x($ev,'start')) {
$sub = format_event_html($ev);
$Text = preg_replace("/\[event\-summary\](.*?)\[\/event\-summary\]/ism",'',$Text);