diff --git a/include/api.php b/include/api.php index 808e34065..d314988ed 100644 --- a/include/api.php +++ b/include/api.php @@ -2043,7 +2043,7 @@ function api_statuses_repeat($type) $pos = strpos($item['body'], "[share"); $post = substr($item['body'], $pos); } else { - $post = share_header($item['author-name'], $item['author-link'], $item['author-avatar'], $item['guid'], $item['created'], $item['plink']); + $post = BBCode::getShareOpeningTag($item['author-name'], $item['author-link'], $item['author-avatar'], $item['guid'], $item['created'], $item['plink']); if (!empty($item['title'])) { $post .= '[h3]' . $item['title'] . "[/h3]\n"; diff --git a/mod/share.php b/mod/share.php index 3e9b6aee6..90f2b5248 100644 --- a/mod/share.php +++ b/mod/share.php @@ -20,6 +20,7 @@ */ use Friendica\App; +use Friendica\Content\Text\BBCode; use Friendica\Database\DBA; use Friendica\Model\Item; @@ -42,7 +43,7 @@ function share_init(App $a) { $pos = strpos($item['body'], "[share"); $o = substr($item['body'], $pos); } else { - $o = share_header($item['author-name'], $item['author-link'], $item['author-avatar'], $item['guid'], $item['created'], $item['plink']); + $o = BBCode::getShareOpeningTag($item['author-name'], $item['author-link'], $item['author-avatar'], $item['guid'], $item['created'], $item['plink']); if ($item['title']) { $o .= '[h3]'.$item['title'].'[/h3]'."\n"; diff --git a/src/Protocol/ActivityPub/Transmitter.php b/src/Protocol/ActivityPub/Transmitter.php index 9cb5efca4..dfe7c77df 100644 --- a/src/Protocol/ActivityPub/Transmitter.php +++ b/src/Protocol/ActivityPub/Transmitter.php @@ -863,7 +863,7 @@ class Transmitter $type = 'Announce'; // Disguise forum posts as reshares. Will later be converted to a real announce - $item['body'] = share_header($item['author-name'], $item['author-link'], $item['author-avatar'], + $item['body'] = BBCode::getShareOpeningTag($item['author-name'], $item['author-link'], $item['author-avatar'], $item['guid'], $item['created'], $item['plink']) . $item['body'] . '[/share]'; } } diff --git a/src/Protocol/Diaspora.php b/src/Protocol/Diaspora.php index c4e7d9fb8..3833aae23 100644 --- a/src/Protocol/Diaspora.php +++ b/src/Protocol/Diaspora.php @@ -2795,7 +2795,7 @@ class Diaspora /// @todo Copy tag data from original post - $prefix = share_header( + $prefix = BBCode::getShareOpeningTag( $original_item["author-name"], $original_item["author-link"], $original_item["author-avatar"], @@ -3676,7 +3676,7 @@ class Diaspora if ($item['author-link'] != $item['owner-link']) { require_once 'mod/share.php'; - $body = share_header($item['author-name'], $item['author-link'], $item['author-avatar'], + $body = BBCode::getShareOpeningTag($item['author-name'], $item['author-link'], $item['author-avatar'], "", $item['created'], $item['plink']) . $body . '[/share]'; }