mirror of
https://github.com/friendica/friendica
synced 2025-04-29 15:04:22 +02:00
Replace legacy file/category handling
This commit is contained in:
parent
0668b2dfd5
commit
d2ea3eabfb
14 changed files with 103 additions and 253 deletions
|
@ -63,22 +63,6 @@ class Post
|
|||
}
|
||||
}
|
||||
|
||||
if (!array_key_exists('verb', $row) || in_array($row['verb'], ['', Activity::POST, Activity::SHARE])) {
|
||||
// Build the file string out of the term entries
|
||||
if (array_key_exists('file', $row)) {
|
||||
if ($row['internal-file-count'] > 0) {
|
||||
$row['file'] = Post\Category::getTextByURIId($row['internal-uri-id'], $row['internal-uid']);
|
||||
} else {
|
||||
$row['file'] = '';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Remove internal fields
|
||||
unset($row['internal-file-count']);
|
||||
unset($row['internal-uri-id']);
|
||||
unset($row['internal-uid']);
|
||||
|
||||
return $row;
|
||||
}
|
||||
|
||||
|
@ -213,7 +197,6 @@ class Post
|
|||
}
|
||||
}
|
||||
|
||||
$selected = array_merge($selected, ['internal-uri-id', 'internal-uid', 'internal-file-count']);
|
||||
$selected = array_unique($selected);
|
||||
|
||||
return DBA::select($view, $selected, $condition, $params);
|
||||
|
@ -267,8 +250,6 @@ class Post
|
|||
$selected = Item::DISPLAY_FIELDLIST;
|
||||
}
|
||||
|
||||
$selected = array_unique(array_merge($selected, ['internal-uri-id', 'internal-uid', 'internal-file-count']));
|
||||
|
||||
$condition = DBA::mergeConditions($condition,
|
||||
["`visible` AND NOT `deleted` AND NOT `moderated`
|
||||
AND NOT `author-blocked` AND NOT `owner-blocked`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue