From 25b3fa83fc25912ea03638fe1ac1aaaaa28f58be Mon Sep 17 00:00:00 2001
From: Hypolite Petovan <hypolite@mrpetovan.com>
Date: Fri, 17 Jul 2020 19:15:43 -0400
Subject: [PATCH] Rename PageInfo::appendToBody to searchAndAppendToBody

---
 src/Content/PageInfo.php   | 2 +-
 src/Module/Debug/Babel.php | 2 +-
 src/Protocol/Diaspora.php  | 4 ++--
 src/Protocol/OStatus.php   | 2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/Content/PageInfo.php b/src/Content/PageInfo.php
index 642c579387..478e7a490b 100644
--- a/src/Content/PageInfo.php
+++ b/src/Content/PageInfo.php
@@ -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]);
 
diff --git a/src/Module/Debug/Babel.php b/src/Module/Debug/Babel.php
index 2954bc010c..ee9dae3054 100644
--- a/src/Module/Debug/Babel.php
+++ b/src/Module/Debug/Babel.php
@@ -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)
diff --git a/src/Protocol/Diaspora.php b/src/Protocol/Diaspora.php
index 0dfcf6f77e..bd99b361e3 100644
--- a/src/Protocol/Diaspora.php
+++ b/src/Protocol/Diaspora.php
@@ -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);
 			}
 		}
 
diff --git a/src/Protocol/OStatus.php b/src/Protocol/OStatus.php
index fedf0f2533..9a52476b56 100644
--- a/src/Protocol/OStatus.php
+++ b/src/Protocol/OStatus.php
@@ -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']);
-- 
2.39.5