fix bbcode event reshare timezone issue
(cherry picked from commit 79bcc157bf8f0c67a8ee41ae9c53a9dec969f8d1)
This commit is contained in:
parent
58b77e3427
commit
1fbc8739b9
@ -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);
|
||||
|
@ -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)) {
|
||||
|
Reference in New Issue
Block a user