[CLEANUP] Code duplication in DataHandler::copyRecord_processManyToMany() 23/40423/5
authorAndreas Wolf <andreas.wolf@typo3.org>
Wed, 17 Jun 2015 18:54:07 +0000 (20:54 +0200)
committerAndreas Fernandez <typo3@scripting-base.de>
Thu, 18 Jun 2015 11:01:01 +0000 (13:01 +0200)
commitee6fd9f6b8473ebace3d28403b92ed2d88182128
treeffb9c51e0c53562abbfb96246c99b2da449ebebf
parentcffc7e65c6b252cf7f36330ab96859beb0a24531
[CLEANUP] Code duplication in DataHandler::copyRecord_processManyToMany()

There was a foreach loop that only differed in one line, but was
duplicated due to the complex condition around it. This commit splits
the condition, introduces helper variables and moves the condition
inside the foreach loop to get rid of the duplication.

Additionally, duplicated lines for purging the items of the relation
analyzer are also removed.

Resolves: #67579
Releases: master
Change-Id: Ibb9277dfb32960cc77aee17839d7df3bf57fc6da
Reviewed-on: http://review.typo3.org/40423
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Tested-by: Markus Klein <markus.klein@typo3.org>
Reviewed-by: Stephan GroƟberndt <stephan@grossberndt.de>
Reviewed-by: Andreas Fernandez <typo3@scripting-base.de>
Tested-by: Andreas Fernandez <typo3@scripting-base.de>
typo3/sysext/core/Classes/DataHandling/DataHandler.php