[BUGFIX] Avoid building SQL deleteClause expression if unused 84/50784/2
authorClaus Due <claus@namelesscoder.net>
Sat, 26 Nov 2016 13:43:57 +0000 (14:43 +0100)
committerWouter Wolters <typo3@wouterwolters.nl>
Sat, 26 Nov 2016 19:30:48 +0000 (20:30 +0100)
commitc6ad571fd2ad96dc8a908ec9eb64015780db79e1
treea0f9e5a37b0c3d5e79b56351e3972b5bc2ff9e5c
parent7ff72daa4933ae9be944355107fbef2601af0e19
[BUGFIX] Avoid building SQL deleteClause expression if unused

This patch avoids building an instance of ConnectionPool,
getting a QueryBuilder and building an expression unless
that expression is needed by the function.

Also switches a condition with else clause to an early
return guard clause (cosmetic only).

Change-Id: I804b3ff9e624aa4b8b9c760d2a5e858039b6f9b9
Resolves: #78806
Releases: master
Reviewed-on: https://review.typo3.org/50784
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Stephan GroƟberndt <stephan@grossberndt.de>
Reviewed-by: Morton Jonuschat <m.jonuschat@mojocode.de>
Tested-by: Morton Jonuschat <m.jonuschat@mojocode.de>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
typo3/sysext/backend/Classes/Utility/BackendUtility.php