[TYPO3-core] RFC #4270 displayCond for flexforms, that affects on row of element
Rupert Germann
rupi at gmx.li
Tue Jun 9 22:20:17 CEST 2009
Tolleiv Nietsch wrote:
> Hi - thanks for the feedback,
> I hope this new patch fit's your needs and now it should follow the CGL.
> ;)
it doesn't have to fit my needs - according to RFC 1925 chapter 2 it has to
work ! [*]
;-)
you sent the same patch again.
for the v3 patch please
- make it against latest trunk
- make it against trunk root and not in t3lib folder
- use unix linebreaks
- name it 4270.diff
thanks
rupert
[*] http://www.faqs.org/rfcs/rfc1925.html
>> hmm, I read it, too:
>> (line 5732)
>>
>> if($ffValue && ...
>>
>> there is no $ffValue at this point.
>
> Yes you're right for some reason this typo made it into the last patch -
> it's fixed within the new patch...
>
>>
>> and even if that is fixed, it will still not work because filling
>> $theFieldValue with $row[$parts[1]][$ffValueKey] (in case $parts[1]
>> contains 'parentRec.') is nonsense - we want $row[$parts[1]] at this
>> point. and btw: conditions referencing normal ff fields will not work
>> anymore.
>>
>> something like this would work:
>> if ($ffValueKey && strpos($parts[1],'parentRec.')!==FALSE) {
>> $theFieldValue = $row[$parts[1]];
>> } else {
>> $theFieldValue = ($ffValueKey ? $row[$parts[1]][$ffValueKey] :
>> $row[$parts[1]]);
>> }
>
> That's what it looks like now:
>
> $theFieldValue = $row[$parts[1]];
> if($ffValueKey && strpos($parts[1], 'parentRec.')===FALSE) {
> $theFieldValue = $row[$parts[1]][$ffValueKey];
> }
>
> The first line is what we want in most cases, no matter if there a
> "parentRec." in the key or not. If it's not a "parentRec."-field and if
> there's a $ffValueKey then we want the sub-part of this array. Pretty
> straight forward - I changed stristr() and strpos() since imho it's
> easier to read the code with strpos().
>
> Let me know if you have any further feedback,
> greets
> Tolleiv
More information about the TYPO3-team-core
mailing list