From: Hypolite Petovan Date: Wed, 12 Dec 2018 04:21:22 +0000 (-0500) Subject: Replace misuses ItemDeliveryData::FIELD_LIST with LEGACY_FIELD_LIST X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=16fabb4e04ad983fe1ef571e8a191535d355d605;p=friendica.git Replace misuses ItemDeliveryData::FIELD_LIST with LEGACY_FIELD_LIST --- diff --git a/src/Model/Item.php b/src/Model/Item.php index f212045206..2222d71f55 100644 --- a/src/Model/Item.php +++ b/src/Model/Item.php @@ -190,7 +190,7 @@ class Item extends BaseObject // Fetch data from the item-content table whenever there is content there if (self::isLegacyMode()) { - $legacy_fields = array_merge(ItemDeliveryData::FIELD_LIST, self::MIXED_CONTENT_FIELDLIST); + $legacy_fields = array_merge(ItemDeliveryData::LEGACY_FIELD_LIST, self::MIXED_CONTENT_FIELDLIST); foreach ($legacy_fields as $field) { if (empty($row[$field]) && !empty($row['internal-item-' . $field])) { $row[$field] = $row['internal-item-' . $field]; @@ -726,11 +726,12 @@ class Item extends BaseObject $selected[] = 'interaction'; } + $legacy_fields = array_merge(ItemDeliveryData::LEGACY_FIELD_LIST, self::MIXED_CONTENT_FIELDLIST); + $selection = []; foreach ($fields as $table => $table_fields) { foreach ($table_fields as $field => $select) { if (empty($selected) || in_array($select, $selected)) { - $legacy_fields = array_merge(ItemDeliveryData::LEGACY_FIELD_LIST, self::MIXED_CONTENT_FIELDLIST); if (self::isLegacyMode() && in_array($select, $legacy_fields)) { $selection[] = "`item`.`".$select."` AS `internal-item-" . $select . "`"; }