]> git.mxchange.org Git - friendica.git/commitdiff
Replace share_header calls with BBCode::getShareOpeningTag
authorHypolite Petovan <hypolite@mrpetovan.com>
Thu, 18 Jun 2020 12:53:57 +0000 (08:53 -0400)
committerHypolite Petovan <hypolite@mrpetovan.com>
Thu, 18 Jun 2020 12:53:57 +0000 (08:53 -0400)
include/api.php
mod/share.php
src/Protocol/ActivityPub/Transmitter.php
src/Protocol/Diaspora.php

index 808e34065b35c2894a899aa8c73b02f262c2c7bf..d314988ed867eb861d90143c4df2443d52473427 100644 (file)
@@ -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";
index 3e9b6aee6fe86a1046357629642b3ac489d2bbed..90f2b5248820b62e342a80c4703847f8e367d3c3 100644 (file)
@@ -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";
index 9cb5efca413038ce9aef3538a5aae04a019be66c..dfe7c77df7c6270acd4c43b90cbc9b98de7afc81 100644 (file)
@@ -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]';
                        }
                }
index c4e7d9fb87fcf5f16adfb456de50515c9876c458..3833aae23cb97ada8be206f0a4b2c29a8e3f3f59 100644 (file)
@@ -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]';
                        }