Fix: some selected item fields hadn't been selected

This commit is contained in:
Michael 2020-04-15 05:24:36 +00:00
parent b5637b8cfc
commit 0d5d0bb65a

View File

@ -342,10 +342,6 @@ class Item
} }
} }
if (array_key_exists('signed_text', $row) && array_key_exists('interaction', $row) && !is_null($row['interaction'])) {
$row['signed_text'] = $row['interaction'];
}
if (array_key_exists('ignored', $row) && array_key_exists('internal-user-ignored', $row) && !is_null($row['internal-user-ignored'])) { if (array_key_exists('ignored', $row) && array_key_exists('internal-user-ignored', $row) && !is_null($row['internal-user-ignored'])) {
$row['ignored'] = $row['internal-user-ignored']; $row['ignored'] = $row['internal-user-ignored'];
} }
@ -672,7 +668,8 @@ class Item
{ {
$fields = []; $fields = [];
$fields['item'] = ['id', 'uid', 'parent', 'uri', 'parent-uri', 'thr-parent', 'guid', $fields['item'] = ['id', 'uid', 'parent', 'uri', 'parent-uri', 'thr-parent',
'guid', 'uri-id', 'parent-uri-id', 'thr-parent-id',
'contact-id', 'owner-id', 'author-id', 'type', 'wall', 'gravity', 'extid', 'contact-id', 'owner-id', 'author-id', 'type', 'wall', 'gravity', 'extid',
'created', 'edited', 'commented', 'received', 'changed', 'psid', 'created', 'edited', 'commented', 'received', 'changed', 'psid',
'resource-id', 'event-id', 'tag', 'attach', 'post-type', 'file', 'resource-id', 'event-id', 'tag', 'attach', 'post-type', 'file',
@ -714,9 +711,7 @@ class Item
'nofinish' => 'event-nofinish','adjust' => 'event-adjust', 'nofinish' => 'event-nofinish','adjust' => 'event-adjust',
'ignore' => 'event-ignore', 'id' => 'event-id']; 'ignore' => 'event-ignore', 'id' => 'event-id'];
$fields['sign'] = ['signed_text', 'signature', 'signer']; $fields['diaspora-interaction'] = ['interaction', 'interaction' => 'signed_text'];
$fields['diaspora-interaction'] = ['interaction'];
return $fields; return $fields;
} }
@ -858,10 +853,6 @@ class Item
$selected[] = 'internal-user-ignored'; $selected[] = 'internal-user-ignored';
} }
if (in_array('signed_text', $selected)) {
$selected[] = 'interaction';
}
$legacy_fields = array_merge(ItemDeliveryData::LEGACY_FIELD_LIST, self::MIXED_CONTENT_FIELDLIST); $legacy_fields = array_merge(ItemDeliveryData::LEGACY_FIELD_LIST, self::MIXED_CONTENT_FIELDLIST);
$selection = []; $selection = [];