[BUGFIX] Parsetime: config.debug should override LocalConfiguration 63/28663/6
authorStefan Neufeind <typo3.neufeind@speedpartner.de>
Sun, 23 Mar 2014 11:36:24 +0000 (12:36 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Sun, 23 Mar 2014 13:51:27 +0000 (14:51 +0100)
Parsetime is output either if config.debug is set or if FE-debug
is activated in LocalConfiguration. Allow to explicitly override
(set to 0) the debugging in TS for cases where you want to output
page-objects like a JSON-page or so where Parsetime leads to
problems.

Change-Id: Ie5588218694219c13f136b5ac928e697ca472cfb
Resolves: #57202
Releases: 6.2, 6.1
Reviewed-on: https://review.typo3.org/28663
Reviewed-by: Markus Klein
Tested-by: Markus Klein
Reviewed-by: Stefan Neufeind
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
typo3/sysext/cms/tslib/index_ts.php

index dd3e7a3..6a5b44b 100644 (file)
@@ -242,7 +242,12 @@ $TSFE->storeSessionData();
 // Statistics
 $TYPO3_MISC['microtime_end'] = microtime(TRUE);
 $TSFE->setParseTime();
-if ($TSFE->isOutputting() && (!empty($TSFE->TYPO3_CONF_VARS['FE']['debug']) || !empty($TSFE->config['config']['debug']))) {
+if (isset($TSFE->config['config']['debug'])) {
+       $debugParseTime = (bool)$TSFE->config['config']['debug'];
+} else {
+       $debugParseTime = !empty($TSFE->TYPO3_CONF_VARS['FE']['debug']);
+}
+if ($TSFE->isOutputting() && $debugParseTime) {
        $TSFE->content .= LF . '<!-- Parsetime: ' . $TSFE->scriptParseTime . 'ms -->';
 }
 // Check JumpUrl