X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FProtocol%2FFeed.php;h=c088876d93f4834d10d908a95d446c30619404e9;hb=d6c1e1fd1c8897c6a26a60486448c699e65843a8;hp=65af597f169962526514a596cf5e5a60c2bb64fb;hpb=2a431b580f2e8f6a596e84175932e793678cde63;p=friendica.git diff --git a/src/Protocol/Feed.php b/src/Protocol/Feed.php index 65af597f16..c088876d93 100644 --- a/src/Protocol/Feed.php +++ b/src/Protocol/Feed.php @@ -29,11 +29,9 @@ use Friendica\Content\Text\HTML; use Friendica\Core\Cache\Duration; use Friendica\Core\Logger; use Friendica\Core\Protocol; -use Friendica\Core\Worker; use Friendica\Database\DBA; use Friendica\DI; use Friendica\Model\Contact; -use Friendica\Model\Conversation; use Friendica\Model\Item; use Friendica\Model\Post; use Friendica\Model\Tag; @@ -41,6 +39,7 @@ use Friendica\Model\User; use Friendica\Util\DateTimeFormat; use Friendica\Util\Network; use Friendica\Util\ParseUrl; +use Friendica\Util\Proxy; use Friendica\Util\Strings; use Friendica\Util\XML; @@ -959,7 +958,7 @@ class Feed XML::addElement($doc, $root, "id", DI::baseUrl() . "/profile/" . $owner["nick"]); XML::addElement($doc, $root, "title", $title); XML::addElement($doc, $root, "subtitle", sprintf("Updates from %s on %s", $owner["name"], DI::config()->get('config', 'sitename'))); - XML::addElement($doc, $root, "logo", $owner["photo"]); + XML::addElement($doc, $root, "logo", Contact::getAvatarUrlForId($owner['id'], Proxy::SIZE_SMALL, $owner['updated'])); XML::addElement($doc, $root, "updated", DateTimeFormat::utcNow(DateTimeFormat::ATOM)); $author = self::addAuthor($doc, $owner); @@ -1108,9 +1107,9 @@ class Feed XML::addElement($doc, $entry, "id", $item["uri"]); XML::addElement($doc, $entry, "title", html_entity_decode($title, ENT_QUOTES, 'UTF-8')); - $body = OStatus::formatPicturePost($item['body']); + $body = OStatus::formatPicturePost($item['body'], $item['uri-id']); - $body = BBCode::convert($body, false, BBCode::OSTATUS); + $body = BBCode::convertForUriId($item['uri-id'], $body, BBCode::OSTATUS, false); XML::addElement($doc, $entry, "content", $body, ["type" => "html"]); @@ -1187,7 +1186,7 @@ class Feed private static function getTitle(array $item) { if ($item['title'] != '') { - return BBCode::convert($item['title'], false, BBCode::OSTATUS); + return BBCode::convertForUriId($item['uri-id'], $item['title'], BBCode::OSTATUS); } // Fetch information about the post @@ -1200,7 +1199,7 @@ class Feed // Remove the share element before fetching the first line $title = trim(preg_replace("/\[share.*?\](.*?)\[\/share\]/ism","\n$1\n",$item['body'])); - $title = HTML::toPlaintext(BBCode::convert($title, false), 0, true)."\n"; + $title = BBCode::toPlaintext($title)."\n"; $pos = strpos($title, "\n"); $trailer = ""; if (($pos == 0) || ($pos > 100)) {