]> git.mxchange.org Git - friendica.git/commitdiff
Replace misuses ItemDeliveryData::FIELD_LIST with LEGACY_FIELD_LIST
authorHypolite Petovan <hypolite@mrpetovan.com>
Wed, 12 Dec 2018 04:21:22 +0000 (23:21 -0500)
committerHypolite Petovan <hypolite@mrpetovan.com>
Mon, 21 Jan 2019 14:39:15 +0000 (09:39 -0500)
src/Model/Item.php

index f212045206cc3e5171230a9ed7e5288eb955fb3f..2222d71f55c0b6cfaa641a08d8227ec6587a8a0c 100644 (file)
@@ -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 . "`";
                                        }