mirror of
https://github.com/friendica/friendica
synced 2024-11-10 05:42:54 +00:00
Only build tag and file when really needed
This commit is contained in:
parent
69db696ab1
commit
c2d4b557ae
1 changed files with 9 additions and 7 deletions
|
@ -189,14 +189,16 @@ class Item extends BaseObject
|
|||
}
|
||||
}
|
||||
|
||||
// Build the tag string out of the term entries
|
||||
if (array_key_exists('tag', $row) && empty($row['tag'])) {
|
||||
$row['tag'] = Term::tagTextFromItemId($row['internal-iid']);
|
||||
}
|
||||
if (!array_key_exists('verb', $row) || in_array($row['verb'], ['', ACTIVITY_POST, ACTIVITY_SHARE])) {
|
||||
// Build the tag string out of the term entries
|
||||
if (array_key_exists('tag', $row) && empty($row['tag'])) {
|
||||
$row['tag'] = Term::tagTextFromItemId($row['internal-iid']);
|
||||
}
|
||||
|
||||
// Build the file string out of the term entries
|
||||
if (array_key_exists('file', $row) && empty($row['file'])) {
|
||||
$row['file'] = Term::fileTextFromItemId($row['internal-iid']);
|
||||
// Build the file string out of the term entries
|
||||
if (array_key_exists('file', $row) && empty($row['file'])) {
|
||||
$row['file'] = Term::fileTextFromItemId($row['internal-iid']);
|
||||
}
|
||||
}
|
||||
|
||||
// Remove internal fields
|
||||
|
|
Loading…
Reference in a new issue