<?php
/**
- * @copyright Copyright (C) 2020, Friendica
+ * @copyright Copyright (C) 2010-2021, the Friendica project
*
* @license GNU AGPL version 3 or any later version
*
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
$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 {
}
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' => "#",