X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fbb2diaspora.php;h=ca0c961b371c365f575fcd9ffa0980c32884d1a7;hb=e440353013aa1ca26a472b375bb1102348c7ead7;hp=c779b6aafd2326710a210552ff8c9abc7e81c388;hpb=59a6a04e26bf6baec4b7ad62419e9d335db249df;p=friendica.git diff --git a/include/bb2diaspora.php b/include/bb2diaspora.php index c779b6aafd..ca0c961b37 100644 --- a/include/bb2diaspora.php +++ b/include/bb2diaspora.php @@ -62,9 +62,9 @@ function bb2diaspora($Text,$preserve_nl = false) { // [img]pathtoimage[/img] - $Text = preg_replace("/\[url\]([$URLSearchString]*)\[\/url\]/", '[$1]($1)', $Text); - $Text = preg_replace("/\#\[url\=([$URLSearchString]*)\](.*?)\[\/url\]/", '[#$2]($1)', $Text); - $Text = preg_replace("/\[url\=([$URLSearchString]*)\](.*?)\[\/url\]/", '[$2]($1)', $Text); + $Text = preg_replace("/\[url\]([$URLSearchString]*)\[\/url\]/ism", '[$1]($1)', $Text); + $Text = preg_replace("/\#\[url\=([$URLSearchString]*)\](.*?)\[\/url\]/ism", '[#$2]($1)', $Text); + $Text = preg_replace("/\[url\=([$URLSearchString]*)\](.*?)\[\/url\]/ism", '[$2]($1)', $Text); // $Text = preg_replace("/\[img\](.*?)\[\/img\]/", t('Image/photo: ') . '$1', $Text); // $Text = preg_replace("/\[img\](.*?)\[\/img\]/", t('image/photo'), $Text); @@ -165,7 +165,7 @@ function bb2diaspora($Text,$preserve_nl = false) { // oembed tag -// $Text = oembed_bbcode2html($Text); + // $Text = oembed_bbcode2html($Text); // If we found an event earlier, strip out all the event code and replace with a reformatted version. @@ -189,8 +189,6 @@ function bb2diaspora($Text,$preserve_nl = false) { function format_event_diaspora($ev) { -// require_once('include/bbcode.php'); - if(! ((is_array($ev)) && count($ev))) return ''; @@ -201,7 +199,7 @@ function format_event_diaspora($ev) { $o .= '**' . bb2diaspora($ev['desc']) . '**' . "\n"; $o .= t('Starts:') . ' ' - . (($ev['adjust']) ? day_translate(datetime_convert('UTC', date_default_timezone_get(), + . (($ev['adjust']) ? day_translate(datetime_convert('UTC', 'UTC', $ev['start'] , $bd_format )) : day_translate(datetime_convert('UTC', 'UTC', $ev['start'] , $bd_format))) @@ -209,7 +207,7 @@ function format_event_diaspora($ev) { if(! $ev['nofinish']) $o .= t('Finishes:') . ' ' - . (($ev['adjust']) ? day_translate(datetime_convert('UTC', date_default_timezone_get(), + . (($ev['adjust']) ? day_translate(datetime_convert('UTC', 'UTC', $ev['finish'] , $bd_format )) : day_translate(datetime_convert('UTC', 'UTC', $ev['finish'] , $bd_format )))