X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FContent%2FItem.php;h=06190dc88f5ff2f8584432de6765de0ac6041374;hb=38de3a53a5c9d47cffd95a7c686d9a353565bdee;hp=052670bc7f4c66866628d26fcd850729c3c7f1b1;hpb=d9c6a46ffee7f0544a8da195243f524623ddc107;p=friendica.git diff --git a/src/Content/Item.php b/src/Content/Item.php index 052670bc7f..06190dc88f 100644 --- a/src/Content/Item.php +++ b/src/Content/Item.php @@ -23,8 +23,8 @@ namespace Friendica\Content; use Friendica\Database\DBA; use Friendica\Model\Contact; -use Friendica\Model\FileTag; use Friendica\Model\Tag; +use Friendica\Model\Post; /** * A content helper class for displaying items @@ -64,7 +64,7 @@ class Item $folders = []; $first = true; - foreach (FileTag::fileToArray($item['file'] ?? '', 'category') as $savedFolderName) { + foreach (Post\Category::getArrayByURIId($item['uri-id'], $item['uid'], Post\Category::CATEGORY) as $savedFolderName) { if (!empty($item['author-link'])) { $url = $item['author-link'] . "?category=" . rawurlencode($savedFolderName); } else { @@ -85,7 +85,7 @@ class Item } if (local_user() == $item['uid']) { - foreach (FileTag::fileToArray($item['file'] ?? '') as $savedFolderName) { + foreach (Post\Category::getArrayByURIId($item['uri-id'], $item['uid'], Post\Category::FILE) as $savedFolderName) { $folders[] = [ 'name' => $savedFolderName, 'url' => "#", @@ -130,7 +130,7 @@ class Item // Checking for the alias that is used for OStatus $pattern = '/[@!]\[url\=(.*?)\](.*?)\[\/url\]/ism'; if (preg_match($pattern, $tag, $matches)) { - $data = Contact::getByURL($matches[1], 0, ['alias', 'nick'], false); + $data = Contact::getByURL($matches[1], false, ['alias', 'nick']); if ($data['alias'] != '') { $newtag = '@[url=' . $data['alias'] . ']' . $data['nick'] . '[/url]'; @@ -150,7 +150,7 @@ class Item // Try to detect the contact in various ways if (strpos($name, 'http://') || strpos($name, '@')) { - $contact = Contact::getByURLForUser($name, $profile_uid, []); + $contact = Contact::getByURLForUser($name, $profile_uid); } else { $contact = false; $fields = ['id', 'url', 'nick', 'name', 'alias', 'network', 'forum', 'prv'];