Rename PageInfo::appendToBody to searchAndAppendToBody
This commit is contained in:
parent
e67dbd9747
commit
25b3fa83fc
|
@ -40,7 +40,7 @@ class PageInfo
|
||||||
* @return string
|
* @return string
|
||||||
* @throws HTTPException\InternalServerErrorException
|
* @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]);
|
Logger::info('add_page_info_to_body: fetch page info for body', ['body' => $body]);
|
||||||
|
|
||||||
|
|
|
@ -115,7 +115,7 @@ class Babel extends BaseModule
|
||||||
'content' => visible_whitespace(var_export($tags, true)),
|
'content' => visible_whitespace(var_export($tags, true)),
|
||||||
];
|
];
|
||||||
|
|
||||||
$body2 = PageInfo::appendToBody($bbcode, true);
|
$body2 = PageInfo::searchAndAppendToBody($bbcode, true);
|
||||||
$results[] = [
|
$results[] = [
|
||||||
'title' => DI::l10n()->t('PageInfo::appendToBody'),
|
'title' => DI::l10n()->t('PageInfo::appendToBody'),
|
||||||
'content' => visible_whitespace($body2)
|
'content' => visible_whitespace($body2)
|
||||||
|
|
|
@ -2622,7 +2622,7 @@ class Diaspora
|
||||||
$item["body"] = self::replacePeopleGuid($item["body"], $item["author-link"]);
|
$item["body"] = self::replacePeopleGuid($item["body"], $item["author-link"]);
|
||||||
|
|
||||||
// Add OEmbed and other information to the body
|
// 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;
|
return $item;
|
||||||
} else {
|
} else {
|
||||||
|
@ -2986,7 +2986,7 @@ class Diaspora
|
||||||
|
|
||||||
// Add OEmbed and other information to the body
|
// Add OEmbed and other information to the body
|
||||||
if (!self::isHubzilla($contact["url"])) {
|
if (!self::isHubzilla($contact["url"])) {
|
||||||
$body = PageInfo::appendToBody($body, false, true);
|
$body = PageInfo::searchAndAppendToBody($body, false, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -698,7 +698,7 @@ class OStatus
|
||||||
|
|
||||||
// Only add additional data when there is no picture in the post
|
// Only add additional data when there is no picture in the post
|
||||||
if (!strstr($item["body"], '[/img]')) {
|
if (!strstr($item["body"], '[/img]')) {
|
||||||
$item["body"] = PageInfo::appendToBody($item["body"]);
|
$item["body"] = PageInfo::searchAndAppendToBody($item["body"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
Tag::storeFromBody($item['uri-id'], $item['body']);
|
Tag::storeFromBody($item['uri-id'], $item['body']);
|
||||||
|
|
Loading…
Reference in a new issue