Replace misuses ItemDeliveryData::FIELD_LIST with LEGACY_FIELD_LIST
This commit is contained in:
parent
38734f17b9
commit
16fabb4e04
1 changed files with 3 additions and 2 deletions
|
@ -190,7 +190,7 @@ class Item extends BaseObject
|
||||||
|
|
||||||
// Fetch data from the item-content table whenever there is content there
|
// Fetch data from the item-content table whenever there is content there
|
||||||
if (self::isLegacyMode()) {
|
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) {
|
foreach ($legacy_fields as $field) {
|
||||||
if (empty($row[$field]) && !empty($row['internal-item-' . $field])) {
|
if (empty($row[$field]) && !empty($row['internal-item-' . $field])) {
|
||||||
$row[$field] = $row['internal-item-' . $field];
|
$row[$field] = $row['internal-item-' . $field];
|
||||||
|
@ -726,11 +726,12 @@ class Item extends BaseObject
|
||||||
$selected[] = 'interaction';
|
$selected[] = 'interaction';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$legacy_fields = array_merge(ItemDeliveryData::LEGACY_FIELD_LIST, self::MIXED_CONTENT_FIELDLIST);
|
||||||
|
|
||||||
$selection = [];
|
$selection = [];
|
||||||
foreach ($fields as $table => $table_fields) {
|
foreach ($fields as $table => $table_fields) {
|
||||||
foreach ($table_fields as $field => $select) {
|
foreach ($table_fields as $field => $select) {
|
||||||
if (empty($selected) || in_array($select, $selected)) {
|
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)) {
|
if (self::isLegacyMode() && in_array($select, $legacy_fields)) {
|
||||||
$selection[] = "`item`.`".$select."` AS `internal-item-" . $select . "`";
|
$selection[] = "`item`.`".$select."` AS `internal-item-" . $select . "`";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue