diff options
author | Mario <mario@mariovavti.com> | 2019-10-05 10:31:26 +0200 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2019-10-05 10:31:26 +0200 |
commit | 0c2438b36a536249e332d38e02a527af4344023f (patch) | |
tree | e8f3957177f94fd9aa09aadb61b218e152252378 | |
parent | d6da46f94b5f4224f5013c1904a7e2c71911c74d (diff) | |
parent | 1fbc8739b9521703e68f274728ec04b4b941d49e (diff) | |
download | volse-hubzilla-0c2438b36a536249e332d38e02a527af4344023f.tar.gz volse-hubzilla-0c2438b36a536249e332d38e02a527af4344023f.tar.bz2 volse-hubzilla-0c2438b36a536249e332d38e02a527af4344023f.zip |
Merge branch 'cherry-pick-79bcc157' into 'dev'
fix bbcode event reshare timezone issue
See merge request hubzilla/core!1747
-rw-r--r-- | include/bbcode.php | 1 | ||||
-rw-r--r-- | include/event.php | 6 |
2 files changed, 7 insertions, 0 deletions
diff --git a/include/bbcode.php b/include/bbcode.php index 485a1f5b2..bb9144b1d 100644 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -1346,6 +1346,7 @@ function bbcode($Text, $options = []) { $Text = preg_replace("/\[event\-finish\](.*?)\[\/event\-finish\]/ism",'',$Text); $Text = preg_replace("/\[event\-id\](.*?)\[\/event\-id\]/ism",'',$Text); $Text = preg_replace("/\[event\-location\](.*?)\[\/event\-location\]/ism",'',$Text); + $Text = preg_replace("/\[event\-timezone\](.*?)\[\/event\-timezone\]/ism",'',$Text); $Text = preg_replace("/\[event\-adjust\](.*?)\[\/event\-adjust\]/ism",'',$Text); $Text = str_replace("\0",'$',$Text); diff --git a/include/event.php b/include/event.php index 6689919cf..6be1b6705 100644 --- a/include/event.php +++ b/include/event.php @@ -276,6 +276,9 @@ function format_event_bbcode($ev) { if($ev['event_hash']) $o .= '[event-id]' . $ev['event_hash'] . '[/event-id]'; + if($ev['timezone']) + $o .= '[event-timezone]' . $ev['timezone'] . '[/event-timezone]'; + if($ev['adjust']) $o .= '[event-adjust]' . $ev['adjust'] . '[/event-adjust]'; @@ -324,6 +327,9 @@ function bbtoevent($s) { if(preg_match("/\[event\-id\](.*?)\[\/event\-id\]/is",$s,$match)) $ev['event_hash'] = $match[1]; $match = ''; + if(preg_match("/\[event\-timezone\](.*?)\[\/event\-timezone\]/is",$s,$match)) + $ev['timezone'] = $match[1]; + $match = ''; if(preg_match("/\[event\-adjust\](.*?)\[\/event\-adjust\]/is",$s,$match)) $ev['adjust'] = $match[1]; if(array_key_exists('dtstart',$ev)) { |