[TASK] inline BEUserAuth::getCookieName 18/28418/3
authorThomas Maroschik <tmaroschik@dfau.de>
Sat, 15 Mar 2014 12:13:33 +0000 (13:13 +0100)
committerSteffen Ritter <info@rs-websystems.de>
Sat, 15 Mar 2014 16:06:00 +0000 (17:06 +0100)
During bootstrapping in index_ts.php there is a check
for an existing be_typo_user cookie which enables
TimeTracking. The simple static getter triggers the loading
and parsing of BackendUserAuthentication and
AbstractUserAuthentication which are both pretty fat classes
and have an impact upon eID calls and frontend calls.

This patch inlines the cookie name retrieval and defers thus
the loading of the fat classes.

Resolves: #56316
Releases: 6.2
Change-Id: I5ce5cf92095dcb8820fb0e548e16e38a99f4f12e
Reviewed-on: https://review.typo3.org/28418
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
Reviewed-by: Steffen Ritter
Tested-by: Steffen Ritter
typo3/sysext/cms/tslib/index_ts.php

index bd932ca..dd3e7a3 100644 (file)
@@ -42,7 +42,11 @@ define('TYPO3_MODE', 'FE');
        ->applyAdditionalConfigurationSettings();
 
 // Timetracking started
-if ($_COOKIE[\TYPO3\CMS\Core\Authentication\BackendUserAuthentication::getCookieName()]) {
+$configuredCookieName = trim($GLOBALS['TYPO3_CONF_VARS']['BE']['cookieName']);
+if (empty($configuredCookieName)) {
+       $configuredCookieName = 'be_typo_user';
+}
+if ($_COOKIE[$configuredCookieName]) {
        $TT = new \TYPO3\CMS\Core\TimeTracker\TimeTracker();
 } else {
        $TT = new \TYPO3\CMS\Core\TimeTracker\NullTimeTracker();