Project

General

Profile

Actions

Bug #17377

closed

Missleading comment in TCEmain::copyRecord_procBasedOnFieldType()

Added by Franz Holzinger over 17 years ago. Updated over 16 years ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
-
Target version:
-
Start date:
2007-06-12
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.1
PHP Version:
4.3
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

A branch in t3lib_TCEmain::copyRecord_procBasedOnFieldType never gets reached. So something seems to be wrong here.

If you use the inline type and have also set 'MM', then the function getInlineFieldType will return 'mm'. But in copyRecord_procBasedOnFieldType there is an if-else statement.

if ($this->isReferenceField($conf) || $inlineSubType 'mm') {

// if another inline subtype is used (foreign_field, mm with attributes or simply item list)
} elseif ($inlineSubType ! false) {

...

However you will always come into the first branch if you use inline and mm simultaneously. And if you do not use inline you will not come into the second branch too. So something seems to be wrong here.

function getInlineFieldType($conf) {
if ($conf['type'] == 'inline' && $conf['foreign_table']) {
if ($conf['foreign_field'])
return 'field'; // the reference to the parent is stored in a pointer field in the child record
elseif ($conf['MM'])
return 'mm'; // regular MM intermediate table is used to store data
else
return 'list'; // an item list (separated by comma) is stored (like select type is doing)
}
return false;
}
(issue imported from #M5778)


Files

0005778.patch (884 Bytes) 0005778.patch Administrator Admin, 2007-06-12 10:44
Actions

Also available in: Atom PDF