[TASK] Cleanup DataHandler (again) 01/54401/4
authorBenni Mack <benni@typo3.org>
Mon, 16 Oct 2017 09:01:15 +0000 (11:01 +0200)
committerSusanne Moog <susanne.moog@typo3.org>
Mon, 16 Oct 2017 10:43:29 +0000 (12:43 +0200)
commit62513dbb682cff66bcdeb43e816a50032d303719
tree529aa313dc58dfa5f94909f14c6f6826e7fa402a
parentd5e4d9dbfc844438d0977a06f9b9762e955bff27
[TASK] Cleanup DataHandler (again)

The following changes were made:

1. enableLogging is now only checked within the log methods (if no extra
CPU / DB requests were made in the if statements).

2. Introduce a getter for $GLOBALS['LANG'] instead of using the hard-coded
object (and using IF statements, although the comment on top of the
PHP class states that LanguageService MUST be initialized).

3. Simplify switch-cases / nested-if statement to a regular IF condition

4. Use Logger API instead of plain debug() calls

Resolves: #82769
Releases: master
Change-Id: Icd74057ac64ec8fc219c55b7996f766020fd5ad8
Reviewed-on: https://review.typo3.org/54401
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Susanne Moog <susanne.moog@typo3.org>
Tested-by: Susanne Moog <susanne.moog@typo3.org>
typo3/sysext/core/Classes/DataHandling/DataHandler.php