]> git.mxchange.org Git - friendica.git/blobdiff - include/bb2diaspora.php
Add Contact Object
[friendica.git] / include / bb2diaspora.php
index a07a583538e4ac5e88b1613ff765c50837c83846..2188cf8c7037d463d0f8637f39e3f23e463031d0 100644 (file)
@@ -1,12 +1,17 @@
 <?php
 
+use Friendica\App;
+use Friendica\Core\System;
+use Friendica\Network\Probe;
+use Friendica\Object\Contact;
+
 use League\HTMLToMarkdown\HtmlConverter;
 
-require_once "include/oembed.php";
-require_once "include/event.php";
-require_once "library/markdown.php";
-require_once "include/html2bbcode.php";
-require_once "include/bbcode.php";
+require_once 'include/oembed.php';
+require_once 'include/event.php';
+require_once 'library/markdown.php';
+require_once 'include/html2bbcode.php';
+require_once 'include/bbcode.php';
 
 /**
  * @brief Callback function to replace a Diaspora style mention in a mention for Friendica
@@ -185,7 +190,7 @@ function bb2diaspora($Text, $preserve_nl = false, $fordiaspora = true) {
        $Text = $converter->convert($Text);
 
        // unmask the special chars back to HTML
-       $Text = str_replace(array('&_lt_;', '&_gt_;', '&_amp_;'), array('&lt;', '&gt;', '&amp;'), $Text);
+       $Text = str_replace(array('&\_lt\_;', '&\_gt\_;', '&\_amp\_;'), array('&lt;', '&gt;', '&amp;'), $Text);
 
        $a->save_timestamp($stamp1, "parser");
 
@@ -238,7 +243,7 @@ function format_event_diaspora($ev) {
                        $ev['start'] , $bd_format ))
                        :  day_translate(datetime_convert('UTC', 'UTC',
                        $ev['start'] , $bd_format)))
-               .  '](' . App::get_baseurl() . '/localtime/?f=&time=' . urlencode(datetime_convert('UTC','UTC',$ev['start'])) . ")\n";
+               .  '](' . System::baseUrl() . '/localtime/?f=&time=' . urlencode(datetime_convert('UTC','UTC',$ev['start'])) . ")\n";
 
        if (! $ev['nofinish']) {
                $o .= t('Finishes:') . ' ' . '['
@@ -246,7 +251,7 @@ function format_event_diaspora($ev) {
                                $ev['finish'] , $bd_format ))
                                :  day_translate(datetime_convert('UTC', 'UTC',
                                $ev['finish'] , $bd_format )))
-                       . '](' . App::get_baseurl() . '/localtime/?f=&time=' . urlencode(datetime_convert('UTC','UTC',$ev['finish'])) . ")\n";
+                       . '](' . System::baseUrl() . '/localtime/?f=&time=' . urlencode(datetime_convert('UTC','UTC',$ev['finish'])) . ")\n";
        }
 
        if (strlen($ev['location'])) {