]> git.mxchange.org Git - friendica.git/commitdiff
Rename PageInfo::appendToBody to searchAndAppendToBody
authorHypolite Petovan <hypolite@mrpetovan.com>
Fri, 17 Jul 2020 23:15:43 +0000 (19:15 -0400)
committerHypolite Petovan <hypolite@mrpetovan.com>
Fri, 17 Jul 2020 23:15:43 +0000 (19:15 -0400)
src/Content/PageInfo.php
src/Module/Debug/Babel.php
src/Protocol/Diaspora.php
src/Protocol/OStatus.php

index 642c579387468375e3b09f49cf1a057aa93b0402..478e7a490b798114c96af8c871888b653297df89 100644 (file)
@@ -40,7 +40,7 @@ class PageInfo
         * @return string
         * @throws HTTPException\InternalServerErrorException
         */
-       public static function appendToBody(string $body, bool $searchNakedUrls = false, bool $no_photos = false)
+       public static function searchAndAppendToBody(string $body, bool $searchNakedUrls = false, bool $no_photos = false)
        {
                Logger::info('add_page_info_to_body: fetch page info for body', ['body' => $body]);
 
index 2954bc010c2651e49794405a55787d69147d8901..ee9dae305495696f94fc604ada5e30f12cd055c5 100644 (file)
@@ -115,7 +115,7 @@ class Babel extends BaseModule
                                                'content' => visible_whitespace(var_export($tags, true)),
                                        ];
 
-                                       $body2 = PageInfo::appendToBody($bbcode, true);
+                                       $body2 = PageInfo::searchAndAppendToBody($bbcode, true);
                                        $results[] = [
                                                'title'   => DI::l10n()->t('PageInfo::appendToBody'),
                                                'content' => visible_whitespace($body2)
index 0dfcf6f77eacaf8b112ec2a0ee08c1fdc0c8bfed..bd99b361e345b8a767e7597ddbf34d6cb871b315 100644 (file)
@@ -2622,7 +2622,7 @@ class Diaspora
                                $item["body"] = self::replacePeopleGuid($item["body"], $item["author-link"]);
 
                                // Add OEmbed and other information to the body
-                               $item["body"] = PageInfo::appendToBody($item["body"], false, true);
+                               $item["body"] = PageInfo::searchAndAppendToBody($item["body"], false, true);
 
                                return $item;
                        } else {
@@ -2986,7 +2986,7 @@ class Diaspora
 
                        // Add OEmbed and other information to the body
                        if (!self::isHubzilla($contact["url"])) {
-                               $body = PageInfo::appendToBody($body, false, true);
+                               $body = PageInfo::searchAndAppendToBody($body, false, true);
                        }
                }
 
index fedf0f2533f9f9c07d3ac6b14fad26b1fb04d88a..9a52476b569b47ee0d010acaa84e6f05367235db 100644 (file)
@@ -698,7 +698,7 @@ class OStatus
 
                // Only add additional data when there is no picture in the post
                if (!strstr($item["body"], '[/img]')) {
-                       $item["body"] = PageInfo::appendToBody($item["body"]);
+                       $item["body"] = PageInfo::searchAndAppendToBody($item["body"]);
                }
 
                Tag::storeFromBody($item['uri-id'], $item['body']);