[TYPO3-core] RFC: Bug 5718: IRRE - Copying a page with related child records leads to duplicates of each children
Oliver Hader
oh at inpublica.de
Tue Jun 12 11:01:46 CEST 2007
Hi,
I attached a new patch. The check is moved to the functions copyRecord()
and copyRecord_raw().
olly
Oliver Hader schrieb:
> Hi Franz,
>
> Franz Holzinger schrieb:
>> Hello Oliver,
>>>> copyRecord_procBasedOnFieldType($table,$uid,$field,$value,$row,$conf,$realDe
>>> This function wasn't changed in the patch sent for this RFC.
>>>> I think this never will be reached when MM has been set, because it
>>>> always goes to the first if.
>> // Avoid duplicates while copying (e.g. when IRRE children were already
>> copied):
>> + if
>> (!isset($this->copyMappingArray[$table][$row['uid']])) {
>> + $this->copyRecord($table,$row['uid'],
>> $theNewRootID); // Copying each of the underlying records...
>> + }
>> I think this if to avoid duplicate copies should be moved inside of the
>> first if of the copyRecord function:
>> In no circumstances a duplicate copy of the same will be needed. Or the
>> contents of $this->copyMappingArray would be wrong.
>
> I though about the same on writing the patch. But I also though that
> some day it could be required to have kind of "drafts" for IRRE children
> and thus copying child records more than once (e.g. done by any hook).
>
> But I'm fine with moving the check against $this->copyMappingArray to
> the function copyRecord(). I noticed that I forgot to do this also for
> the raw copying in the function copyRecord_raw().
>
>
> olly
--
Oliver Hader
http://inpublica.de/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0005718_v2.patch
Type: text/x-diff
Size: 1080 bytes
Desc: not available
Url : http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20070612/cb04f101/attachment-0001.bin
More information about the TYPO3-team-core
mailing list