]> git.mxchange.org Git - friendica.git/blobdiff - src/Content/Text/BBCode.php
Merge pull request #8019 from nupplaphil/task/replace_getClass
[friendica.git] / src / Content / Text / BBCode.php
index 2619dc92cc17dc9568c7841756a7dc9c9e9f3ffa..ada0a0f35a424e910ae7588a80615c6364f46f73 100644 (file)
@@ -1104,7 +1104,7 @@ class BBCode
                        @curl_exec($ch);
                        $curl_info = @curl_getinfo($ch);
 
-                       $a->getProfiler()->saveTimestamp($stamp1, "network", System::callstack());
+                       DI::profiler()->saveTimestamp($stamp1, "network", System::callstack());
 
                        if (substr($curl_info['content_type'], 0, 6) == 'image/') {
                                $text = "[url=" . $match[1] . ']' . $match[1] . "[/url]";
@@ -1152,7 +1152,7 @@ class BBCode
                $a = DI::app();
 
                // When the picture link is the own photo path then we can avoid fetching the link
-               $own_photo_url = preg_quote(Strings::normaliseLink($a->getBaseURL()) . '/photos/');
+               $own_photo_url = preg_quote(Strings::normaliseLink(DI::baseUrl()->get()) . '/photos/');
                if (preg_match('|' . $own_photo_url . '.*?/image/|', Strings::normaliseLink($match[1]))) {
                        if (!empty($match[3])) {
                                $text = '[img=' . str_replace('-1.', '-0.', $match[2]) . ']' . $match[3] . '[/img]';
@@ -1178,7 +1178,7 @@ class BBCode
                @curl_exec($ch);
                $curl_info = @curl_getinfo($ch);
 
-               $a->getProfiler()->saveTimestamp($stamp1, "network", System::callstack());
+               DI::profiler()->saveTimestamp($stamp1, "network", System::callstack());
 
                // if its a link to a picture then embed this picture
                if (substr($curl_info['content_type'], 0, 6) == 'image/') {
@@ -2061,7 +2061,7 @@ class BBCode
                // Now convert HTML to Markdown
                $text = HTML::toMarkdown($text);
 
-               $a->getProfiler()->saveTimestamp($stamp1, "parser", System::callstack());
+               DI::profiler()->saveTimestamp($stamp1, "parser", System::callstack());
 
                // Libertree has a problem with escaped hashtags.
                $text = str_replace(['\#'], ['#'], $text);