]> git.mxchange.org Git - friendica.git/commitdiff
Honor item delivery data legacy fields
authorHypolite Petovan <hypolite@mrpetovan.com>
Sat, 8 Dec 2018 20:22:54 +0000 (15:22 -0500)
committerHypolite Petovan <hypolite@mrpetovan.com>
Mon, 21 Jan 2019 14:39:15 +0000 (09:39 -0500)
src/Model/Item.php
src/Model/ItemDeliveryData.php

index 870c9b1256c16d5cd3ab51c4a3c5334d192ec85b..f212045206cc3e5171230a9ed7e5288eb955fb3f 100644 (file)
@@ -551,7 +551,7 @@ class Item extends BaseObject
 
                $fields['item-content'] = array_merge(self::CONTENT_FIELDLIST, self::MIXED_CONTENT_FIELDLIST);
 
-               $fields['item-delivery-data'] = ItemDeliveryData::FIELD_LIST;
+               $fields['item-delivery-data'] = array_merge(ItemDeliveryData::LEGACY_FIELD_LIST, ItemDeliveryData::FIELD_LIST);
 
                $fields['permissionset'] = ['allow_cid', 'allow_gid', 'deny_cid', 'deny_gid'];
 
@@ -730,7 +730,7 @@ class Item extends BaseObject
                foreach ($fields as $table => $table_fields) {
                        foreach ($table_fields as $field => $select) {
                                if (empty($selected) || in_array($select, $selected)) {
-                                       $legacy_fields = array_merge(ItemDeliveryData::FIELD_LIST, self::MIXED_CONTENT_FIELDLIST);
+                                       $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 . "`";
                                        }
index e3be073e8e86bba0b53a594ca7709766405a0f75..fa69af84197a3d940fcc9dcdb865076b8f7a4a21 100644 (file)
@@ -10,10 +10,13 @@ use Friendica\Database\DBA;
 
 class ItemDeliveryData
 {
-       const FIELD_LIST = [
+       const LEGACY_FIELD_LIST = [
                // Legacy fields moved from item table
                'postopts',
                'inform',
+       ];
+
+       const FIELD_LIST = [
                // New delivery fields with virtual field name in item fields
                'queue_count' => 'delivery_queue_count',
                'queue_done'  => 'delivery_queue_done',