[TASK] Optimize invocation of cObj::checkIf 43/26943/5
authorOliver Hader <oliver@typo3.org>
Mon, 20 Jan 2014 15:52:37 +0000 (16:52 +0100)
committerMarkus Klein <klein.t3@mfc-linz.at>
Sun, 6 Jul 2014 21:09:27 +0000 (23:09 +0200)
commitafaa0560ac17e84e6a597301bf18f9e68cbdcfed
tree4b3464b8c3dd2c977277ff97690b1a22dcd03bf0
parent4250f01613b1745cb1403ae11296aef526abe191
[TASK] Optimize invocation of cObj::checkIf

The stdWrap property "if" can be used to allow output only if a
defined criterion is met. However, the checkIf() method gets
called even if the property is not set in TypoScript.

Fix this by adding a quick empty() check to all calls.
Also optimizes the code structure to exit early in case the if
does not evaluate to TRUE.

Resolves: #55173
Releases: 6.3, 6.2
Change-Id: Ie1178a5df2e98fd19b848aa2300c901c1200f555
Reviewed-on: https://review.typo3.org/26943
Reviewed-by: Simon Schaufelberger
Reviewed-by: Stefan Neufeind
Reviewed-by: Susanne Moog
Tested-by: Susanne Moog
Reviewed-by: Markus Klein
Tested-by: Markus Klein
typo3/sysext/frontend/Classes/ContentObject/CaseContentObject.php
typo3/sysext/frontend/Classes/ContentObject/ColumnsContentObject.php
typo3/sysext/frontend/Classes/ContentObject/ContentObjectArrayContentObject.php
typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php
typo3/sysext/frontend/Classes/ContentObject/HierarchicalMenuContentObject.php
typo3/sysext/frontend/Classes/ContentObject/ImageContentObject.php
typo3/sysext/frontend/Classes/ContentObject/Menu/ImageMenuContentObject.php