[TASK] Remove superfluous parenthesis in sysext core
authorArvid Jakobsson <arvid.jakobsson@gmail.com>
Wed, 12 Sep 2012 22:25:43 +0000 (00:25 +0200)
committerHelmut Hummel <helmut.hummel@typo3.org>
Sun, 16 Sep 2012 12:13:01 +0000 (14:13 +0200)
Change ("a" . "b") . "c" into "a" . "b" . "c" using the lex-pass tool.

Change-Id: I818d55a2f00b549fef8377f1c6766c293edd021c
Resolves: #40880
Related: #40095
Releases: 6.0
Reviewed-on: http://review.typo3.org/14565
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
Reviewed-by: Mattias Nilsson
Tested-by: Mattias Nilsson
Reviewed-by: Helmut Hummel
Tested-by: Helmut Hummel
146 files changed:
typo3/sysext/core/Classes/Authentication/AbstractUserAuthentication.php
typo3/sysext/core/Classes/Authentication/BackendUserAuthentication.php
typo3/sysext/core/Classes/Autoloader.php
typo3/sysext/core/Classes/Cache/Backend/AbstractBackend.php
typo3/sysext/core/Classes/Cache/Backend/ApcBackend.php
typo3/sysext/core/Classes/Cache/Backend/FileBackend.php
typo3/sysext/core/Classes/Cache/Backend/MemcachedBackend.php
typo3/sysext/core/Classes/Cache/Backend/PdoBackend.php
typo3/sysext/core/Classes/Cache/Backend/RedisBackend.php
typo3/sysext/core/Classes/Cache/Backend/SimpleFileBackend.php
typo3/sysext/core/Classes/Cache/Backend/TransientMemoryBackend.php
typo3/sysext/core/Classes/Cache/Backend/Typo3DatabaseBackend.php
typo3/sysext/core/Classes/Cache/Backend/WincacheBackend.php
typo3/sysext/core/Classes/Cache/Cache.php
typo3/sysext/core/Classes/Cache/CacheFactory.php
typo3/sysext/core/Classes/Cache/CacheManager.php
typo3/sysext/core/Classes/Cache/Frontend/AbstractFrontend.php
typo3/sysext/core/Classes/Cache/Frontend/PhpFrontend.php
typo3/sysext/core/Classes/Cache/Frontend/StringFrontend.php
typo3/sysext/core/Classes/Cache/Frontend/VariableFrontend.php
typo3/sysext/core/Classes/Category/CategoryRegistry.php
typo3/sysext/core/Classes/Category/Collection/CategoryCollection.php
typo3/sysext/core/Classes/Charset/CharsetConverter.php
typo3/sysext/core/Classes/Collection/AbstractRecordCollection.php
typo3/sysext/core/Classes/Collection/RecordCollectionRepository.php
typo3/sysext/core/Classes/Collection/StaticRecordCollection.php
typo3/sysext/core/Classes/Configuration/ConfigurationManager.php
typo3/sysext/core/Classes/Configuration/FlexForm/FlexFormTools.php
typo3/sysext/core/Classes/Configuration/TypoScript/ConditionMatching/AbstractConditionMatcher.php
typo3/sysext/core/Classes/Core/Bootstrap.php
typo3/sysext/core/Classes/Core/SystemEnvironmentBuilder.php
typo3/sysext/core/Classes/DataHandler/DataHandler.php
typo3/sysext/core/Classes/Database/DatabaseConnection.php
typo3/sysext/core/Classes/Database/PreparedStatement.php
typo3/sysext/core/Classes/Database/QueryGenerator.php
typo3/sysext/core/Classes/Database/QueryView.php
typo3/sysext/core/Classes/Database/ReferenceIndex.php
typo3/sysext/core/Classes/Database/RelationHandler.php
typo3/sysext/core/Classes/Database/SoftReferenceIndex.php
typo3/sysext/core/Classes/Database/SqlParser.php
typo3/sysext/core/Classes/Encoder/JavaScriptEncoder.php
typo3/sysext/core/Classes/Error/AbstractExceptionHandler.php
typo3/sysext/core/Classes/Error/DebugExceptionHandler.php
typo3/sysext/core/Classes/Error/ErrorHandler.php
typo3/sysext/core/Classes/Error/ProductionExceptionHandler.php
typo3/sysext/core/Classes/ExtDirect/ExtDirectApi.php
typo3/sysext/core/Classes/ExtDirect/ExtDirectRouter.php
typo3/sysext/core/Classes/Extension/ExtensionManager.php
typo3/sysext/core/Classes/FormProtection/AbstractFormProtection.php
typo3/sysext/core/Classes/FormProtection/BackendFormProtection.php
typo3/sysext/core/Classes/FormProtection/FormProtectionFactory.php
typo3/sysext/core/Classes/FrontendEditing/FrontendEditingController.php
typo3/sysext/core/Classes/Html/HtmlParser.php
typo3/sysext/core/Classes/Html/RteHtmlParser.php
typo3/sysext/core/Classes/Http/AjaxRequestHandler.php
typo3/sysext/core/Classes/Http/Observer/Download.php
typo3/sysext/core/Classes/Imaging/GraphicalFunctions.php
typo3/sysext/core/Classes/Integrity/DatabaseIntegrityCheck.php
typo3/sysext/core/Classes/Localization/LanguageStore.php
typo3/sysext/core/Classes/Localization/LocalizationFactory.php
typo3/sysext/core/Classes/Localization/Parser/LocallangArrayParser.php
typo3/sysext/core/Classes/Localization/Parser/LocallangXmlParser.php
typo3/sysext/core/Classes/Localization/Parser/XliffParser.php
typo3/sysext/core/Classes/Locking/Locker.php
typo3/sysext/core/Classes/Log/LogManager.php
typo3/sysext/core/Classes/Log/Logger.php
typo3/sysext/core/Classes/Log/Processor/AbstractProcessor.php
typo3/sysext/core/Classes/Log/Writer/AbstractWriter.php
typo3/sysext/core/Classes/Log/Writer/FileWriter.php
typo3/sysext/core/Classes/Mail/MboxTransport.php
typo3/sysext/core/Classes/Mail/Rfc822AddressesParser.php
typo3/sysext/core/Classes/Mail/SwiftMailerAdapter.php
typo3/sysext/core/Classes/Messaging/AbstractMessage.php
typo3/sysext/core/Classes/Messaging/AbstractStandaloneMessage.php
typo3/sysext/core/Classes/Messaging/FlashMessage.php
typo3/sysext/core/Classes/Page/PageRenderer.php
typo3/sysext/core/Classes/Registry.php
typo3/sysext/core/Classes/Resource/AbstractFile.php
typo3/sysext/core/Classes/Resource/AbstractRepository.php
typo3/sysext/core/Classes/Resource/Collection/AbstractFileCollection.php
typo3/sysext/core/Classes/Resource/Driver/AbstractDriver.php
typo3/sysext/core/Classes/Resource/Driver/DriverRegistry.php
typo3/sysext/core/Classes/Resource/Driver/LocalDriver.php
typo3/sysext/core/Classes/Resource/File.php
typo3/sysext/core/Classes/Resource/FileCollectionRepository.php
typo3/sysext/core/Classes/Resource/FileReference.php
typo3/sysext/core/Classes/Resource/FileRepository.php
typo3/sysext/core/Classes/Resource/Filter/FileExtensionFilter.php
typo3/sysext/core/Classes/Resource/Folder.php
typo3/sysext/core/Classes/Resource/Hook/FileInfoHook.php
typo3/sysext/core/Classes/Resource/ProcessedFile.php
typo3/sysext/core/Classes/Resource/ProcessedFileRepository.php
typo3/sysext/core/Classes/Resource/ResourceCompressor.php
typo3/sysext/core/Classes/Resource/ResourceFactory.php
typo3/sysext/core/Classes/Resource/ResourceStorage.php
typo3/sysext/core/Classes/Resource/Service/FileProcessingService.php
typo3/sysext/core/Classes/Resource/Service/FrontendContentAdapterService.php
typo3/sysext/core/Classes/Resource/Service/ImageProcessingService.php
typo3/sysext/core/Classes/Resource/Service/IndexerService.php
typo3/sysext/core/Classes/Resource/Service/MagicImageService.php
typo3/sysext/core/Classes/Resource/StorageRepository.php
typo3/sysext/core/Classes/TimeTracker/TimeTracker.php
typo3/sysext/core/Classes/Tree/TableConfiguration/DatabaseTreeDataProvider.php
typo3/sysext/core/Classes/Tree/TableConfiguration/TreeDataProviderFactory.php
typo3/sysext/core/Classes/TypoScript/ConfigurationForm.php
typo3/sysext/core/Classes/TypoScript/ExtendedTemplateService.php
typo3/sysext/core/Classes/TypoScript/Parser/TypoScriptParser.php
typo3/sysext/core/Classes/TypoScript/TemplateService.php
typo3/sysext/core/Classes/Utility/ArrayUtility.php
typo3/sysext/core/Classes/Utility/ClientUtility.php
typo3/sysext/core/Classes/Utility/CommandUtility.php
typo3/sysext/core/Classes/Utility/DebugUtility.php
typo3/sysext/core/Classes/Utility/DiffUtility.php
typo3/sysext/core/Classes/Utility/File/BasicFileUtility.php
typo3/sysext/core/Classes/Utility/File/ExtendedFileUtility.php
typo3/sysext/core/Classes/Utility/GeneralUtility.php
typo3/sysext/core/Classes/Utility/HttpUtility.php
typo3/sysext/core/Classes/Utility/MailUtility.php
typo3/sysext/core/Classes/Utility/MathUtility.php
typo3/sysext/core/Classes/Utility/RootlineUtility.php
typo3/sysext/core/Classes/Utility/VersionNumberUtility.php
typo3/sysext/core/Tests/Functional/Category/Collection/CategoryCollectionTest.php
typo3/sysext/core/Tests/Unit/AutoloaderTest.php
typo3/sysext/core/Tests/Unit/Cache/Backend/AbstractBackendTest.php
typo3/sysext/core/Tests/Unit/Cache/Backend/DbBackendTest.php
typo3/sysext/core/Tests/Unit/Cache/Backend/RedisBackendTest.php
typo3/sysext/core/Tests/Unit/Cache/Frontend/AbstractFrontendTest.php
typo3/sysext/core/Tests/Unit/Cache/Frontend/PhpFrontendTest.php
typo3/sysext/core/Tests/Unit/Core/SystemEnvironmentBuilderTest.php
typo3/sysext/core/Tests/Unit/DataHandler/DataHandlerTest.php
typo3/sysext/core/Tests/Unit/Database/DatabaseConnectionTest.php
typo3/sysext/core/Tests/Unit/Encoder/JavaScriptEncoderTest.php
typo3/sysext/core/Tests/Unit/Extension/ExtensionManagerTest.php
typo3/sysext/core/Tests/Unit/FormProtection/AbstractFormProtectionTest.php
typo3/sysext/core/Tests/Unit/Html/RteHtmlParserTest.php
typo3/sysext/core/Tests/Unit/Locking/LockerTest.php
typo3/sysext/core/Tests/Unit/Log/Processor/AbstractTest.php
typo3/sysext/core/Tests/Unit/Log/Writer/AbstractTest.php
typo3/sysext/core/Tests/Unit/Log/Writer/FileTest.php
typo3/sysext/core/Tests/Unit/Page/PageRendererTest.php
typo3/sysext/core/Tests/Unit/Resource/BaseTestCase.php
typo3/sysext/core/Tests/Unit/Resource/Driver/AbstractDriverTest.php
typo3/sysext/core/Tests/Unit/Utility/File/ExtendedFileUtilityTest.php
typo3/sysext/core/Tests/Unit/Utility/GeneralUtilityTest.php
typo3/sysext/core/Tests/Unit/Utility/MailUtilityTest.php
typo3/sysext/core/Tests/Unit/Utility/VersionNumberUtilityTest.php

index 5469a52..5496ad5 100644 (file)
@@ -367,7 +367,7 @@ abstract class AbstractUserAuthentication {
                        $id = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP($this->name);
                }
                // If fallback to get mode....
-               if ((!$id && $this->getFallBack) && $this->get_name) {
+               if (!$id && $this->getFallBack && $this->get_name) {
                        $id = isset($_GET[$this->get_name]) ? \TYPO3\CMS\Core\Utility\GeneralUtility::_GET($this->get_name) : '';
                        if (strlen($id) != $this->hash_length) {
                                $id = '';
@@ -385,8 +385,8 @@ abstract class AbstractUserAuthentication {
                // Internal var 'id' is set
                $this->id = $id;
                // If fallback to get mode....
-               if (($mode == 'get' && $this->getFallBack) && $this->get_name) {
-                       $this->get_URL_ID = (('&' . $this->get_name) . '=') . $id;
+               if ($mode == 'get' && $this->getFallBack && $this->get_name) {
+                       $this->get_URL_ID = '&' . $this->get_name . '=' . $id;
                }
                // Set session hashKey lock keywords from configuration; currently only 'useragent' can be used.
                $this->lockHashKeyWords = $GLOBALS['TYPO3_CONF_VARS'][$this->loginType]['lockHashKeyWords'];
@@ -395,7 +395,7 @@ abstract class AbstractUserAuthentication {
                // Set all possible headers that could ensure that the script is not cached on the client-side
                if ($this->sendNoCacheHeaders) {
                        header('Expires: 0');
-                       header(('Last-Modified: ' . gmdate('D, d M Y H:i:s')) . ' GMT');
+                       header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
                        $cacheControlHeader = 'no-cache, must-revalidate';
                        $pragmaHeader = 'no-cache';
                        // Prevent error message in IE when using a https connection
@@ -509,7 +509,7 @@ abstract class AbstractUserAuthentication {
                                $match = array();
                                $matchCnt = @preg_match($cookieDomain, \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_HOST_ONLY'), $match);
                                if ($matchCnt === FALSE) {
-                                       \TYPO3\CMS\Core\Utility\GeneralUtility::sysLog(('The regular expression for the cookie domain (' . $cookieDomain) . ') contains errors. The session is not shared across sub-domains.', 'Core', \TYPO3\CMS\Core\Utility\GeneralUtility::SYSLOG_SEVERITY_ERROR);
+                                       \TYPO3\CMS\Core\Utility\GeneralUtility::sysLog('The regular expression for the cookie domain (' . $cookieDomain . ') contains errors. The session is not shared across sub-domains.', 'Core', \TYPO3\CMS\Core\Utility\GeneralUtility::SYSLOG_SEVERITY_ERROR);
                                } elseif ($matchCnt) {
                                        $result = $match[0];
                                }
@@ -618,10 +618,10 @@ abstract class AbstractUserAuthentication {
                                \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('Active login (eg. with login form)', 'TYPO3\\CMS\\Core\\Authentication\\AbstractUserAuthentication');
                        }
                        // check referer for submitted login values
-                       if (($this->formfield_status && $loginData['uident']) && $loginData['uname']) {
+                       if ($this->formfield_status && $loginData['uident'] && $loginData['uname']) {
                                $httpHost = \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_HOST_ONLY');
                                if (!$this->getMethodEnabled && ($httpHost != $authInfo['refInfo']['host'] && !$GLOBALS['TYPO3_CONF_VARS']['SYS']['doNotCheckReferer'])) {
-                                       throw new \RuntimeException(((('TYPO3 Fatal Error: Error: This host address ("' . $httpHost) . '") and the referer host ("') . $authInfo['refInfo']['host']) . '") mismatches!<br />
+                                       throw new \RuntimeException('TYPO3 Fatal Error: Error: This host address ("' . $httpHost . '") and the referer host ("' . $authInfo['refInfo']['host'] . '") mismatches!<br />
                                                It\'s possible that the environment variable HTTP_REFERER is not passed to the script because of a proxy.<br />
                                                The site administrator can disable this check in the "All Configuration" section of the Install Tool (flag: TYPO3_CONF_VARS[SYS][doNotCheckReferer]).', 1270853930);
                                }
@@ -655,7 +655,7 @@ abstract class AbstractUserAuthentication {
                        }
                }
                // Fetch user if ...
-               if (($activeLogin || !$haveSession && $this->svConfig['setup'][$this->loginType . '_fetchUserIfNoSession']) || $this->svConfig['setup'][$this->loginType . '_alwaysFetchUser']) {
+               if ($activeLogin || !$haveSession && $this->svConfig['setup'][$this->loginType . '_fetchUserIfNoSession'] || $this->svConfig['setup'][$this->loginType . '_alwaysFetchUser']) {
                        // Use 'auth' service to find the user
                        // First found user will be used
                        $serviceChain = '';
@@ -680,7 +680,7 @@ abstract class AbstractUserAuthentication {
                                \TYPO3\CMS\Core\Utility\GeneralUtility::devLog($this->loginType . '_alwaysFetchUser option is enabled', 'TYPO3\\CMS\\Core\\Authentication\\AbstractUserAuthentication');
                        }
                        if ($this->writeDevLog && $serviceChain) {
-                               \TYPO3\CMS\Core\Utility\GeneralUtility::devLog(($subType . ' auth services called: ') . $serviceChain, 'TYPO3\\CMS\\Core\\Authentication\\AbstractUserAuthentication');
+                               \TYPO3\CMS\Core\Utility\GeneralUtility::devLog($subType . ' auth services called: ' . $serviceChain, 'TYPO3\\CMS\\Core\\Authentication\\AbstractUserAuthentication');
                        }
                        if ($this->writeDevLog && !count($tempuserArr)) {
                                \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('No user found by services', 'TYPO3\\CMS\\Core\\Authentication\\AbstractUserAuthentication');
@@ -738,7 +738,7 @@ abstract class AbstractUserAuthentication {
                                }
                                unset($serviceObj);
                                if ($this->writeDevLog && $serviceChain) {
-                                       \TYPO3\CMS\Core\Utility\GeneralUtility::devLog(($subType . ' auth services called: ') . $serviceChain, 'TYPO3\\CMS\\Core\\Authentication\\AbstractUserAuthentication');
+                                       \TYPO3\CMS\Core\Utility\GeneralUtility::devLog($subType . ' auth services called: ' . $serviceChain, 'TYPO3\\CMS\\Core\\Authentication\\AbstractUserAuthentication');
                                }
                                if ($authenticated) {
                                        // Leave foreach() because a user is authenticated
@@ -761,10 +761,10 @@ abstract class AbstractUserAuthentication {
                                $this->writelog(255, 1, 0, 1, 'User %s logged in from %s (%s)', array($tempuser[$this->username_column], \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('REMOTE_ADDR'), \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('REMOTE_HOST')), '', '', '', -1, '', $tempuser['uid']);
                        }
                        if ($this->writeDevLog && $activeLogin) {
-                               \TYPO3\CMS\Core\Utility\GeneralUtility::devLog(((((('User ' . $tempuser[$this->username_column]) . ' logged in from ') . \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('REMOTE_ADDR')) . ' (') . \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('REMOTE_HOST')) . ')', 'TYPO3\\CMS\\Core\\Authentication\\AbstractUserAuthentication', -1);
+                               \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('User ' . $tempuser[$this->username_column] . ' logged in from ' . \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('REMOTE_ADDR') . ' (' . \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('REMOTE_HOST') . ')', 'TYPO3\\CMS\\Core\\Authentication\\AbstractUserAuthentication', -1);
                        }
                        if ($this->writeDevLog && !$activeLogin) {
-                               \TYPO3\CMS\Core\Utility\GeneralUtility::devLog(((((('User ' . $tempuser[$this->username_column]) . ' authenticated from ') . \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('REMOTE_ADDR')) . ' (') . \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('REMOTE_HOST')) . ')', 'TYPO3\\CMS\\Core\\Authentication\\AbstractUserAuthentication', -1);
+                               \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('User ' . $tempuser[$this->username_column] . ' authenticated from ' . \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('REMOTE_ADDR') . ' (' . \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('REMOTE_HOST') . ')', 'TYPO3\\CMS\\Core\\Authentication\\AbstractUserAuthentication', -1);
                        }
                        if ($GLOBALS['TYPO3_CONF_VARS']['BE']['lockSSL'] == 3 && $this->user_table == 'be_users') {
                                $requestStr = substr(\TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_REQUEST_SCRIPT'), strlen(\TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_SITE_URL') . TYPO3_mainDir));
@@ -777,12 +777,12 @@ abstract class AbstractUserAuthentication {
                                                // strip port from server
                                                $server = str_replace($sslPortSuffix, '', $server);
                                        }
-                                       \TYPO3\CMS\Core\Utility\HttpUtility::redirect((((('http://' . $server) . '/') . $address) . TYPO3_mainDir) . $backendScript);
+                                       \TYPO3\CMS\Core\Utility\HttpUtility::redirect('http://' . $server . '/' . $address . TYPO3_mainDir . $backendScript);
                                }
                        }
                } elseif ($activeLogin || count($tempuserArr)) {
                        $this->loginFailure = TRUE;
-                       if (($this->writeDevLog && !count($tempuserArr)) && $activeLogin) {
+                       if ($this->writeDevLog && !count($tempuserArr) && $activeLogin) {
                                \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('Login failed: ' . \TYPO3\CMS\Core\Utility\GeneralUtility::arrayToLogString($loginData), 'TYPO3\\CMS\\Core\\Authentication\\AbstractUserAuthentication', 2);
                        }
                        if ($this->writeDevLog && count($tempuserArr)) {
@@ -824,14 +824,14 @@ abstract class AbstractUserAuthentication {
                        \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('Create session ses_id = ' . $this->id, 'TYPO3\\CMS\\Core\\Authentication\\AbstractUserAuthentication');
                }
                // Delete session entry first
-               $GLOBALS['TYPO3_DB']->exec_DELETEquery($this->session_table, (('ses_id = ' . $GLOBALS['TYPO3_DB']->fullQuoteStr($this->id, $this->session_table)) . '
-                                               AND ses_name = ') . $GLOBALS['TYPO3_DB']->fullQuoteStr($this->name, $this->session_table));
+               $GLOBALS['TYPO3_DB']->exec_DELETEquery($this->session_table, 'ses_id = ' . $GLOBALS['TYPO3_DB']->fullQuoteStr($this->id, $this->session_table) . '
+                                               AND ses_name = ' . $GLOBALS['TYPO3_DB']->fullQuoteStr($this->name, $this->session_table));
                // Re-create session entry
                $insertFields = $this->getNewSessionRecord($tempuser);
                $GLOBALS['TYPO3_DB']->exec_INSERTquery($this->session_table, $insertFields);
                // Updating lastLogin_column carrying information about last login.
                if ($this->lastLogin_column) {
-                       $GLOBALS['TYPO3_DB']->exec_UPDATEquery($this->user_table, ($this->userid_column . '=') . $GLOBALS['TYPO3_DB']->fullQuoteStr($tempuser[$this->userid_column], $this->user_table), array($this->lastLogin_column => $GLOBALS['EXEC_TIME']));
+                       $GLOBALS['TYPO3_DB']->exec_UPDATEquery($this->user_table, $this->userid_column . '=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($tempuser[$this->userid_column], $this->user_table), array($this->lastLogin_column => $GLOBALS['EXEC_TIME']));
                }
        }
 
@@ -887,8 +887,8 @@ abstract class AbstractUserAuthentication {
                        // Option later on: We could check that last update was at least x seconds ago in order not to update twice in a row if one script redirects to another...
                        if ($timeout > 0 && $GLOBALS['EXEC_TIME'] < $user['ses_tstamp'] + $timeout) {
                                if (!$skipSessionUpdate) {
-                                       $GLOBALS['TYPO3_DB']->exec_UPDATEquery($this->session_table, (('ses_id=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($this->id, $this->session_table)) . '
-                                                                                               AND ses_name=') . $GLOBALS['TYPO3_DB']->fullQuoteStr($this->name, $this->session_table), array('ses_tstamp' => $GLOBALS['EXEC_TIME']));
+                                       $GLOBALS['TYPO3_DB']->exec_UPDATEquery($this->session_table, 'ses_id=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($this->id, $this->session_table) . '
+                                                                                               AND ses_name=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($this->name, $this->session_table), array('ses_tstamp' => $GLOBALS['EXEC_TIME']));
                                        // Make sure that the timestamp is also updated in the array
                                        $user['ses_tstamp'] = $GLOBALS['EXEC_TIME'];
                                }
@@ -925,8 +925,8 @@ abstract class AbstractUserAuthentication {
                                }
                        }
                }
-               $GLOBALS['TYPO3_DB']->exec_DELETEquery($this->session_table, (('ses_id = ' . $GLOBALS['TYPO3_DB']->fullQuoteStr($this->id, $this->session_table)) . '
-                                               AND ses_name = ') . $GLOBALS['TYPO3_DB']->fullQuoteStr($this->name, $this->session_table));
+               $GLOBALS['TYPO3_DB']->exec_DELETEquery($this->session_table, 'ses_id = ' . $GLOBALS['TYPO3_DB']->fullQuoteStr($this->id, $this->session_table) . '
+                                               AND ses_name = ' . $GLOBALS['TYPO3_DB']->fullQuoteStr($this->name, $this->session_table));
                $this->user = '';
                // Hook for post-processing the logoff() method, requested and implemented by andreas.otto@dkd.de:
                if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauth.php']['logoff_post_processing'])) {
@@ -977,11 +977,11 @@ abstract class AbstractUserAuthentication {
                        // If on the flash client, the veri code is valid, then the user session is fetched
                        // from the DB without the hashLock clause
                        if (\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('vC') == $this->veriCode()) {
-                               $statement = $GLOBALS['TYPO3_DB']->prepare_SELECTquery('*', ($this->session_table . ',') . $this->user_table, ((((((((((($this->session_table . '.ses_id = :ses_id
-                                               AND ') . $this->session_table) . '.ses_name = :ses_name
-                                               AND ') . $this->session_table) . '.ses_userid = ') . $this->user_table) . '.') . $this->userid_column) . '
-                                               ') . $ipLockClause['where']) . '
-                                               ') . $this->user_where_clause());
+                               $statement = $GLOBALS['TYPO3_DB']->prepare_SELECTquery('*', $this->session_table . ',' . $this->user_table, $this->session_table . '.ses_id = :ses_id
+                                               AND ' . $this->session_table . '.ses_name = :ses_name
+                                               AND ' . $this->session_table . '.ses_userid = ' . $this->user_table . '.' . $this->userid_column . '
+                                               ' . $ipLockClause['where'] . '
+                                               ' . $this->user_where_clause());
                                $statement->bindValues(array(
                                        ':ses_id' => $this->id,
                                        ':ses_name' => $this->name
@@ -989,12 +989,12 @@ abstract class AbstractUserAuthentication {
                                $statement->bindValues($ipLockClause['parameters']);
                        }
                } else {
-                       $statement = $GLOBALS['TYPO3_DB']->prepare_SELECTquery('*', ($this->session_table . ',') . $this->user_table, ((((((((((((($this->session_table . '.ses_id = :ses_id
-                                       AND ') . $this->session_table) . '.ses_name = :ses_name
-                                       AND ') . $this->session_table) . '.ses_userid = ') . $this->user_table) . '.') . $this->userid_column) . '
-                                       ') . $ipLockClause['where']) . '
-                                       ') . $this->hashLockClause()) . '
-                                       ') . $this->user_where_clause());
+                       $statement = $GLOBALS['TYPO3_DB']->prepare_SELECTquery('*', $this->session_table . ',' . $this->user_table, $this->session_table . '.ses_id = :ses_id
+                                       AND ' . $this->session_table . '.ses_name = :ses_name
+                                       AND ' . $this->session_table . '.ses_userid = ' . $this->user_table . '.' . $this->userid_column . '
+                                       ' . $ipLockClause['where'] . '
+                                       ' . $this->hashLockClause() . '
+                                       ' . $this->user_where_clause());
                        $statement->bindValues(array(
                                ':ses_id' => $this->id,
                                ':ses_name' => $this->name
@@ -1011,7 +1011,7 @@ abstract class AbstractUserAuthentication {
         * @access private
         */
        protected function user_where_clause() {
-               return (((($this->enablecolumns['rootLevel'] ? ('AND ' . $this->user_table) . '.pid=0 ' : '') . ($this->enablecolumns['disabled'] ? (((' AND ' . $this->user_table) . '.') . $this->enablecolumns['disabled']) . '=0' : '')) . ($this->enablecolumns['deleted'] ? (((' AND ' . $this->user_table) . '.') . $this->enablecolumns['deleted']) . '=0' : '')) . ($this->enablecolumns['starttime'] ? (((((' AND (' . $this->user_table) . '.') . $this->enablecolumns['starttime']) . '<=') . $GLOBALS['EXEC_TIME']) . ')' : '')) . ($this->enablecolumns['endtime'] ? (((((((((' AND (' . $this->user_table) . '.') . $this->enablecolumns['endtime']) . '=0 OR ') . $this->user_table) . '.') . $this->enablecolumns['endtime']) . '>') . $GLOBALS['EXEC_TIME']) . ')' : '');
+               return ($this->enablecolumns['rootLevel'] ? 'AND ' . $this->user_table . '.pid=0 ' : '') . ($this->enablecolumns['disabled'] ? ' AND ' . $this->user_table . '.' . $this->enablecolumns['disabled'] . '=0' : '') . ($this->enablecolumns['deleted'] ? ' AND ' . $this->user_table . '.' . $this->enablecolumns['deleted'] . '=0' : '') . ($this->enablecolumns['starttime'] ? ' AND (' . $this->user_table . '.' . $this->enablecolumns['starttime'] . '<=' . $GLOBALS['EXEC_TIME'] . ')' : '') . ($this->enablecolumns['endtime'] ? ' AND (' . $this->user_table . '.' . $this->enablecolumns['endtime'] . '=0 OR ' . $this->user_table . '.' . $this->enablecolumns['endtime'] . '>' . $GLOBALS['EXEC_TIME'] . ')' : '');
        }
 
        /**
@@ -1026,9 +1026,9 @@ abstract class AbstractUserAuthentication {
                        'parameters' => array()
                );
                if ($this->lockIP) {
-                       $statementClause['where'] = ((('AND (
-                               ' . $this->session_table) . '.ses_iplock = :ses_iplock
-                               OR ') . $this->session_table) . '.ses_iplock=\'[DISABLED]\'
+                       $statementClause['where'] = 'AND (
+                               ' . $this->session_table . '.ses_iplock = :ses_iplock
+                               OR ' . $this->session_table . '.ses_iplock=\'[DISABLED]\'
                                )';
                        $statementClause['parameters'] = array(
                                ':ses_iplock' => $this->ipLockClause_remoteIPNumber($this->lockIP)
@@ -1076,7 +1076,7 @@ abstract class AbstractUserAuthentication {
         * @access private
         */
        protected function hashLockClause() {
-               $wherePart = (('AND ' . $this->session_table) . '.ses_hashlock=') . intval($this->hashLockClause_getHashInt());
+               $wherePart = 'AND ' . $this->session_table . '.ses_hashlock=' . intval($this->hashLockClause_getHashInt());
                return $wherePart;
        }
 
@@ -1114,9 +1114,9 @@ abstract class AbstractUserAuthentication {
                                $variable = $this->uc;
                        }
                        if ($this->writeDevLog) {
-                               \TYPO3\CMS\Core\Utility\GeneralUtility::devLog((('writeUC: ' . $this->userid_column) . '=') . intval($this->user[$this->userid_column]), 'TYPO3\\CMS\\Core\\Authentication\\AbstractUserAuthentication');
+                               \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('writeUC: ' . $this->userid_column . '=' . intval($this->user[$this->userid_column]), 'TYPO3\\CMS\\Core\\Authentication\\AbstractUserAuthentication');
                        }
-                       $GLOBALS['TYPO3_DB']->exec_UPDATEquery($this->user_table, ($this->userid_column . '=') . intval($this->user[$this->userid_column]), array('uc' => serialize($variable)));
+                       $GLOBALS['TYPO3_DB']->exec_UPDATEquery($this->user_table, $this->userid_column . '=' . intval($this->user[$this->userid_column]), array('uc' => serialize($variable)));
                }
        }
 
@@ -1300,7 +1300,7 @@ abstract class AbstractUserAuthentication {
                $authInfo['db_user']['usergroup_column'] = $this->usergroup_column;
                $authInfo['db_user']['enable_clause'] = $this->user_where_clause();
                $authInfo['db_user']['checkPidList'] = $this->checkPid ? $this->checkPid_value : '';
-               $authInfo['db_user']['check_pid_clause'] = $this->checkPid ? (' AND pid IN (' . $GLOBALS['TYPO3_DB']->cleanIntList($authInfo['db_user']['checkPidList'])) . ')' : '';
+               $authInfo['db_user']['check_pid_clause'] = $this->checkPid ? ' AND pid IN (' . $GLOBALS['TYPO3_DB']->cleanIntList($authInfo['db_user']['checkPidList']) . ')' : '';
                $authInfo['db_groups']['table'] = $this->usergroup_table;
                return $authInfo;
        }
@@ -1326,13 +1326,13 @@ abstract class AbstractUserAuthentication {
                                session_start();
                                if ($_SESSION['login_challenge'] !== $loginData['chalvalue']) {
                                        if ($this->writeDevLog) {
-                                               \TYPO3\CMS\Core\Utility\GeneralUtility::devLog(((('PHP Session stored challenge "' . $_SESSION['login_challenge']) . '" and submitted challenge "') . $loginData['chalvalue']) . '" did not match, so authentication failed!', 'TYPO3\\CMS\\Core\\Authentication\\AbstractUserAuthentication', 2);
+                                               \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('PHP Session stored challenge "' . $_SESSION['login_challenge'] . '" and submitted challenge "' . $loginData['chalvalue'] . '" did not match, so authentication failed!', 'TYPO3\\CMS\\Core\\Authentication\\AbstractUserAuthentication', 2);
                                        }
                                        $this->logoff();
                                        return FALSE;
                                }
                        }
-                       if ((string) $loginData[('uident_' . $passwordCompareStrategy)] === (string) md5((((($user[$this->username_column] . ':') . $user[$this->userident_column]) . ':') . $loginData['chalvalue']))) {
+                       if ((string) $loginData[('uident_' . $passwordCompareStrategy)] === (string) md5(($user[$this->username_column] . ':' . $user[$this->userident_column] . ':' . $loginData['chalvalue']))) {
                                $OK = TRUE;
                        }
                        break;
@@ -1354,7 +1354,7 @@ abstract class AbstractUserAuthentication {
         * @todo Define visibility
         */
        public function gc() {
-               $GLOBALS['TYPO3_DB']->exec_DELETEquery($this->session_table, (('ses_tstamp < ' . intval(($GLOBALS['EXEC_TIME'] - $this->gc_time))) . ' AND ses_name = ') . $GLOBALS['TYPO3_DB']->fullQuoteStr($this->name, $this->session_table));
+               $GLOBALS['TYPO3_DB']->exec_DELETEquery($this->session_table, 'ses_tstamp < ' . intval(($GLOBALS['EXEC_TIME'] - $this->gc_time)) . ' AND ses_name = ' . $GLOBALS['TYPO3_DB']->fullQuoteStr($this->name, $this->session_table));
        }
 
        /**
@@ -1432,7 +1432,7 @@ abstract class AbstractUserAuthentication {
         */
        public function getRawUserByUid($uid) {
                $user = FALSE;
-               $dbres = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', $this->user_table, (('uid=' . intval($uid)) . ' ') . $this->user_where_clause());
+               $dbres = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', $this->user_table, 'uid=' . intval($uid) . ' ' . $this->user_where_clause());
                if ($dbres) {
                        $user = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($dbres);
                        $GLOBALS['TYPO3_DB']->sql_free_result($dbres);
@@ -1451,7 +1451,7 @@ abstract class AbstractUserAuthentication {
         */
        public function getRawUserByName($name) {
                $user = FALSE;
-               $dbres = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', $this->user_table, (('username=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($name, $this->user_table)) . ' ') . $this->user_where_clause());
+               $dbres = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', $this->user_table, 'username=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($name, $this->user_table) . ' ' . $this->user_where_clause());
                if ($dbres) {
                        $user = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($dbres);
                        $GLOBALS['TYPO3_DB']->sql_free_result($dbres);
@@ -1476,10 +1476,10 @@ abstract class AbstractUserAuthentication {
         */
        public function fetchUserRecord($dbUser, $username, $extraWhere = '') {
                $user = FALSE;
-               $usernameClause = $username ? ($dbUser['username_column'] . '=') . $GLOBALS['TYPO3_DB']->fullQuoteStr($username, $dbUser['table']) : '';
+               $usernameClause = $username ? $dbUser['username_column'] . '=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($username, $dbUser['table']) : '';
                if ($username || $extraWhere) {
                        // Look up the user by the username and/or extraWhere:
-                       $dbres = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', $dbUser['table'], (($usernameClause . $dbUser['check_pid_clause']) . $dbUser['enable_clause']) . $extraWhere);
+                       $dbres = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', $dbUser['table'], $usernameClause . $dbUser['check_pid_clause'] . $dbUser['enable_clause'] . $extraWhere);
                        if ($dbres) {
                                $user = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($dbres);
                                $GLOBALS['TYPO3_DB']->sql_free_result($dbres);
index 9e04a4d..f1c52f1 100644 (file)
@@ -453,17 +453,17 @@ class BackendUserAuthentication extends \TYPO3\CMS\Core\Authentication\AbstractU
        public function modAccess($conf, $exitOnError) {
                if (!\TYPO3\CMS\Backend\Utility\BackendUtility::isModuleSetInTBE_MODULES($conf['name'])) {
                        if ($exitOnError) {
-                               throw new \RuntimeException(('Fatal Error: This module "' . $conf['name']) . '" is not enabled in TBE_MODULES', 1294586446);
+                               throw new \RuntimeException('Fatal Error: This module "' . $conf['name'] . '" is not enabled in TBE_MODULES', 1294586446);
                        }
                        return FALSE;
                }
                // Workspaces check:
                if (\TYPO3\CMS\Core\Extension\ExtensionManager::isLoaded('workspaces') && $conf['workspaces']) {
-                       if (($this->workspace === 0 && \TYPO3\CMS\Core\Utility\GeneralUtility::inList($conf['workspaces'], 'online') || $this->workspace === -1 && \TYPO3\CMS\Core\Utility\GeneralUtility::inList($conf['workspaces'], 'offline')) || $this->workspace > 0 && \TYPO3\CMS\Core\Utility\GeneralUtility::inList($conf['workspaces'], 'custom')) {
+                       if ($this->workspace === 0 && \TYPO3\CMS\Core\Utility\GeneralUtility::inList($conf['workspaces'], 'online') || $this->workspace === -1 && \TYPO3\CMS\Core\Utility\GeneralUtility::inList($conf['workspaces'], 'offline') || $this->workspace > 0 && \TYPO3\CMS\Core\Utility\GeneralUtility::inList($conf['workspaces'], 'custom')) {
 
                        } else {
                                if ($exitOnError) {
-                                       throw new \RuntimeException(('Workspace Error: This module "' . $conf['name']) . '" is not available under the current workspace', 1294586447);
+                                       throw new \RuntimeException('Workspace Error: This module "' . $conf['name'] . '" is not available under the current workspace', 1294586447);
                                }
                                return FALSE;
                        }
@@ -505,11 +505,11 @@ class BackendUserAuthentication extends \TYPO3\CMS\Core\Authentication\AbstractU
                        }
                        $perms = intval($perms);
                        // Make sure it's integer.
-                       $str = (((((((((((' (' . '(pages.perms_everybody & ') . $perms) . ' = ') . $perms) . ')') . ' OR (pages.perms_userid = ') . $this->user['uid']) . ' AND pages.perms_user & ') . $perms) . ' = ') . $perms) . ')';
+                       $str = ' (' . '(pages.perms_everybody & ' . $perms . ' = ' . $perms . ')' . ' OR (pages.perms_userid = ' . $this->user['uid'] . ' AND pages.perms_user & ' . $perms . ' = ' . $perms . ')';
                        // User
                        if ($this->groupList) {
                                // Group (if any is set)
-                               $str .= (((((' OR (pages.perms_groupid in (' . $this->groupList) . ') AND pages.perms_group & ') . $perms) . ' = ') . $perms) . ')';
+                               $str .= ' OR (pages.perms_groupid in (' . $this->groupList . ') AND pages.perms_group & ' . $perms . ' = ' . $perms . ')';
                        }
                        $str .= ')';
                        // ****************
@@ -542,7 +542,7 @@ class BackendUserAuthentication extends \TYPO3\CMS\Core\Authentication\AbstractU
                        return 31;
                }
                $out = 0;
-               if (((((isset($row['perms_userid']) && isset($row['perms_user'])) && isset($row['perms_groupid'])) && isset($row['perms_group'])) && isset($row['perms_everybody'])) && isset($this->groupList)) {
+               if (isset($row['perms_userid']) && isset($row['perms_user']) && isset($row['perms_groupid']) && isset($row['perms_group']) && isset($row['perms_everybody']) && isset($this->groupList)) {
                        if ($this->user['uid'] == $row['perms_userid']) {
                                $out |= $row['perms_user'];
                        }
@@ -639,7 +639,7 @@ class BackendUserAuthentication extends \TYPO3\CMS\Core\Authentication\AbstractU
                        return FALSE;
                }
                // Initialize:
-               $testValue = ((($table . ':') . $field) . ':') . $value;
+               $testValue = $table . ':' . $field . ':' . $value;
                $out = TRUE;
                // Checking value:
                switch ((string) $authMode) {
@@ -775,24 +775,24 @@ class BackendUserAuthentication extends \TYPO3\CMS\Core\Authentication\AbstractU
                                        if (!$this->checkLanguageAccess($idOrRow[$GLOBALS['TCA'][$table]['ctrl']['languageField']])) {
                                                $this->errorMsg = 'ERROR: Language was not allowed.';
                                                return FALSE;
-                                       } elseif (($checkFullLanguageAccess && $idOrRow[$GLOBALS['TCA'][$table]['ctrl']['languageField']] == 0) && !$this->checkFullLanguagesAccess($table, $idOrRow)) {
+                                       } elseif ($checkFullLanguageAccess && $idOrRow[$GLOBALS['TCA'][$table]['ctrl']['languageField']] == 0 && !$this->checkFullLanguagesAccess($table, $idOrRow)) {
                                                $this->errorMsg = 'ERROR: Related/affected language was not allowed.';
                                                return FALSE;
                                        }
                                } else {
-                                       $this->errorMsg = ('ERROR: The "languageField" field named "' . $GLOBALS['TCA'][$table]['ctrl']['languageField']) . '" was not found in testing record!';
+                                       $this->errorMsg = 'ERROR: The "languageField" field named "' . $GLOBALS['TCA'][$table]['ctrl']['languageField'] . '" was not found in testing record!';
                                        return FALSE;
                                }
-                       } elseif ((isset($GLOBALS['TCA'][$table]['ctrl']['transForeignTable']) && $checkFullLanguageAccess) && !$this->checkFullLanguagesAccess($table, $idOrRow)) {
+                       } elseif (isset($GLOBALS['TCA'][$table]['ctrl']['transForeignTable']) && $checkFullLanguageAccess && !$this->checkFullLanguagesAccess($table, $idOrRow)) {
                                return FALSE;
                        }
                        // Checking authMode fields:
                        if (is_array($GLOBALS['TCA'][$table]['columns'])) {
                                foreach ($GLOBALS['TCA'][$table]['columns'] as $fieldName => $fieldValue) {
                                        if (isset($idOrRow[$fieldName])) {
-                                               if (($fieldValue['config']['type'] == 'select' && $fieldValue['config']['authMode']) && !strcmp($fieldValue['config']['authMode_enforce'], 'strict')) {
+                                               if ($fieldValue['config']['type'] == 'select' && $fieldValue['config']['authMode'] && !strcmp($fieldValue['config']['authMode_enforce'], 'strict')) {
                                                        if (!$this->checkAuthMode($table, $fieldName, $idOrRow[$fieldName], $fieldValue['config']['authMode'])) {
-                                                               $this->errorMsg = ((((('ERROR: authMode "' . $fieldValue['config']['authMode']) . '" failed for field "') . $fieldName) . '" with value "') . $idOrRow[$fieldName]) . '" evaluated';
+                                                               $this->errorMsg = 'ERROR: authMode "' . $fieldValue['config']['authMode'] . '" failed for field "' . $fieldName . '" with value "' . $idOrRow[$fieldName] . '" evaluated';
                                                                return FALSE;
                                                        }
                                                }
@@ -807,7 +807,7 @@ class BackendUserAuthentication extends \TYPO3\CMS\Core\Authentication\AbstractU
                                                return FALSE;
                                        }
                                } else {
-                                       $this->errorMsg = ('ERROR: The "editLock" field named "' . $GLOBALS['TCA'][$table]['ctrl']['editlock']) . '" was not found in testing record!';
+                                       $this->errorMsg = 'ERROR: The "editLock" field named "' . $GLOBALS['TCA'][$table]['ctrl']['editlock'] . '" was not found in testing record!';
                                        return FALSE;
                                }
                        }
@@ -968,7 +968,7 @@ class BackendUserAuthentication extends \TYPO3\CMS\Core\Authentication\AbstractU
         */
        public function workspaceAllowLiveRecordsInPID($pid, $table) {
                // Always for Live workspace AND if live-edit is enabled and tables are completely without versioning it is ok as well.
-               if (($this->workspace === 0 || $this->workspaceRec['live_edit'] && !$GLOBALS['TCA'][$table]['ctrl']['versioningWS']) || $GLOBALS['TCA'][$table]['ctrl']['versioningWS_alwaysAllowLiveEdit']) {
+               if ($this->workspace === 0 || $this->workspaceRec['live_edit'] && !$GLOBALS['TCA'][$table]['ctrl']['versioningWS'] || $GLOBALS['TCA'][$table]['ctrl']['versioningWS_alwaysAllowLiveEdit']) {
                        // OK to create for this table.
                        return 2;
                } else {
@@ -1012,7 +1012,7 @@ class BackendUserAuthentication extends \TYPO3\CMS\Core\Authentication\AbstractU
                // Auto-creation of version: In offline workspace, test if versioning is
                // enabled and look for workspace version of input record.
                // If there is no versionized record found we will create one and save to that.
-               if (((($this->workspace !== 0 && !$this->workspaceRec['disable_autocreate']) && $GLOBALS['TCA'][$table]['ctrl']['versioningWS']) && $recpid >= 0) && !\TYPO3\CMS\Backend\Utility\BackendUtility::getWorkspaceVersionOfRecord($this->workspace, $table, $id, 'uid')) {
+               if ($this->workspace !== 0 && !$this->workspaceRec['disable_autocreate'] && $GLOBALS['TCA'][$table]['ctrl']['versioningWS'] && $recpid >= 0 && !\TYPO3\CMS\Backend\Utility\BackendUtility::getWorkspaceVersionOfRecord($this->workspace, $table, $id, 'uid')) {
                        // There must be no existing version of this record in workspace.
                        return TRUE;
                } elseif ($this->workspaceRec['disable_autocreate']) {
@@ -1040,7 +1040,7 @@ class BackendUserAuthentication extends \TYPO3\CMS\Core\Authentication\AbstractU
                        $stat = $this->checkWorkspaceCurrent();
                        // Check if custom staging is activated
                        $workspaceRec = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecord('sys_workspace', $stat['uid']);
-                       if (($workspaceRec['custom_stages'] > 0 && $stage !== 0) && $stage !== -10) {
+                       if ($workspaceRec['custom_stages'] > 0 && $stage !== 0 && $stage !== -10) {
                                // Get custom stage record
                                $workspaceStageRec = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecord('sys_workspace_stage', $stage);
                                // Check if the user is responsible for the current stage
@@ -1061,7 +1061,7 @@ class BackendUserAuthentication extends \TYPO3\CMS\Core\Authentication\AbstractU
                                }
                        } else {
                                $memberStageLimit = $this->workspaceRec['review_stage_edit'] ? 1 : 0;
-                               if (($stage <= $memberStageLimit && $stat['_ACCESS'] === 'member' || $stage <= 1 && $stat['_ACCESS'] === 'reviewer') || $stat['_ACCESS'] === 'owner') {
+                               if ($stage <= $memberStageLimit && $stat['_ACCESS'] === 'member' || $stage <= 1 && $stat['_ACCESS'] === 'reviewer' || $stat['_ACCESS'] === 'owner') {
                                        return TRUE;
                                }
                        }
@@ -1311,10 +1311,10 @@ class BackendUserAuthentication extends \TYPO3\CMS\Core\Authentication\AbstractU
                                        admPanel.enable.all = 1
                                ';
                                if (\TYPO3\CMS\Core\Extension\ExtensionManager::isLoaded('sys_note')) {
-                                       $this->TSdataArray[] = ((('
+                                       $this->TSdataArray[] = '
                                                        // Setting defaults for sys_note author / email...
-                                               TCAdefaults.sys_note.author = ' . $this->user['realName']) . '
-                                               TCAdefaults.sys_note.email = ') . $this->user['email']) . '
+                                               TCAdefaults.sys_note.author = ' . $this->user['realName'] . '
+                                               TCAdefaults.sys_note.email = ' . $this->user['email'] . '
                                        ';
                                }
                        }
@@ -1332,7 +1332,7 @@ class BackendUserAuthentication extends \TYPO3\CMS\Core\Authentication\AbstractU
                        // Check include lines.
                        $this->TSdataArray = \TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser::checkIncludeLines_array($this->TSdataArray);
                        // Imploding with "[global]" will make sure that non-ended confinements with braces are ignored.
-                       $this->userTS_text = implode((LF . '[GLOBAL]') . LF, $this->TSdataArray);
+                       $this->userTS_text = implode(LF . '[GLOBAL]' . LF, $this->TSdataArray);
                        if ($GLOBALS['TYPO3_CONF_VARS']['BE']['TSconfigConditions'] && !$this->userTS_dontGetCached) {
                                // Perform TS-Config parsing with condition matching
                                $parseObj = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Configuration\\TsConfigParser');
@@ -1364,7 +1364,7 @@ class BackendUserAuthentication extends \TYPO3\CMS\Core\Authentication\AbstractU
                        // The lists are cleaned for duplicates
                        $this->groupData['webmounts'] = \TYPO3\CMS\Core\Utility\GeneralUtility::uniqueList($this->dataLists['webmount_list']);
                        $this->groupData['pagetypes_select'] = \TYPO3\CMS\Core\Utility\GeneralUtility::uniqueList($this->dataLists['pagetypes_select']);
-                       $this->groupData['tables_select'] = \TYPO3\CMS\Core\Utility\GeneralUtility::uniqueList(($this->dataLists['tables_modify'] . ',') . $this->dataLists['tables_select']);
+                       $this->groupData['tables_select'] = \TYPO3\CMS\Core\Utility\GeneralUtility::uniqueList($this->dataLists['tables_modify'] . ',' . $this->dataLists['tables_select']);
                        $this->groupData['tables_modify'] = \TYPO3\CMS\Core\Utility\GeneralUtility::uniqueList($this->dataLists['tables_modify']);
                        $this->groupData['non_exclude_fields'] = \TYPO3\CMS\Core\Utility\GeneralUtility::uniqueList($this->dataLists['non_exclude_fields']);
                        $this->groupData['explicit_allowdeny'] = \TYPO3\CMS\Core\Utility\GeneralUtility::uniqueList($this->dataLists['explicit_allowdeny']);
@@ -1383,7 +1383,7 @@ class BackendUserAuthentication extends \TYPO3\CMS\Core\Authentication\AbstractU
                                $webmounts = explode(',', $this->groupData['webmounts']);
                                // Explode mounts
                                // Selecting all webmounts with permission clause for reading
-                               $MProws = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('uid', 'pages', (('deleted=0 AND uid IN (' . $this->groupData['webmounts']) . ') AND ') . $this->getPagePermsClause(1), '', '', '', 'uid');
+                               $MProws = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('uid', 'pages', 'deleted=0 AND uid IN (' . $this->groupData['webmounts'] . ') AND ' . $this->getPagePermsClause(1), '', '', '', 'uid');
                                foreach ($webmounts as $idx => $mountPointUid) {
                                        // If the mount ID is NOT found among selected pages, unset it:
                                        if ($mountPointUid > 0 && !isset($MProws[$mountPointUid])) {
@@ -1410,8 +1410,8 @@ class BackendUserAuthentication extends \TYPO3\CMS\Core\Authentication\AbstractU
         */
        public function fetchGroups($grList, $idList = '') {
                // Fetching records of the groups in $grList (which are not blocked by lockedToDomain either):
-               $lockToDomain_SQL = (' AND (lockToDomain=\'\' OR lockToDomain IS NULL OR lockToDomain=\'' . \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('HTTP_HOST')) . '\')';
-               $whereSQL = (('deleted=0 AND hidden=0 AND pid=0 AND uid IN (' . $grList) . ')') . $lockToDomain_SQL;
+               $lockToDomain_SQL = ' AND (lockToDomain=\'\' OR lockToDomain IS NULL OR lockToDomain=\'' . \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('HTTP_HOST') . '\')';
+               $whereSQL = 'deleted=0 AND hidden=0 AND pid=0 AND uid IN (' . $grList . ')' . $lockToDomain_SQL;
                // Hook for manipulation of the WHERE sql sentence which controls which BE-groups are included
                if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauthgroup.php']['fetchGroupQuery'])) {
                        foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauthgroup.php']['fetchGroupQuery'] as $classRef) {
@@ -1440,12 +1440,12 @@ class BackendUserAuthentication extends \TYPO3\CMS\Core\Authentication\AbstractU
                                        // Make integer list
                                        $theList = implode(',', \TYPO3\CMS\Core\Utility\GeneralUtility::intExplode(',', $row['subgroup']));
                                        // Call recursively, pass along list of already processed groups so they are not recursed again.
-                                       $this->fetchGroups($theList, ($idList . ',') . $uid);
+                                       $this->fetchGroups($theList, $idList . ',' . $uid);
                                }
                                // Add the group uid, current list, TSconfig to the internal arrays.
                                $this->includeGroupArray[] = $uid;
                                $this->includeHierarchy[] = $idList;
-                               $this->TSdataArray[] = $this->addTScomment((((('Group "' . $row['title']) . '" [') . $row['uid']) . '] TSconfig field:')) . $row['TSconfig'];
+                               $this->TSdataArray[] = $this->addTScomment(('Group "' . $row['title'] . '" [' . $row['uid'] . '] TSconfig field:')) . $row['TSconfig'];
                                // Mount group database-mounts
                                if (($this->user['options'] & 1) == 1) {
                                        $this->dataLists['webmount_list'] .= ',' . $row['db_mountpoints'];
@@ -1523,11 +1523,11 @@ class BackendUserAuthentication extends \TYPO3\CMS\Core\Authentication\AbstractU
                                if ($userHomeStorageUid > 0) {
                                        $storageObject = $storageRepository->findByUid($userHomeStorageUid);
                                        // First try and mount with [uid]_[username]
-                                       $userHomeFilterIdentifier = ((($userHomeFilter . $this->user['uid']) . '_') . $this->user['username']) . $GLOBALS['TYPO3_CONF_VARS']['BE']['userUploadDir'];
+                                       $userHomeFilterIdentifier = $userHomeFilter . $this->user['uid'] . '_' . $this->user['username'] . $GLOBALS['TYPO3_CONF_VARS']['BE']['userUploadDir'];
                                        $didMount = $storageObject->injectFileMount($userHomeFilterIdentifier);
                                        // If that failed, try and mount with only [uid]
                                        if (!$didMount) {
-                                               $userHomeFilterIdentifier = ((($userHomeFilter . $this->user['uid']) . '_') . $this->user['username']) . $GLOBALS['TYPO3_CONF_VARS']['BE']['userUploadDir'];
+                                               $userHomeFilterIdentifier = $userHomeFilter . $this->user['uid'] . '_' . $this->user['username'] . $GLOBALS['TYPO3_CONF_VARS']['BE']['userUploadDir'];
                                                $storageObject->injectFileMount($userHomeFilterIdentifier);
                                        }
                                        $this->fileStorages[$storageObject->getUid()] = $storageObject;
@@ -1551,7 +1551,7 @@ class BackendUserAuthentication extends \TYPO3\CMS\Core\Authentication\AbstractU
                        $this->dataLists['filemount_list'] = \TYPO3\CMS\Core\Utility\GeneralUtility::uniqueList($this->dataLists['filemount_list']);
                        if ($this->dataLists['filemount_list']) {
                                $orderBy = $GLOBALS['TCA']['sys_filemounts']['ctrl']['default_sortby'] ? $GLOBALS['TYPO3_DB']->stripOrderBy($GLOBALS['TCA']['sys_filemounts']['ctrl']['default_sortby']) : 'sorting';
-                               $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'sys_filemounts', ('deleted=0 AND hidden=0 AND pid=0 AND uid IN (' . $this->dataLists['filemount_list']) . ')', '', $orderBy);
+                               $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'sys_filemounts', 'deleted=0 AND hidden=0 AND pid=0 AND uid IN (' . $this->dataLists['filemount_list'] . ')', '', $orderBy);
                                while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
                                        $storageObject = $storageRepository->findByUid($row['base']);
                                        $storageObject->injectFileMount($row['path'], $row);
@@ -1830,7 +1830,7 @@ class BackendUserAuthentication extends \TYPO3\CMS\Core\Authentication\AbstractU
                                        // Alternative title?
                                        $name = $title ? $title : $altTitle;
                                        // Adds the filemount. The same filemount with same name, type and path cannot be set up twice because of the hash string used as key.
-                                       $this->groupData['filemounts'][md5(((($name . '|') . $path) . '|') . $type)] = array('name' => $name, 'path' => $path, 'type' => $type);
+                                       $this->groupData['filemounts'][md5($name . '|' . $path . '|' . $type)] = array('name' => $name, 'path' => $path, 'type' => $type);
                                        // Return TRUE - went well, success!
                                        return 1;
                                }
@@ -1865,7 +1865,7 @@ class BackendUserAuthentication extends \TYPO3\CMS\Core\Authentication\AbstractU
                $out = $delimiter . LF;
                $lines = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(LF, $str);
                foreach ($lines as $v) {
-                       $out .= ('# ' . $v) . LF;
+                       $out .= '# ' . $v . LF;
                }
                $out .= $delimiter . LF;
                return $out;
@@ -1934,7 +1934,7 @@ class BackendUserAuthentication extends \TYPO3\CMS\Core\Authentication\AbstractU
                                $this->fileStorages = array();
                                $storageRepository = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Resource\\StorageRepository');
                                // Fetching all filemounts from the workspace
-                               $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'sys_filemounts', ('deleted = 0 AND hidden = 0 AND pid = 0 AND uid IN (' . $GLOBALS['TYPO3_DB']->cleanIntList($storageFiltersInWorkspace)) . ')');
+                               $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'sys_filemounts', 'deleted = 0 AND hidden = 0 AND pid = 0 AND uid IN (' . $GLOBALS['TYPO3_DB']->cleanIntList($storageFiltersInWorkspace) . ')');
                                // add every filemount of this workspace record
                                while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
                                        // get the added entry, and check if it was in the users' original filemounts
@@ -1970,7 +1970,7 @@ class BackendUserAuthentication extends \TYPO3\CMS\Core\Authentication\AbstractU
                                break;
                        default:
                                if (\TYPO3\CMS\Core\Extension\ExtensionManager::isLoaded('workspaces')) {
-                                       $wsRec = $GLOBALS['TYPO3_DB']->exec_SELECTgetSingleRow($fields, 'sys_workspace', ('pid=0 AND uid=' . intval($wsRec)) . \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause('sys_workspace'), '', 'title');
+                                       $wsRec = $GLOBALS['TYPO3_DB']->exec_SELECTgetSingleRow($fields, 'sys_workspace', 'pid=0 AND uid=' . intval($wsRec) . \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause('sys_workspace'), '', 'title');
                                }
                                break;
                        }
@@ -2058,7 +2058,7 @@ class BackendUserAuthentication extends \TYPO3\CMS\Core\Authentication\AbstractU
                if (strcmp($this->workspace, $this->user['workspace_id'])) {
                        $this->user['workspace_id'] = $this->workspace;
                        $GLOBALS['TYPO3_DB']->exec_UPDATEquery('be_users', 'uid=' . intval($this->user['uid']), array('workspace_id' => $this->user['workspace_id']));
-                       $this->simplelog(('User changed workspace to "' . $this->workspace) . '"');
+                       $this->simplelog('User changed workspace to "' . $this->workspace . '"');
                }
        }
 
@@ -2153,7 +2153,7 @@ class BackendUserAuthentication extends \TYPO3\CMS\Core\Authentication\AbstractU
         * @todo Define visibility
         */
        public function simplelog($message, $extKey = '', $error = 0) {
-               return $this->writelog(4, 0, $error, 0, ($extKey ? ('[' . $extKey) . '] ' : '') . $message, array());
+               return $this->writelog(4, 0, $error, 0, ($extKey ? '[' . $extKey . '] ' : '') . $message, array());
        }
 
        /**
@@ -2180,16 +2180,16 @@ class BackendUserAuthentication extends \TYPO3\CMS\Core\Authentication\AbstractU
                        $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'sys_log', 'type=255 AND action=3 AND error<>0 AND tstamp>' . intval($theTimeBack), '', 'tstamp');
                        if ($GLOBALS['TYPO3_DB']->sql_num_rows($res) > $max) {
                                // OK, so there were more than the max allowed number of login failures - so we will send an email then.
-                               $subject = ('TYPO3 Login Failure Warning (at ' . $GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename']) . ')';
-                               $email_body = ((((('There have been some attempts (' . $GLOBALS['TYPO3_DB']->sql_num_rows($res)) . ') to login at the TYPO3
-site "') . $GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename']) . '" (') . \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('HTTP_HOST')) . ').
+                               $subject = 'TYPO3 Login Failure Warning (at ' . $GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename'] . ')';
+                               $email_body = 'There have been some attempts (' . $GLOBALS['TYPO3_DB']->sql_num_rows($res) . ') to login at the TYPO3
+site "' . $GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename'] . '" (' . \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('HTTP_HOST') . ').
 
 This is a dump of the failures:
 
 ';
                                while ($testRows = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
                                        $theData = unserialize($testRows['log_data']);
-                                       $email_body .= (date((($GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy'] . ' ') . $GLOBALS['TYPO3_CONF_VARS']['SYS']['hhmm']), $testRows['tstamp']) . ':  ') . @sprintf($testRows['details'], ('' . $theData[0]), ('' . $theData[1]), ('' . $theData[2]));
+                                       $email_body .= date(($GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy'] . ' ' . $GLOBALS['TYPO3_CONF_VARS']['SYS']['hhmm']), $testRows['tstamp']) . ':  ' . @sprintf($testRows['details'], ('' . $theData[0]), ('' . $theData[1]), ('' . $theData[2]));
                                        $email_body .= LF;
                                }
                                $GLOBALS['TYPO3_DB']->sql_free_result($res);
@@ -2288,19 +2288,19 @@ This is a dump of the failures:
                                                if (!$this->isAdmin()) {
                                                        return TRUE;
                                                } else {
-                                                       fwrite(STDERR, ((('ERROR: CLI backend user "' . $userName) . '" was ADMIN which is not allowed!') . LF) . LF);
+                                                       fwrite(STDERR, 'ERROR: CLI backend user "' . $userName . '" was ADMIN which is not allowed!' . LF . LF);
                                                        die(3);
                                                }
                                        } else {
-                                               fwrite(STDERR, ((('ERROR: No backend user named "' . $userName) . '" was found!') . LF) . LF);
+                                               fwrite(STDERR, 'ERROR: No backend user named "' . $userName . '" was found!' . LF . LF);
                                                die(3);
                                        }
                                } else {
-                                       fwrite(STDERR, ((('ERROR: Module name, "' . $GLOBALS['MCONF']['name']) . '", was not prefixed with "_CLI_"') . LF) . LF);
+                                       fwrite(STDERR, 'ERROR: Module name, "' . $GLOBALS['MCONF']['name'] . '", was not prefixed with "_CLI_"' . LF . LF);
                                        die(3);
                                }
                        } else {
-                               fwrite(STDERR, ('ERROR: Another user was already loaded which is impossible in CLI mode!' . LF) . LF);
+                               fwrite(STDERR, 'ERROR: Another user was already loaded which is impossible in CLI mode!' . LF . LF);
                                die(3);
                        }
                }
@@ -2384,7 +2384,7 @@ This is a dump of the failures:
        private function emailAtLogin() {
                if ($this->loginSessionStarted) {
                        // Send notify-mail
-                       $subject = (((('At "' . $GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename']) . '"') . ' from ') . \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('REMOTE_ADDR')) . (\TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('REMOTE_HOST') ? (' (' . \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('REMOTE_HOST')) . ')' : '');
+                       $subject = 'At "' . $GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename'] . '"' . ' from ' . \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('REMOTE_ADDR') . (\TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('REMOTE_HOST') ? ' (' . \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('REMOTE_HOST') . ')' : '');
                        $msg = sprintf('User "%s" logged in from %s (%s) at "%s" (%s)', $this->user['username'], \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('REMOTE_ADDR'), \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('REMOTE_HOST'), $GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename'], \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('HTTP_HOST'));
                        // Warning email address
                        if ($GLOBALS['TYPO3_CONF_VARS']['BE']['warning_email_addr']) {
@@ -2404,7 +2404,7 @@ This is a dump of the failures:
                                        $from = \TYPO3\CMS\Core\Utility\MailUtility::getSystemFrom();
                                        /** @var $mail \TYPO3\CMS\Core\Mail\MailMessage */
                                        $mail = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Mail\\MailMessage');
-                                       $mail->setTo($GLOBALS['TYPO3_CONF_VARS']['BE']['warning_email_addr'])->setFrom($from)->setSubject(($prefix . ' ') . $subject)->setBody($msg);
+                                       $mail->setTo($GLOBALS['TYPO3_CONF_VARS']['BE']['warning_email_addr'])->setFrom($from)->setSubject($prefix . ' ' . $subject)->setBody($msg);
                                        $mail->send();
                                }
                        }
@@ -2440,7 +2440,7 @@ This is a dump of the failures:
                        $isUserAllowedToLogin = TRUE;
                } elseif ($this->user['ses_backuserid']) {
                        $backendUserId = intval($this->user['ses_backuserid']);
-                       $whereAdmin = (('uid=' . $backendUserId) . ' AND admin=1') . \TYPO3\CMS\Backend\Utility\BackendUtility::BEenableFields('be_users');
+                       $whereAdmin = 'uid=' . $backendUserId . ' AND admin=1' . \TYPO3\CMS\Backend\Utility\BackendUtility::BEenableFields('be_users');
                        if ($GLOBALS['TYPO3_DB']->exec_SELECTcountRows('uid', 'be_users', $whereAdmin) > 0) {
                                $isUserAllowedToLogin = TRUE;
                        }
index 70f1980..6a11c09 100644 (file)
@@ -235,7 +235,7 @@ class Autoloader {
                if (array_key_exists($classNameLower, self::$classNameToFileMapping)) {
                        $classPath = self::$classNameToFileMapping[$classNameLower];
                }
-               if (($classPath === NULL && substr($classNameLower, 0, 3) === 'ux_') && !array_key_exists($classNameLower, self::$classNameToFileMapping)) {
+               if ($classPath === NULL && substr($classNameLower, 0, 3) === 'ux_' && !array_key_exists($classNameLower, self::$classNameToFileMapping)) {
                        self::$cacheUpdateRequired = TRUE;
                        self::$classNameToFileMapping[$classNameLower] = NULL;
                }
@@ -283,7 +283,7 @@ class Autoloader {
                        $delimiter = '\\';
                }
                $classNameParts = explode($delimiter, $tempClassName, 4);
-               if ((isset($classNameParts[0]) && $classNameParts[0] === 'TYPO3') && (isset($classNameParts[1]) && $classNameParts[1] === 'CMS')) {
+               if (isset($classNameParts[0]) && $classNameParts[0] === 'TYPO3' && (isset($classNameParts[1]) && $classNameParts[1] === 'CMS')) {
                        $extensionKey = \TYPO3\CMS\Core\Utility\GeneralUtility::camelCaseToLowerCaseUnderscored($classNameParts[2]);
                        $classNameWithoutVendorAndProduct = $classNameParts[3];
                } else {
@@ -333,8 +333,8 @@ class Autoloader {
        static protected function updateRegistryCacheEntry(array $registry) {
                $cachedFileContent = 'return array(';
                foreach ($registry as $className => $classLocation) {
-                       $nullOrLocation = is_string($classLocation) ? ('\'' . $classLocation) . '\',' : 'NULL,';
-                       $cachedFileContent .= (((LF . '\'') . $className) . '\' => ') . $nullOrLocation;
+                       $nullOrLocation = is_string($classLocation) ? '\'' . $classLocation . '\',' : 'NULL,';
+                       $cachedFileContent .= LF . '\'' . $className . '\' => ' . $nullOrLocation;
                }
                $cachedFileContent .= LF . ');';
                $GLOBALS['typo3CacheManager']->getCache('cache_core')->set(self::getAutoloadCacheIdentifier(), $cachedFileContent);
@@ -353,7 +353,7 @@ class Autoloader {
         */
        static protected function getAutoloadCacheIdentifier() {
                if (is_null(self::$autoloadCacheIdentifier)) {
-                       self::$autoloadCacheIdentifier = 'autoload_' . sha1(((TYPO3_version . PATH_site) . 'autoload'));
+                       self::$autoloadCacheIdentifier = 'autoload_' . sha1((TYPO3_version . PATH_site . 'autoload'));
                }
                return self::$autoloadCacheIdentifier;
        }
index 1f5aa30..3609b62 100644 (file)
@@ -85,7 +85,7 @@ abstract class AbstractBackend implements \TYPO3\CMS\Core\Cache\Backend\BackendI
                                if (method_exists($this, $methodName)) {
                                        $this->{$methodName}($optionValue);
                                } else {
-                                       throw new \InvalidArgumentException(((('Invalid cache backend option "' . $optionKey) . '" for backend of type "') . get_class($this)) . '"', 1231267498);
+                                       throw new \InvalidArgumentException('Invalid cache backend option "' . $optionKey . '" for backend of type "' . get_class($this) . '"', 1231267498);
                                }
                        }
                }
@@ -132,7 +132,7 @@ abstract class AbstractBackend implements \TYPO3\CMS\Core\Cache\Backend\BackendI
                        if ($lifetime === NULL) {
                                $lifetime = $this->defaultLifetime;
                        }
-                       $expiryTime = new \DateTime(('now +' . $lifetime) . ' seconds', new \DateTimeZone('UTC'));
+                       $expiryTime = new \DateTime('now +' . $lifetime . ' seconds', new \DateTimeZone('UTC'));
                }
                return $expiryTime;
        }
index 425d3fb..03f7147 100644 (file)
@@ -85,7 +85,7 @@ class ApcBackend extends \TYPO3\CMS\Core\Cache\Backend\AbstractBackend implement
        public function setCache(\TYPO3\CMS\Core\Cache\Frontend\FrontendInterface $cache) {
                parent::setCache($cache);
                $processUser = extension_loaded('posix') ? posix_getpwuid(posix_geteuid()) : array('name' => 'default');
-               $pathHash = \TYPO3\CMS\Core\Utility\GeneralUtility::shortMD5((PATH_site . $processUser['name']) . $this->context, 12);
+               $pathHash = \TYPO3\CMS\Core\Utility\GeneralUtility::shortMD5(PATH_site . $processUser['name'] . $this->context, 12);
                $this->identifierPrefix = 'TYPO3_' . $pathHash;
        }
 
@@ -106,7 +106,7 @@ class ApcBackend extends \TYPO3\CMS\Core\Cache\Backend\AbstractBackend implement
                        throw new \TYPO3\CMS\Core\Cache\Exception('No cache frontend has been set yet via setCache().', 1232986818);
                }
                if (!is_string($data)) {
-                       throw new \TYPO3\CMS\Core\Cache\Exception\InvalidDataException(('The specified data is of type "' . gettype($data)) . '" but a string is expected.', 1232986825);
+                       throw new \TYPO3\CMS\Core\Cache\Exception\InvalidDataException('The specified data is of type "' . gettype($data) . '" but a string is expected.', 1232986825);
                }
                $tags[] = '%APCBE%' . $this->cacheIdentifier;
                $expiration = $lifetime !== NULL ? $lifetime : $this->defaultLifetime;
@@ -169,7 +169,7 @@ class ApcBackend extends \TYPO3\CMS\Core\Cache\Backend\AbstractBackend implement
         */
        public function findIdentifiersByTag($tag) {
                $success = FALSE;
-               $identifiers = apc_fetch(($this->identifierPrefix . 'tag_') . $tag, $success);
+               $identifiers = apc_fetch($this->identifierPrefix . 'tag_' . $tag, $success);
                if ($success === FALSE) {
                        return array();
                } else {
@@ -186,7 +186,7 @@ class ApcBackend extends \TYPO3\CMS\Core\Cache\Backend\AbstractBackend implement
         */
        protected function findTagsByIdentifier($identifier) {
                $success = FALSE;
-               $tags = apc_fetch(($this->identifierPrefix . 'ident_') . $identifier, $success);
+               $tags = apc_fetch($this->identifierPrefix . 'ident_' . $identifier, $success);
                return $success ? (array) $tags : array();
        }
 
@@ -231,12 +231,12 @@ class ApcBackend extends \TYPO3\CMS\Core\Cache\Backend\AbstractBackend implement
                        $identifiers = $this->findIdentifiersByTag($tag);
                        if (array_search($entryIdentifier, $identifiers) === FALSE) {
                                $identifiers[] = $entryIdentifier;
-                               apc_store(($this->identifierPrefix . 'tag_') . $tag, $identifiers);
+                               apc_store($this->identifierPrefix . 'tag_' . $tag, $identifiers);
                        }
                        // Update identifier-to-tag index
                        $existingTags = $this->findTagsByIdentifier($entryIdentifier);
                        if (array_search($entryIdentifier, $existingTags) === FALSE) {
-                               apc_store(($this->identifierPrefix . 'ident_') . $entryIdentifier, array_merge($existingTags, $tags));
+                               apc_store($this->identifierPrefix . 'ident_' . $entryIdentifier, array_merge($existingTags, $tags));
                        }
                }
        }
@@ -261,14 +261,14 @@ class ApcBackend extends \TYPO3\CMS\Core\Cache\Backend\AbstractBackend implement
                        if (($key = array_search($entryIdentifier, $identifiers)) !== FALSE) {
                                unset($identifiers[$key]);
                                if (count($identifiers)) {
-                                       apc_store(($this->identifierPrefix . 'tag_') . $tag, $identifiers);
+                                       apc_store($this->identifierPrefix . 'tag_' . $tag, $identifiers);
                                } else {
-                                       apc_delete(($this->identifierPrefix . 'tag_') . $tag);
+                                       apc_delete($this->identifierPrefix . 'tag_' . $tag);
                                }
                        }
                }
                // Clear reverse tag index for this identifier
-               apc_delete(($this->identifierPrefix . 'ident_') . $entryIdentifier);
+               apc_delete($this->identifierPrefix . 'ident_' . $entryIdentifier);
        }
 
        /**
index 65a0956..3533cc5 100644 (file)
@@ -86,7 +86,7 @@ class FileBackend extends \TYPO3\CMS\Core\Cache\Backend\SimpleFileBackend implem
                                $entryIdentifier = $directoryIterator->getFilename();
                        }
                        $this->cacheEntryIdentifiers[$entryIdentifier] = TRUE;
-                       file_put_contents(($this->cacheDirectory . $entryIdentifier) . $this->cacheEntryFileExtension, $this->get($entryIdentifier));
+                       file_put_contents($this->cacheDirectory . $entryIdentifier . $this->cacheEntryFileExtension, $this->get($entryIdentifier));
                }
                if ($this->useIgBinary === TRUE) {
                        file_put_contents($this->cacheDirectory . 'FrozenCache.data', igbinary_serialize($this->cacheEntryIdentifiers));
@@ -147,7 +147,7 @@ class FileBackend extends \TYPO3\CMS\Core\Cache\Backend\SimpleFileBackend implem
         */
        public function set($entryIdentifier, $data, array $tags = array(), $lifetime = NULL) {
                if (!is_string($data)) {
-                       throw new \t3lib_cache_Exception_InvalidData(('The specified data is of type "' . gettype($data)) . '" but a string is expected.', 1204481674);
+                       throw new \t3lib_cache_Exception_InvalidData('The specified data is of type "' . gettype($data) . '" but a string is expected.', 1204481674);
                }
                if ($entryIdentifier !== basename($entryIdentifier)) {
                        throw new \InvalidArgumentException('The specified entry identifier must not contain a path segment.', 1282073032);
@@ -159,22 +159,22 @@ class FileBackend extends \TYPO3\CMS\Core\Cache\Backend\SimpleFileBackend implem
                        throw new \RuntimeException(sprintf('Cannot add or modify cache entry because the backend of cache "%s" is frozen.', $this->cacheIdentifier), 1323344192);
                }
                $this->remove($entryIdentifier);
-               $temporaryCacheEntryPathAndFilename = ($this->cacheDirectory . uniqid()) . '.temp';
+               $temporaryCacheEntryPathAndFilename = $this->cacheDirectory . uniqid() . '.temp';
                $lifetime = $lifetime === NULL ? $this->defaultLifetime : $lifetime;
                $expiryTime = $lifetime === 0 ? 0 : $GLOBALS['EXEC_TIME'] + $lifetime;
-               $metaData = (str_pad($expiryTime, self::EXPIRYTIME_LENGTH) . implode(' ', $tags)) . str_pad(strlen($data), self::DATASIZE_DIGITS);
+               $metaData = str_pad($expiryTime, self::EXPIRYTIME_LENGTH) . implode(' ', $tags) . str_pad(strlen($data), self::DATASIZE_DIGITS);
                $result = file_put_contents($temporaryCacheEntryPathAndFilename, $data . $metaData);
                \TYPO3\CMS\Core\Utility\GeneralUtility::fixPermissions($temporaryCacheEntryPathAndFilename);
                if ($result === FALSE) {
-                       throw new \t3lib_cache_exception(('The temporary cache file "' . $temporaryCacheEntryPathAndFilename) . '" could not be written.', 1204026251);
+                       throw new \t3lib_cache_exception('The temporary cache file "' . $temporaryCacheEntryPathAndFilename . '" could not be written.', 1204026251);
                }
                $i = 0;
-               $cacheEntryPathAndFilename = ($this->cacheDirectory . $entryIdentifier) . $this->cacheEntryFileExtension;
+               $cacheEntryPathAndFilename = $this->cacheDirectory . $entryIdentifier . $this->cacheEntryFileExtension;
                while (($result = rename($temporaryCacheEntryPathAndFilename, $cacheEntryPathAndFilename)) === FALSE && $i < 5) {
                        $i++;
                }
                if ($result === FALSE) {
-                       throw new \t3lib_cache_exception(('The cache file "' . $cacheEntryPathAndFilename) . '" could not be written.', 1222361632);
+                       throw new \t3lib_cache_exception('The cache file "' . $cacheEntryPathAndFilename . '" could not be written.', 1222361632);
                }
        }
 
@@ -188,12 +188,12 @@ class FileBackend extends \TYPO3\CMS\Core\Cache\Backend\SimpleFileBackend implem
         */
        public function get($entryIdentifier) {
                if ($this->frozen === TRUE) {
-                       return isset($this->cacheEntryIdentifiers[$entryIdentifier]) ? file_get_contents(($this->cacheDirectory . $entryIdentifier) . $this->cacheEntryFileExtension) : FALSE;
+                       return isset($this->cacheEntryIdentifiers[$entryIdentifier]) ? file_get_contents($this->cacheDirectory . $entryIdentifier . $this->cacheEntryFileExtension) : FALSE;
                }
                if ($entryIdentifier !== basename($entryIdentifier)) {
                        throw new \InvalidArgumentException('The specified entry identifier must not contain a path segment.', 1282073033);
                }
-               $pathAndFilename = ($this->cacheDirectory . $entryIdentifier) . $this->cacheEntryFileExtension;
+               $pathAndFilename = $this->cacheDirectory . $entryIdentifier . $this->cacheEntryFileExtension;
                if ($this->isCacheFileExpired($pathAndFilename)) {
                        return FALSE;
                }
@@ -216,7 +216,7 @@ class FileBackend extends \TYPO3\CMS\Core\Cache\Backend\SimpleFileBackend implem
                if ($entryIdentifier !== basename($entryIdentifier)) {
                        throw new \InvalidArgumentException('The specified entry identifier must not contain a path segment.', 1282073034);
                }
-               return !$this->isCacheFileExpired((($this->cacheDirectory . $entryIdentifier) . $this->cacheEntryFileExtension));
+               return !$this->isCacheFileExpired(($this->cacheDirectory . $entryIdentifier . $this->cacheEntryFileExtension));
        }
 
        /**
@@ -239,7 +239,7 @@ class FileBackend extends \TYPO3\CMS\Core\Cache\Backend\SimpleFileBackend implem
                if ($this->frozen === TRUE) {
                        throw new \RuntimeException(sprintf('Cannot remove cache entry because the backend of cache "%s" is frozen.', $this->cacheIdentifier), 1323344193);
                }
-               $pathAndFilename = ($this->cacheDirectory . $entryIdentifier) . $this->cacheEntryFileExtension;
+               $pathAndFilename = $this->cacheDirectory . $entryIdentifier . $this->cacheEntryFileExtension;
                if (file_exists($pathAndFilename) === FALSE) {
                        return FALSE;
                }
@@ -384,16 +384,16 @@ class FileBackend extends \TYPO3\CMS\Core\Cache\Backend\SimpleFileBackend implem
        public function requireOnce($entryIdentifier) {
                if ($this->frozen === TRUE) {
                        if (isset($this->cacheEntryIdentifiers[$entryIdentifier])) {
-                               return require_once ($this->cacheDirectory . $entryIdentifier) . $this->cacheEntryFileExtension;
+                               return require_once $this->cacheDirectory . $entryIdentifier . $this->cacheEntryFileExtension;
                        } else {
                                return FALSE;
                        }
                } else {
-                       $pathAndFilename = ($this->cacheDirectory . $entryIdentifier) . $this->cacheEntryFileExtension;
+                       $pathAndFilename = $this->cacheDirectory . $entryIdentifier . $this->cacheEntryFileExtension;
                        if ($entryIdentifier !== basename($entryIdentifier)) {
                                throw new \InvalidArgumentException('The specified entry identifier must not contain a path segment.', 1282073036);
                        }
-                       $pathAndFilename = ($this->cacheDirectory . $entryIdentifier) . $this->cacheEntryFileExtension;
+                       $pathAndFilename = $this->cacheDirectory . $entryIdentifier . $this->cacheEntryFileExtension;
                        return $this->isCacheFileExpired($pathAndFilename) ? FALSE : require_once $pathAndFilename;
                }
        }
index 74ecaa2..e8802a0 100644 (file)
@@ -173,7 +173,7 @@ class MemcachedBackend extends \TYPO3\CMS\Core\Cache\Backend\AbstractBackend imp
         */
        public function setCache(\TYPO3\CMS\Core\Cache\Frontend\FrontendInterface $cache) {
                parent::setCache($cache);
-               $this->identifierPrefix = ('TYPO3_' . md5(PATH_site)) . '_';
+               $this->identifierPrefix = 'TYPO3_' . md5(PATH_site) . '_';
        }
 
        /**
@@ -191,13 +191,13 @@ class MemcachedBackend extends \TYPO3\CMS\Core\Cache\Backend\AbstractBackend imp
         */
        public function set($entryIdentifier, $data, array $tags = array(), $lifetime = NULL) {
                if (strlen($this->identifierPrefix . $entryIdentifier) > 250) {
-                       throw new \InvalidArgumentException((('Could not set value. Key more than 250 characters (' . $this->identifierPrefix) . $entryIdentifier) . ').', 1232969508);
+                       throw new \InvalidArgumentException('Could not set value. Key more than 250 characters (' . $this->identifierPrefix . $entryIdentifier . ').', 1232969508);
                }
                if (!$this->cache instanceof \TYPO3\CMS\Core\Cache\Frontend\FrontendInterface) {
                        throw new \TYPO3\CMS\Core\Cache\Exception('No cache frontend has been set yet via setCache().', 1207149215);
                }
                if (!is_string($data)) {
-                       throw new \t3lib_cache_Exception_InvalidData(('The specified data is of type "' . gettype($data)) . '" but a string is expected.', 1207149231);
+                       throw new \t3lib_cache_Exception_InvalidData('The specified data is of type "' . gettype($data) . '" but a string is expected.', 1207149231);
                }
                $tags[] = '%MEMCACHEBE%' . $this->cacheIdentifier;
                $expiration = $lifetime !== NULL ? $lifetime : $this->defaultLifetime;
@@ -212,7 +212,7 @@ class MemcachedBackend extends \TYPO3\CMS\Core\Cache\Backend\AbstractBackend imp
                                $success = TRUE;
                                $chunkNumber = 1;
                                foreach ($data as $chunk) {
-                                       $success = $success && $this->memcache->set((($this->identifierPrefix . $entryIdentifier) . '_chunk_') . $chunkNumber, $chunk, $this->flags, $expiration);
+                                       $success = $success && $this->memcache->set($this->identifierPrefix . $entryIdentifier . '_chunk_' . $chunkNumber, $chunk, $this->flags, $expiration);
                                        $chunkNumber++;
                                }
                                $success = $success && $this->memcache->set($this->identifierPrefix . $entryIdentifier, 'TYPO3*chunked:' . $chunkNumber, $this->flags, $expiration);
@@ -243,7 +243,7 @@ class MemcachedBackend extends \TYPO3\CMS\Core\Cache\Backend\AbstractBackend imp
                        list(, $chunkCount) = explode(':', $value);
                        $value = '';
                        for ($chunkNumber = 1; $chunkNumber < $chunkCount; $chunkNumber++) {
-                               $value .= $this->memcache->get((($this->identifierPrefix . $entryIdentifier) . '_chunk_') . $chunkNumber);
+                               $value .= $this->memcache->get($this->identifierPrefix . $entryIdentifier . '_chunk_' . $chunkNumber);
                        }
                }
                return $value;
@@ -283,7 +283,7 @@ class MemcachedBackend extends \TYPO3\CMS\Core\Cache\Backend\AbstractBackend imp
         * @api
         */
        public function findIdentifiersByTag($tag) {
-               $identifiers = $this->memcache->get(($this->identifierPrefix . 'tag_') . $tag);
+               $identifiers = $this->memcache->get($this->identifierPrefix . 'tag_' . $tag);
                if ($identifiers !== FALSE) {
                        return (array) $identifiers;
                } else {
@@ -332,12 +332,12 @@ class MemcachedBackend extends \TYPO3\CMS\Core\Cache\Backend\AbstractBackend imp
                        $identifiers = $this->findIdentifiersByTag($tag);
                        if (array_search($entryIdentifier, $identifiers) === FALSE) {
                                $identifiers[] = $entryIdentifier;
-                               $this->memcache->set(($this->identifierPrefix . 'tag_') . $tag, $identifiers);
+                               $this->memcache->set($this->identifierPrefix . 'tag_' . $tag, $identifiers);
                        }
                        // Update identifier-to-tag index
                        $existingTags = $this->findTagsByIdentifier($entryIdentifier);
                        if (array_search($tag, $existingTags) === FALSE) {
-                               $this->memcache->set(($this->identifierPrefix . 'ident_') . $entryIdentifier, array_merge($existingTags, $tags));
+                               $this->memcache->set($this->identifierPrefix . 'ident_' . $entryIdentifier, array_merge($existingTags, $tags));
                        }
                }
        }
@@ -363,14 +363,14 @@ class MemcachedBackend extends \TYPO3\CMS\Core\Cache\Backend\AbstractBackend imp
                        if (($key = array_search($entryIdentifier, $identifiers)) !== FALSE) {
                                unset($identifiers[$key]);
                                if (count($identifiers)) {
-                                       $this->memcache->set(($this->identifierPrefix . 'tag_') . $tag, $identifiers);
+                                       $this->memcache->set($this->identifierPrefix . 'tag_' . $tag, $identifiers);
                                } else {
-                                       $this->memcache->delete(($this->identifierPrefix . 'tag_') . $tag, 0);
+                                       $this->memcache->delete($this->identifierPrefix . 'tag_' . $tag, 0);
                                }
                        }
                }
                // Clear reverse tag index for this identifier
-               $this->memcache->delete(($this->identifierPrefix . 'ident_') . $entryIdentifier, 0);
+               $this->memcache->delete($this->identifierPrefix . 'ident_' . $entryIdentifier, 0);
        }
 
        /**
@@ -382,7 +382,7 @@ class MemcachedBackend extends \TYPO3\CMS\Core\Cache\Backend\AbstractBackend imp
         * @api
         */
        protected function findTagsByIdentifier($identifier) {
-               $tags = $this->memcache->get(($this->identifierPrefix . 'ident_') . $identifier);
+               $tags = $this->memcache->get($this->identifierPrefix . 'ident_' . $identifier);
                return $tags === FALSE ? array() : (array) $tags;
        }
 
index 5357a13..db26658 100644 (file)
@@ -119,7 +119,7 @@ class PdoBackend extends \TYPO3\CMS\Core\Cache\Backend\AbstractBackend implement
                        throw new \TYPO3\CMS\Core\Cache\Exception('No cache frontend has been set yet via setCache().', 1259515600);
                }
                if (!is_string($data)) {
-                       throw new \TYPO3\CMS\Core\Cache\Exception\InvalidDataException(('The specified data is of type "' . gettype($data)) . '" but a string is expected.', 1259515601);
+                       throw new \TYPO3\CMS\Core\Cache\Exception\InvalidDataException('The specified data is of type "' . gettype($data) . '" but a string is expected.', 1259515601);
                }
                if ($this->has($entryIdentifier)) {
                        $this->remove($entryIdentifier);
@@ -128,13 +128,13 @@ class PdoBackend extends \TYPO3\CMS\Core\Cache\Backend\AbstractBackend implement
                $statementHandle = $this->databaseHandle->prepare('INSERT INTO "cache" ("identifier", "context", "cache", "created", "lifetime", "content") VALUES (?, ?, ?, ?, ?, ?)');
                $result = $statementHandle->execute(array($entryIdentifier, $this->context, $this->cacheIdentifier, $GLOBALS['EXEC_TIME'], $lifetime, $data));
                if ($result === FALSE) {
-                       throw new \TYPO3\CMS\Core\Cache\Exception(('The cache entry "' . $entryIdentifier) . '" could not be written.', 1259530791);
+                       throw new \TYPO3\CMS\Core\Cache\Exception('The cache entry "' . $entryIdentifier . '" could not be written.', 1259530791);
                }
                $statementHandle = $this->databaseHandle->prepare('INSERT INTO "tags" ("identifier", "context", "cache", "tag") VALUES (?, ?, ?, ?)');
                foreach ($tags as $tag) {
                        $result = $statementHandle->execute(array($entryIdentifier, $this->context, $this->cacheIdentifier, $tag));
                        if ($result === FALSE) {
-                               throw new \TYPO3\CMS\Core\Cache\Exception(((('The tag "' . $tag) . ' for cache entry "') . $entryIdentifier) . '" could not be written.', 1259530751);
+                               throw new \TYPO3\CMS\Core\Cache\Exception('The tag "' . $tag . ' for cache entry "' . $entryIdentifier . '" could not be written.', 1259530751);
                        }
                }
        }
@@ -230,7 +230,7 @@ class PdoBackend extends \TYPO3\CMS\Core\Cache\Backend\AbstractBackend implement
         * @api
         */
        public function collectGarbage() {
-               $statementHandle = $this->databaseHandle->prepare((('DELETE FROM "tags" WHERE "context"=? AND "cache"=? AND "identifier" IN ' . '(SELECT "identifier" FROM "cache" WHERE "context"=? AND "cache"=? AND "lifetime" > 0 AND "created" + "lifetime" < ') . $GLOBALS['EXEC_TIME']) . ')');
+               $statementHandle = $this->databaseHandle->prepare('DELETE FROM "tags" WHERE "context"=? AND "cache"=? AND "identifier" IN ' . '(SELECT "identifier" FROM "cache" WHERE "context"=? AND "cache"=? AND "lifetime" > 0 AND "created" + "lifetime" < ' . $GLOBALS['EXEC_TIME'] . ')');
                $statementHandle->execute(array($this->context, $this->cacheIdentifier, $this->context, $this->cacheIdentifier));
                $statementHandle = $this->databaseHandle->prepare('DELETE FROM "cache" WHERE "context"=? AND "cache"=? AND "lifetime" > 0 AND "created" + "lifetime" < ' . $GLOBALS['EXEC_TIME']);
                $statementHandle->execute(array($this->context, $this->cacheIdentifier));
@@ -242,7 +242,7 @@ class PdoBackend extends \TYPO3\CMS\Core\Cache\Backend\AbstractBackend implement
         * @return string
         */
        protected function getNotExpiredStatement() {
-               return (' AND ("lifetime" = 0 OR "created" + "lifetime" >= ' . $GLOBALS['EXEC_TIME']) . ')';
+               return ' AND ("lifetime" = 0 OR "created" + "lifetime" >= ' . $GLOBALS['EXEC_TIME'] . ')';
        }
 
        /**
@@ -266,7 +266,7 @@ class PdoBackend extends \TYPO3\CMS\Core\Cache\Backend\AbstractBackend implement
                                $this->databaseHandle->exec('SET SESSION sql_mode=\'ANSI\';');
                        }
                } catch (\PDOException $e) {
-                       throw new \RuntimeException((('Could not connect to cache table with DSN "' . $this->dataSourceName) . '". PDO error: ') . $e->getMessage(), 1334736164);
+                       throw new \RuntimeException('Could not connect to cache table with DSN "' . $this->dataSourceName . '". PDO error: ' . $e->getMessage(), 1334736164);
                }
        }
 
@@ -280,7 +280,7 @@ class PdoBackend extends \TYPO3\CMS\Core\Cache\Backend\AbstractBackend implement
                try {
                        \TYPO3\CMS\Core\Database\PdoHelper::importSql($this->databaseHandle, $this->pdoDriver, PATH_t3lib . 'cache/backend/resources/ddl.sql');
                } catch (\PDOException $e) {
-                       throw new \RuntimeException((('Could not create cache tables with DSN "' . $this->dataSourceName) . '". PDO error: ') . $e->getMessage(), 1259576985);
+                       throw new \RuntimeException('Could not create cache tables with DSN "' . $this->dataSourceName . '". PDO error: ' . $e->getMessage(), 1259576985);
                }
        }
 
index 544bbc5..da75d3a 100644 (file)
@@ -163,7 +163,7 @@ class RedisBackend extends \TYPO3\CMS\Core\Cache\Backend\AbstractBackend impleme
                        if ($this->database > 0) {
                                $success = $this->redis->select($this->database);
                                if (!$success) {
-                                       throw new \TYPO3\CMS\Core\Cache\Exception(('The given database "' . $this->database) . '" could not be selected.', 1279765144);
+                                       throw new \TYPO3\CMS\Core\Cache\Exception('The given database "' . $this->database . '" could not be selected.', 1279765144);
                                }
                        }
                }
@@ -201,10 +201,10 @@ class RedisBackend extends \TYPO3\CMS\Core\Cache\Backend\AbstractBackend impleme
         */
        public function setDatabase($database) {
                if (!is_integer($database)) {
-                       throw new \InvalidArgumentException(('The specified database number is of type "' . gettype($database)) . '" but an integer is expected.', 1279763057);
+                       throw new \InvalidArgumentException('The specified database number is of type "' . gettype($database) . '" but an integer is expected.', 1279763057);
                }
                if ($database < 0) {
-                       throw new \InvalidArgumentException(('The specified database "' . $database) . '" must be greater or equal than zero.', 1279763534);
+                       throw new \InvalidArgumentException('The specified database "' . $database . '" must be greater or equal than zero.', 1279763534);
                }
                $this->database = $database;
        }
@@ -230,7 +230,7 @@ class RedisBackend extends \TYPO3\CMS\Core\Cache\Backend\AbstractBackend impleme
         */
        public function setCompression($compression) {
                if (!is_bool($compression)) {
-                       throw new \InvalidArgumentException(('The specified compression of type "' . gettype($compression)) . '" but a boolean is expected.', 1289679153);
+                       throw new \InvalidArgumentException('The specified compression of type "' . gettype($compression) . '" but a boolean is expected.', 1289679153);
                }
                $this->compression = $compression;
        }
@@ -247,7 +247,7 @@ class RedisBackend extends \TYPO3\CMS\Core\Cache\Backend\AbstractBackend impleme
         */
        public function setCompressionLevel($compressionLevel) {
                if (!is_integer($compressionLevel)) {
-                       throw new \InvalidArgumentException(('The specified compression of type "' . gettype($compressionLevel)) . '" but an integer is expected.', 1289679154);
+                       throw new \InvalidArgumentException('The specified compression of type "' . gettype($compressionLevel) . '" but an integer is expected.', 1289679154);
                }
                if ($compressionLevel >= -1 && $compressionLevel <= 9) {
                        $this->compressionLevel = $compressionLevel;
@@ -273,17 +273,17 @@ class RedisBackend extends \TYPO3\CMS\Core\Cache\Backend\AbstractBackend impleme
         */
        public function set($entryIdentifier, $data, array $tags = array(), $lifetime = NULL) {
                if (!is_string($entryIdentifier)) {
-                       throw new \InvalidArgumentException(('The specified identifier is of type "' . gettype($entryIdentifier)) . '" but a string is expected.', 1279470252);
+                       throw new \InvalidArgumentException('The specified identifier is of type "' . gettype($entryIdentifier) . '" but a string is expected.', 1279470252);
                }
                if (!is_string($data)) {
-                       throw new \t3lib_cache_Exception_InvalidData(('The specified data is of type "' . gettype($data)) . '" but a string is expected.', 1279469941);
+                       throw new \t3lib_cache_Exception_InvalidData('The specified data is of type "' . gettype($data) . '" but a string is expected.', 1279469941);
                }
                $lifetime = $lifetime === NULL ? $this->defaultLifetime : $lifetime;
                if (!is_integer($lifetime)) {
-                       throw new \InvalidArgumentException(('The specified lifetime is of type "' . gettype($lifetime)) . '" but an integer or NULL is expected.', 1279488008);
+                       throw new \InvalidArgumentException('The specified lifetime is of type "' . gettype($lifetime) . '" but an integer or NULL is expected.', 1279488008);
                }
                if ($lifetime < 0) {
-                       throw new \InvalidArgumentException(('The specified lifetime "' . $lifetime) . '" must be greater or equal than zero.', 1279487573);
+                       throw new \InvalidArgumentException('The specified lifetime "' . $lifetime . '" must be greater or equal than zero.', 1279487573);
                }
                if ($this->connected) {
                        $expiration = $lifetime === 0 ? self::FAKED_UNLIMITED_LIFETIME : $lifetime;
@@ -325,7 +325,7 @@ class RedisBackend extends \TYPO3\CMS\Core\Cache\Backend\AbstractBackend impleme
         */
        public function get($entryIdentifier) {
                if (!is_string($entryIdentifier)) {
-                       throw new \InvalidArgumentException(('The specified identifier is of type "' . gettype($entryIdentifier)) . '" but a string is expected.', 1279470253);
+                       throw new \InvalidArgumentException('The specified identifier is of type "' . gettype($entryIdentifier) . '" but a string is expected.', 1279470253);
                }
                $storedEntry = FALSE;
                if ($this->connected) {
@@ -349,7 +349,7 @@ class RedisBackend extends \TYPO3\CMS\Core\Cache\Backend\AbstractBackend impleme
         */
        public function has($entryIdentifier) {
                if (!is_string($entryIdentifier)) {
-                       throw new \InvalidArgumentException(('The specified identifier is of type "' . gettype($entryIdentifier)) . '" but a string is expected.', 1279470254);
+                       throw new \InvalidArgumentException('The specified identifier is of type "' . gettype($entryIdentifier) . '" but a string is expected.', 1279470254);
                }
                return $this->connected && $this->redis->exists(self::IDENTIFIER_DATA_PREFIX . $entryIdentifier);
        }
@@ -367,7 +367,7 @@ class RedisBackend extends \TYPO3\CMS\Core\Cache\Backend\AbstractBackend impleme
         */
        public function remove($entryIdentifier) {
                if (!is_string($entryIdentifier)) {
-                       throw new \InvalidArgumentException(('The specified identifier is of type "' . gettype($entryIdentifier)) . '" but a string is expected.', 1279470255);
+                       throw new \InvalidArgumentException('The specified identifier is of type "' . gettype($entryIdentifier) . '" but a string is expected.', 1279470255);
                }
                $elementsDeleted = FALSE;
                if ($this->connected) {
@@ -399,7 +399,7 @@ class RedisBackend extends \TYPO3\CMS\Core\Cache\Backend\AbstractBackend impleme
         */
        public function findIdentifiersByTag($tag) {
                if (!is_string($tag)) {
-                       throw new \InvalidArgumentException(('The specified tag is of type "' . gettype($tag)) . '" but a string is expected.', 1279569759);
+                       throw new \InvalidArgumentException('The specified tag is of type "' . gettype($tag) . '" but a string is expected.', 1279569759);
                }
                $foundIdentifiers = array();
                if ($this->connected) {
@@ -435,7 +435,7 @@ class RedisBackend extends \TYPO3\CMS\Core\Cache\Backend\AbstractBackend impleme
         */
        public function flushByTag($tag) {
                if (!is_string($tag)) {
-                       throw new \InvalidArgumentException(('The specified tag is of type "' . gettype($tag)) . '" but a string is expected.', 1279578078);
+                       throw new \InvalidArgumentException('The specified tag is of type "' . gettype($tag) . '" but a string is expected.', 1279578078);
                }
                if ($this->connected) {
                        $identifiers = $this->redis->sMembers(self::TAG_IDENTIFIERS_PREFIX . $tag);
index c7bd7c2..58dc2b3 100644 (file)
@@ -98,7 +98,7 @@ class SimpleFileBackend extends \TYPO3\CMS\Core\Cache\Backend\AbstractBackend im
                        $temporaryCacheDirectory = $this->temporaryCacheDirectory;
                }
                $codeOrData = $cache instanceof \TYPO3\CMS\Core\Cache\Frontend\PhpFrontend ? 'Code' : 'Data';
-               $finalCacheDirectory = (((($temporaryCacheDirectory . 'Cache/') . $codeOrData) . '/') . $this->cacheIdentifier) . '/';
+               $finalCacheDirectory = $temporaryCacheDirectory . 'Cache/' . $codeOrData . '/' . $this->cacheIdentifier . '/';
                if (!is_dir($finalCacheDirectory)) {
                        $this->createFinalCacheDirectory($finalCacheDirectory);
                }
@@ -106,7 +106,7 @@ class SimpleFileBackend extends \TYPO3\CMS\Core\Cache\Backend\AbstractBackend im
                $this->cacheDirectory = $finalCacheDirectory;
                $this->cacheEntryFileExtension = $cache instanceof \TYPO3\CMS\Core\Cache\Frontend\PhpFrontend ? '.php' : '';
                if (strlen($this->cacheDirectory) + 23 > \TYPO3\CMS\Core\Utility\GeneralUtility::getMaximumPathLength()) {
-                       throw new \TYPO3\CMS\Core\Cache\Exception(((((('The length of the temporary cache file path "' . $this->cacheDirectory) . '" exceeds the ') . 'maximum path length of ') . (\TYPO3\CMS\Core\Utility\GeneralUtility::getMaximumPathLength() - 23)) . '. Please consider ') . 'setting the temporaryDirectoryBase option to a shorter path.', 1248710426);
+                       throw new \TYPO3\CMS\Core\Cache\Exception('The length of the temporary cache file path "' . $this->cacheDirectory . '" exceeds the ' . 'maximum path length of ' . (\TYPO3\CMS\Core\Utility\GeneralUtility::getMaximumPathLength() - 23) . '. Please consider ' . 'setting the temporaryDirectoryBase option to a shorter path.', 1248710426);
                }
        }
 
@@ -164,7 +164,7 @@ class SimpleFileBackend extends \TYPO3\CMS\Core\Cache\Backend\AbstractBackend im
                                }
                        }
                        if (!$cacheDirectoryInBaseDir) {
-                               throw new \TYPO3\CMS\Core\Cache\Exception(('Open_basedir restriction in effect. The directory "' . $cacheDirectory) . '" is not in an allowed path.');
+                               throw new \TYPO3\CMS\Core\Cache\Exception('Open_basedir restriction in effect. The directory "' . $cacheDirectory . '" is not in an allowed path.');
                        }
                } else {
                        if ($cacheDirectory[0] == '/') {
@@ -181,7 +181,7 @@ class SimpleFileBackend extends \TYPO3\CMS\Core\Cache\Backend\AbstractBackend im
                if ($cacheDirectory[strlen($cacheDirectory) - 1] !== '/') {
                        $cacheDirectory .= '/';
                }
-               $this->temporaryCacheDirectory = (($documentRoot . $cacheDirectory) . $this->cacheIdentifier) . '/';
+               $this->temporaryCacheDirectory = $documentRoot . $cacheDirectory . $this->cacheIdentifier . '/';
        }
 
        /**
@@ -196,10 +196,10 @@ class SimpleFileBackend extends \TYPO3\CMS\Core\Cache\Backend\AbstractBackend im
                try {
                        \TYPO3\CMS\Core\Utility\GeneralUtility::mkdir_deep($finalCacheDirectory);
                } catch (\RuntimeException $e) {
-                       throw new \TYPO3\CMS\Core\Cache\Exception(('The directory "' . $finalCacheDirectory) . '" can not be created.', 1303669848, $e);
+                       throw new \TYPO3\CMS\Core\Cache\Exception('The directory "' . $finalCacheDirectory . '" can not be created.', 1303669848, $e);
                }
                if (!is_writable($finalCacheDirectory)) {
-                       throw new \TYPO3\CMS\Core\Cache\Exception(('The directory "' . $finalCacheDirectory) . '" is not writable.', 1203965200);
+                       throw new \TYPO3\CMS\Core\Cache\Exception('The directory "' . $finalCacheDirectory . '" is not writable.', 1203965200);
                }
        }
 
@@ -228,7 +228,7 @@ class SimpleFileBackend extends \TYPO3\CMS\Core\Cache\Backend\AbstractBackend im
         */
        public function set($entryIdentifier, $data, array $tags = array(), $lifetime = NULL) {
                if (!is_string($data)) {
-                       throw new \t3lib_cache_Exception_InvalidData(('The specified data is of type "' . gettype($data)) . '" but a string is expected.', 1334756734);
+                       throw new \t3lib_cache_Exception_InvalidData('The specified data is of type "' . gettype($data) . '" but a string is expected.', 1334756734);
                }
                if ($entryIdentifier !== basename($entryIdentifier)) {
                        throw new \InvalidArgumentException('The specified entry identifier must not contain a path segment.', 1334756735);
@@ -236,13 +236,13 @@ class SimpleFileBackend extends \TYPO3\CMS\Core\Cache\Backend\AbstractBackend im
                if ($entryIdentifier === '') {
                        throw new \InvalidArgumentException('The specified entry identifier must not be empty.', 1334756736);
                }
-               $temporaryCacheEntryPathAndFilename = ($this->cacheDirectory . uniqid()) . '.temp';
+               $temporaryCacheEntryPathAndFilename = $this->cacheDirectory . uniqid() . '.temp';
                $result = file_put_contents($temporaryCacheEntryPathAndFilename, $data);
                \TYPO3\CMS\Core\Utility\GeneralUtility::fixPermissions($temporaryCacheEntryPathAndFilename);
                if ($result === FALSE) {
-                       throw new \TYPO3\CMS\Core\Cache\Exception(('The temporary cache file "' . $temporaryCacheEntryPathAndFilename) . '" could not be written.', 1334756737);
+                       throw new \TYPO3\CMS\Core\Cache\Exception('The temporary cache file "' . $temporaryCacheEntryPathAndFilename . '" could not be written.', 1334756737);
                }
-               $cacheEntryPathAndFilename = ($this->cacheDirectory . $entryIdentifier) . $this->cacheEntryFileExtension;
+               $cacheEntryPathAndFilename = $this->cacheDirectory . $entryIdentifier . $this->cacheEntryFileExtension;
                rename($temporaryCacheEntryPathAndFilename, $cacheEntryPathAndFilename);
        }
 
@@ -258,7 +258,7 @@ class SimpleFileBackend extends \TYPO3\CMS\Core\Cache\Backend\AbstractBackend im
                if ($entryIdentifier !== basename($entryIdentifier)) {
                        throw new \InvalidArgumentException('The specified entry identifier must not contain a path segment.', 1334756877);
                }
-               $pathAndFilename = ($this->cacheDirectory . $entryIdentifier) . $this->cacheEntryFileExtension;
+               $pathAndFilename = $this->cacheDirectory . $entryIdentifier . $this->cacheEntryFileExtension;
                if (!file_exists($pathAndFilename)) {
                        return FALSE;
                }
@@ -277,7 +277,7 @@ class SimpleFileBackend extends \TYPO3\CMS\Core\Cache\Backend\AbstractBackend im
                if ($entryIdentifier !== basename($entryIdentifier)) {
                        throw new \InvalidArgumentException('The specified entry identifier must not contain a path segment.', 1334756878);
                }
-               return file_exists(($this->cacheDirectory . $entryIdentifier) . $this->cacheEntryFileExtension);
+               return file_exists($this->cacheDirectory . $entryIdentifier . $this->cacheEntryFileExtension);
        }
 
        /**
@@ -297,7 +297,7 @@ class SimpleFileBackend extends \TYPO3\CMS\Core\Cache\Backend\AbstractBackend im
                        throw new \InvalidArgumentException('The specified entry identifier must not be empty.', 1334756961);
                }
                try {
-                       unlink(($this->cacheDirectory . $entryIdentifier) . $this->cacheEntryFileExtension);
+                       unlink($this->cacheDirectory . $entryIdentifier . $this->cacheEntryFileExtension);
                } catch (\Exception $e) {
                        return FALSE;
                }
@@ -344,7 +344,7 @@ class SimpleFileBackend extends \TYPO3\CMS\Core\Cache\Backend\AbstractBackend im
         * @return mixed The file names (including path) as an array if one or more entries could be found, otherwise FALSE
         */
        protected function findCacheFilesByIdentifier($entryIdentifier) {
-               $pathAndFilename = ($this->cacheDirectory . $entryIdentifier) . $this->cacheEntryFileExtension;
+               $pathAndFilename = $this->cacheDirectory . $entryIdentifier . $this->cacheEntryFileExtension;
                return file_exists($pathAndFilename) ? array($pathAndFilename) : FALSE;
        }
 
@@ -357,7 +357,7 @@ class SimpleFileBackend extends \TYPO3\CMS\Core\Cache\Backend\AbstractBackend im
         * @api
         */
        public function requireOnce($entryIdentifier) {
-               $pathAndFilename = ($this->cacheDirectory . $entryIdentifier) . $this->cacheEntryFileExtension;
+               $pathAndFilename = $this->cacheDirectory . $entryIdentifier . $this->cacheEntryFileExtension;
                if ($entryIdentifier !== basename($entryIdentifier)) {
                        throw new \InvalidArgumentException('The specified entry identifier must not contain a path segment.', 1282073036);
                }
index d0c6aa2..2bb2417 100644 (file)
@@ -62,7 +62,7 @@ class TransientMemoryBackend extends \TYPO3\CMS\Core\Cache\Backend\AbstractBacke
                        throw new \TYPO3\CMS\Core\Cache\Exception('No cache frontend has been set yet via setCache().', 1238244992);
                }
                if (!is_string($data)) {
-                       throw new \TYPO3\CMS\Core\Cache\Exception\InvalidDataException(('The specified data is of type "' . gettype($data)) . '" but a string is expected.', 1238244993);
+                       throw new \TYPO3\CMS\Core\Cache\Exception\InvalidDataException('The specified data is of type "' . gettype($data) . '" but a string is expected.', 1238244993);
                }
                $this->entries[$entryIdentifier] = $data;
                foreach ($tags as $tag) {
index 98cf8cd..bb6fd5b 100644 (file)
@@ -103,7 +103,7 @@ class Typo3DatabaseBackend extends \TYPO3\CMS\Core\Cache\Backend\AbstractBackend
        public function setCache(\TYPO3\CMS\Core\Cache\Frontend\FrontendInterface $cache) {
                parent::setCache($cache);
                $this->cacheTable = 'cf_' . $this->cacheIdentifier;
-               $this->tagsTable = ('cf_' . $this->cacheIdentifier) . '_tags';
+               $this->tagsTable = 'cf_' . $this->cacheIdentifier . '_tags';
                $this->initializeCommonReferences();
        }
 
@@ -116,10 +116,10 @@ class Typo3DatabaseBackend extends \TYPO3\CMS\Core\Cache\Backend\AbstractBackend
                $this->identifierField = $this->cacheTable . '.identifier';
                $this->expiresField = $this->cacheTable . '.expires';
                $this->maximumLifetime = self::FAKED_UNLIMITED_EXPIRE - $GLOBALS['EXEC_TIME'];
-               $this->tableList = ($this->cacheTable . ', ') . $this->tagsTable;
-               $this->tableJoin = (($this->identifierField . ' = ') . $this->tagsTable) . '.identifier';
-               $this->expiredStatement = ($this->expiresField . ' < ') . $GLOBALS['EXEC_TIME'];
-               $this->notExpiredStatement = ($this->expiresField . ' >= ') . $GLOBALS['EXEC_TIME'];
+               $this->tableList = $this->cacheTable . ', ' . $this->tagsTable;
+               $this->tableJoin = $this->identifierField . ' = ' . $this->tagsTable . '.identifier';
+               $this->expiredStatement = $this->expiresField . ' < ' . $GLOBALS['EXEC_TIME'];
+               $this->notExpiredStatement = $this->expiresField . ' >= ' . $GLOBALS['EXEC_TIME'];
        }
 
        /**
@@ -136,7 +136,7 @@ class Typo3DatabaseBackend extends \TYPO3\CMS\Core\Cache\Backend\AbstractBackend
        public function set($entryIdentifier, $data, array $tags = array(), $lifetime = NULL) {
                $this->throwExceptionIfFrontendDoesNotExist();
                if (!is_string($data)) {
-                       throw new \TYPO3\CMS\Core\Cache\Exception\InvalidDataException(('The specified data is of type "' . gettype($data)) . '" but a string is expected.', 1236518298);
+                       throw new \TYPO3\CMS\Core\Cache\Exception\InvalidDataException('The specified data is of type "' . gettype($data) . '" but a string is expected.', 1236518298);
                }
                if (is_null($lifetime)) {
                        $lifetime = $this->defaultLifetime;
@@ -178,7 +178,7 @@ class Typo3DatabaseBackend extends \TYPO3\CMS\Core\Cache\Backend\AbstractBackend
        public function get($entryIdentifier) {
                $this->throwExceptionIfFrontendDoesNotExist();
                $cacheEntry = FALSE;
-               $cacheEntry = $GLOBALS['TYPO3_DB']->exec_SELECTgetSingleRow('content', $this->cacheTable, (('identifier = ' . $GLOBALS['TYPO3_DB']->fullQuoteStr($entryIdentifier, $this->cacheTable)) . ' AND ') . $this->notExpiredStatement);
+               $cacheEntry = $GLOBALS['TYPO3_DB']->exec_SELECTgetSingleRow('content', $this->cacheTable, 'identifier = ' . $GLOBALS['TYPO3_DB']->fullQuoteStr($entryIdentifier, $this->cacheTable) . ' AND ' . $this->notExpiredStatement);
                if (is_array($cacheEntry)) {
                        $cacheEntry = $cacheEntry['content'];
                }
@@ -197,7 +197,7 @@ class Typo3DatabaseBackend extends \TYPO3\CMS\Core\Cache\Backend\AbstractBackend
        public function has($entryIdentifier) {
                $this->throwExceptionIfFrontendDoesNotExist();
                $hasEntry = FALSE;
-               $cacheEntries = $GLOBALS['TYPO3_DB']->exec_SELECTcountRows('*', $this->cacheTable, (('identifier = ' . $GLOBALS['TYPO3_DB']->fullQuoteStr($entryIdentifier, $this->cacheTable)) . ' AND ') . $this->notExpiredStatement);
+               $cacheEntries = $GLOBALS['TYPO3_DB']->exec_SELECTcountRows('*', $this->cacheTable, 'identifier = ' . $GLOBALS['TYPO3_DB']->fullQuoteStr($entryIdentifier, $this->cacheTable) . ' AND ' . $this->notExpiredStatement);
                if ($cacheEntries >= 1) {
                        $hasEntry = TRUE;
                }
@@ -231,7 +231,7 @@ class Typo3DatabaseBackend extends \TYPO3\CMS\Core\Cache\Backend\AbstractBackend
        public function findIdentifiersByTag($tag) {
                $this->throwExceptionIfFrontendDoesNotExist();
                $cacheEntryIdentifiers = array();
-               $cacheEntryIdentifierRows = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows($this->identifierField, $this->tableList, ((((($this->tagsTable . '.tag = ') . $GLOBALS['TYPO3_DB']->fullQuoteStr($tag, $this->tagsTable)) . ' AND ') . $this->tableJoin) . ' AND ') . $this->notExpiredStatement, $this->identifierField);
+               $cacheEntryIdentifierRows = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows($this->identifierField, $this->tableList, $this->tagsTable . '.tag = ' . $GLOBALS['TYPO3_DB']->fullQuoteStr($tag, $this->tagsTable) . ' AND ' . $this->tableJoin . ' AND ' . $this->notExpiredStatement, $this->identifierField);
                foreach ($cacheEntryIdentifierRows as $cacheEntryIdentifierRow) {
                        $cacheEntryIdentifiers[$cacheEntryIdentifierRow['identifier']] = $cacheEntryIdentifierRow['identifier'];
                }
@@ -257,7 +257,7 @@ class Typo3DatabaseBackend extends \TYPO3\CMS\Core\Cache\Backend\AbstractBackend
         */
        public function flushByTag($tag) {
                $this->throwExceptionIfFrontendDoesNotExist();
-               $tagsTableWhereClause = ($this->tagsTable . '.tag = ') . $GLOBALS['TYPO3_DB']->fullQuoteStr($tag, $this->tagsTable);
+               $tagsTableWhereClause = $this->tagsTable . '.tag = ' . $GLOBALS['TYPO3_DB']->fullQuoteStr($tag, $this->tagsTable);
                $this->deleteCacheTableRowsByTagsTableWhereClause($tagsTableWhereClause);
                $GLOBALS['TYPO3_DB']->exec_DELETEquery($this->tagsTable, $tagsTableWhereClause);
        }
@@ -278,7 +278,7 @@ class Typo3DatabaseBackend extends \TYPO3\CMS\Core\Cache\Backend\AbstractBackend
                $GLOBALS['TYPO3_DB']->sql_free_result($tagsEntryIdentifierRowsResource);
                // Delete tag rows connected to expired cache entries
                if (count($tagsEntryIdentifiers)) {
-                       $GLOBALS['TYPO3_DB']->exec_DELETEquery($this->tagsTable, ('identifier IN (' . implode(', ', $tagsEntryIdentifiers)) . ')');
+                       $GLOBALS['TYPO3_DB']->exec_DELETEquery($this->tagsTable, 'identifier IN (' . implode(', ', $tagsEntryIdentifiers) . ')');
                }
                // Delete expired cache rows
                $GLOBALS['TYPO3_DB']->exec_DELETEquery($this->cacheTable, $this->expiredStatement);
@@ -347,7 +347,7 @@ class Typo3DatabaseBackend extends \TYPO3\CMS\Core\Cache\Backend\AbstractBackend
         */
        public function getTableDefinitions() {
                $cacheTableSql = file_get_contents(PATH_t3lib . 'cache/backend/resources/dbbackend-layout-cache.sql');
-               $requiredTableStructures = (str_replace('###CACHE_TABLE###', $this->cacheTable, $cacheTableSql) . LF) . LF;
+               $requiredTableStructures = str_replace('###CACHE_TABLE###', $this->cacheTable, $cacheTableSql) . LF . LF;
                $tagsTableSql = file_get_contents(PATH_t3lib . 'cache/backend/resources/dbbackend-layout-tags.sql');
                $requiredTableStructures .= str_replace('###TAGS_TABLE###', $this->tagsTable, $tagsTableSql) . LF;
                return $requiredTableStructures;
@@ -367,7 +367,7 @@ class Typo3DatabaseBackend extends \TYPO3\CMS\Core\Cache\Backend\AbstractBackend
                }
                $GLOBALS['TYPO3_DB']->sql_free_result($cacheEntryIdentifierRowsResource);
                if (count($cacheEntryIdentifiers)) {
-                       $GLOBALS['TYPO3_DB']->exec_DELETEquery($this->cacheTable, ('identifier IN (' . implode(', ', $cacheEntryIdentifiers)) . ')');
+                       $GLOBALS['TYPO3_DB']->exec_DELETEquery($this->cacheTable, 'identifier IN (' . implode(', ', $cacheEntryIdentifiers) . ')');
                }
        }
 
index d6960d4..263584b 100644 (file)
@@ -86,7 +86,7 @@ class WincacheBackend extends \TYPO3\CMS\Core\Cache\Backend\AbstractBackend impl
                        throw new \TYPO3\CMS\Core\Cache\Exception('No cache frontend has been set yet via setCache().', 1343331521);
                }
                if (!is_string($data)) {
-                       throw new \TYPO3\CMS\Core\Cache\Exception\InvalidDataException(('The specified data is of type "' . gettype($data)) . '" but a string is expected.', 1343331522);
+                       throw new \TYPO3\CMS\Core\Cache\Exception\InvalidDataException('The specified data is of type "' . gettype($data) . '" but a string is expected.', 1343331522);
                }
                $tags[] = '%WCBE%' . $this->cache->getIdentifier();
                $expiration = $lifetime !== NULL ? $lifetime : $this->defaultLifetime;
@@ -145,7 +145,7 @@ class WincacheBackend extends \TYPO3\CMS\Core\Cache\Backend\AbstractBackend impl
         */
        public function findIdentifiersByTag($tag) {
                $success = FALSE;
-               $identifiers = wincache_ucache_get(($this->identifierPrefix . 'tag_') . $tag, $success);
+               $identifiers = wincache_ucache_get($this->identifierPrefix . 'tag_' . $tag, $success);
                if ($success === FALSE) {
                        return array();
                } else {
@@ -162,7 +162,7 @@ class WincacheBackend extends \TYPO3\CMS\Core\Cache\Backend\AbstractBackend impl
         */
        protected function findTagsByIdentifier($identifier) {
                $success = FALSE;
-               $tags = wincache_ucache_get(($this->identifierPrefix . 'ident_') . $identifier, $success);
+               $tags = wincache_ucache_get($this->identifierPrefix . 'ident_' . $identifier, $success);
                return $success ? (array) $tags : array();
        }
 
@@ -217,12 +217,12 @@ class WincacheBackend extends \TYPO3\CMS\Core\Cache\Backend\AbstractBackend impl
                        $identifiers = $this->findIdentifiersByTag($tag);
                        if (array_search($entryIdentifier, $identifiers) === FALSE) {
                                $identifiers[] = $entryIdentifier;
-                               wincache_ucache_set(($this->identifierPrefix . 'tag_') . $tag, $identifiers);
+                               wincache_ucache_set($this->identifierPrefix . 'tag_' . $tag, $identifiers);
                        }
                        // Update identifier-to-tag index
                        $existingTags = $this->findTagsByIdentifier($entryIdentifier);
                        if (array_search($entryIdentifier, $existingTags) === FALSE) {
-                               wincache_ucache_set(($this->identifierPrefix . 'ident_') . $entryIdentifier, array_merge($existingTags, $tags));
+                               wincache_ucache_set($this->identifierPrefix . 'ident_' . $entryIdentifier, array_merge($existingTags, $tags));
                        }
                }
        }
@@ -247,14 +247,14 @@ class WincacheBackend extends \TYPO3\CMS\Core\Cache\Backend\AbstractBackend impl
                        if (($key = array_search($entryIdentifier, $identifiers)) !== FALSE) {
                                unset($identifiers[$key]);
                                if (count($identifiers)) {
-                                       wincache_ucache_set(($this->identifierPrefix . 'tag_') . $tag, $identifiers);
+                                       wincache_ucache_set($this->identifierPrefix . 'tag_' . $tag, $identifiers);
                                } else {
-                                       wincache_ucache_delete(($this->identifierPrefix . 'tag_') . $tag);
+                                       wincache_ucache_delete($this->identifierPrefix . 'tag_' . $tag);
                                }
                        }
                }
                // Clear reverse tag index for this identifier
-               wincache_ucache_delete(($this->identifierPrefix . 'ident_') . $entryIdentifier);
+               wincache_ucache_delete($this->identifierPrefix . 'ident_' . $entryIdentifier);
        }
 
        /**
index b7d3fe8..fcff780 100644 (file)
@@ -63,7 +63,7 @@ class Cache {
         * @return boolean True if caching framework is initialized
         */
        static public function isCachingFrameworkInitialized() {
-               if ((((!self::$isCachingFrameworkInitialized && isset($GLOBALS['typo3CacheManager'])) && $GLOBALS['typo3CacheManager'] instanceof \TYPO3\CMS\Core\Cache\CacheManager) && isset($GLOBALS['typo3CacheFactory'])) && $GLOBALS['typo3CacheFactory'] instanceof \TYPO3\CMS\Core\Cache\CacheFactory) {
+               if (!self::$isCachingFrameworkInitialized && isset($GLOBALS['typo3CacheManager']) && $GLOBALS['typo3CacheManager'] instanceof \TYPO3\CMS\Core\Cache\CacheManager && isset($GLOBALS['typo3CacheFactory']) && $GLOBALS['typo3CacheFactory'] instanceof \TYPO3\CMS\Core\Cache\CacheFactory) {
                        self::$isCachingFrameworkInitialized = TRUE;
                }
                return self::$isCachingFrameworkInitialized;
index 8524cf8..cabe7b2 100644 (file)
@@ -86,7 +86,7 @@ class CacheFactory implements \TYPO3\CMS\Core\SingletonInterface {
                $backendObjectName = '\\' . ltrim($backendObjectName, '\\');
                $backend = new $backendObjectName($this->context, $backendOptions);
                if (!$backend instanceof \TYPO3\CMS\Core\Cache\Backend\BackendInterface) {
-                       throw new \TYPO3\CMS\Core\Cache\Exception\InvalidBackendException(('"' . $backendObjectName) . '" is not a valid cache backend object.', 1216304301);
+                       throw new \TYPO3\CMS\Core\Cache\Exception\InvalidBackendException('"' . $backendObjectName . '" is not a valid cache backend object.', 1216304301);
                }
                if (is_callable(array($backend, 'initializeObject'))) {
                        $backend->initializeObject();
@@ -94,7 +94,7 @@ class CacheFactory implements \TYPO3\CMS\Core\SingletonInterface {
                // New used on purpose, see comment above
                $cache = new $cacheObjectName($cacheIdentifier, $backend);
                if (!$cache instanceof \TYPO3\CMS\Core\Cache\Frontend\FrontendInterface) {
-                       throw new \TYPO3\CMS\Core\Cache\Exception\InvalidCacheException(('"' . $cacheObjectName) . '" is not a valid cache frontend object.', 1216304300);
+                       throw new \TYPO3\CMS\Core\Cache\Exception\InvalidCacheException('"' . $cacheObjectName . '" is not a valid cache frontend object.', 1216304300);
                }
                if (is_callable(array($cache, 'initializeObject'))) {
                        $cache->initializeObject();
index 2cd98b2..3652dca 100644 (file)
@@ -87,7 +87,7 @@ class CacheManager implements \TYPO3\CMS\Core\SingletonInterface {
        public function setCacheConfigurations(array $cacheConfigurations) {
                foreach ($cacheConfigurations as $identifier => $configuration) {
                        if (!is_array($configuration)) {
-                               throw new \InvalidArgumentException(('The cache configuration for cache "' . $identifier) . '" was not an array as expected.', 1231259656);
+                               throw new \InvalidArgumentException('The cache configuration for cache "' . $identifier . '" was not an array as expected.', 1231259656);
                        }
                        $this->cacheConfigurations[$identifier] = $configuration;
                }
@@ -104,7 +104,7 @@ class CacheManager implements \TYPO3\CMS\Core\SingletonInterface {
        public function registerCache(\TYPO3\CMS\Core\Cache\Frontend\FrontendInterface $cache) {
                $identifier = $cache->getIdentifier();
                if (isset($this->caches[$identifier])) {
-                       throw new \TYPO3\CMS\Core\Cache\Exception\DuplicateIdentifierException(('A cache with identifier "' . $identifier) . '" has already been registered.', 1203698223);
+                       throw new \TYPO3\CMS\Core\Cache\Exception\DuplicateIdentifierException('A cache with identifier "' . $identifier . '" has already been registered.', 1203698223);
                }
                $this->caches[$identifier] = $cache;
        }
@@ -119,7 +119,7 @@ class CacheManager implements \TYPO3\CMS\Core\SingletonInterface {
         */
        public function getCache($identifier) {
                if ($this->hasCache($identifier) === FALSE) {
-                       throw new \TYPO3\CMS\Core\Cache\Exception\NoSuchCacheException(('A cache with identifier "' . $identifier) . '" does not exist.', 1203699034);
+                       throw new \TYPO3\CMS\Core\Cache\Exception\NoSuchCacheException('A cache with identifier "' . $identifier . '" does not exist.', 1203699034);
                }
                if (!isset($this->caches[$identifier])) {
                        $this->createCache($identifier);
@@ -195,7 +195,7 @@ class CacheManager implements \TYPO3\CMS\Core\SingletonInterface {
                                $pathAndFilename = str_replace(FLOW3_PATH_PACKAGES, '', $pathAndFilename);
                                $matches = array();
                                if (preg_match('/[^\\/]+\\/(.+)\\/(Classes|Tests)\\/(.+)\\.php/', $pathAndFilename, $matches) === 1) {
-                                       $classNameWithUnderscores = str_replace('/', '_', (($matches[1] . '_') . ($matches[2] === 'Tests' ? 'Tests_' : '')) . $matches[3]);
+                                       $classNameWithUnderscores = str_replace('/', '_', $matches[1] . '_' . ($matches[2] === 'Tests' ? 'Tests_' : '') . $matches[3]);
                                        $classNameWithUnderscores = str_replace('.', '_', $classNameWithUnderscores);
                                        $modifiedClassNamesWithUnderscores[$classNameWithUnderscores] = TRUE;
                                        // If an aspect was modified, the whole code cache needs to be flushed, so keep track of them:
index c14decc..8e365e8 100644 (file)
@@ -57,7 +57,7 @@ abstract class AbstractFrontend implements \TYPO3\CMS\Core\Cache\Frontend\Fronte
         */
        public function __construct($identifier, \TYPO3\CMS\Core\Cache\Backend\BackendInterface $backend) {
                if (preg_match(self::PATTERN_ENTRYIDENTIFIER, $identifier) !== 1) {
-                       throw new \InvalidArgumentException(('"' . $identifier) . '" is not a valid cache identifier.', 1203584729);
+                       throw new \InvalidArgumentException('"' . $identifier . '" is not a valid cache identifier.', 1203584729);
                }
                $this->identifier = $identifier;
                $this->backend = $backend;
@@ -94,7 +94,7 @@ abstract class AbstractFrontend implements \TYPO3\CMS\Core\Cache\Frontend\Fronte
         */
        public function has($entryIdentifier) {
                if (!$this->isValidEntryIdentifier($entryIdentifier)) {
-                       throw new \InvalidArgumentException(('"' . $entryIdentifier) . '" is not a valid cache entry identifier.', 1233058486);
+                       throw new \InvalidArgumentException('"' . $entryIdentifier . '" is not a valid cache entry identifier.', 1233058486);
                }
                return $this->backend->has($entryIdentifier);
        }
@@ -109,7 +109,7 @@ abstract class AbstractFrontend implements \TYPO3\CMS\Core\Cache\Frontend\Fronte
         */
        public function remove($entryIdentifier) {
                if (!$this->isValidEntryIdentifier($entryIdentifier)) {
-                       throw new \InvalidArgumentException(('"' . $entryIdentifier) . '" is not a valid cache entry identifier.', 1233058495);
+                       throw new \InvalidArgumentException('"' . $entryIdentifier . '" is not a valid cache entry identifier.', 1233058495);
                }
                return $this->backend->remove($entryIdentifier);
        }
@@ -134,7 +134,7 @@ abstract class AbstractFrontend implements \TYPO3\CMS\Core\Cache\Frontend\Fronte
         */
        public function flushByTag($tag) {
                if (!$this->isValidTag($tag)) {
-                       throw new \InvalidArgumentException(('"' . $tag) . '" is not a valid tag for a cache entry.', 1233057359);
+                       throw new \InvalidArgumentException('"' . $tag . '" is not a valid tag for a cache entry.', 1233057359);
                }
                if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/cache/frontend/class.t3lib_cache_frontend_abstractfrontend.php']['flushByTag'])) {
                        foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/cache/frontend/class.t3lib_cache_frontend_abstractfrontend.php']['flushByTag'] as $_funcRef) {
index e89ec14..69ce908 100644 (file)
@@ -59,17 +59,17 @@ class PhpFrontend extends \TYPO3\CMS\Core\Cache\Frontend\StringFrontend {
         */
        public function set($entryIdentifier, $sourceCode, array $tags = array(), $lifetime = NULL) {
                if (!$this->isValidEntryIdentifier($entryIdentifier)) {
-                       throw new \InvalidArgumentException(('"' . $entryIdentifier) . '" is not a valid cache entry identifier.', 1264023823);
+                       throw new \InvalidArgumentException('"' . $entryIdentifier . '" is not a valid cache entry identifier.', 1264023823);
                }
                if (!is_string($sourceCode)) {
                        throw new \TYPO3\CMS\Core\Cache\Exception\InvalidDataException('The given source code is not a valid string.', 1264023824);
                }
                foreach ($tags as $tag) {
                        if (!$this->isValidTag($tag)) {
-                               throw new \InvalidArgumentException(('"' . $tag) . '" is not a valid tag for a cache entry.', 1264023825);
+                               throw new \InvalidArgumentException('"' . $tag . '" is not a valid tag for a cache entry.', 1264023825);
                        }
                }
-               $sourceCode = ((('<?php' . chr(10)) . $sourceCode) . chr(10)) . '#';
+               $sourceCode = '<?php' . chr(10) . $sourceCode . chr(10) . '#';
                $this->backend->set($entryIdentifier, $sourceCode, $tags, $lifetime);
        }
 
index 52bb58e..35051fa 100644 (file)
@@ -49,14 +49,14 @@ class StringFrontend extends \TYPO3\CMS\Core\Cache\Frontend\AbstractFrontend {
         */
        public function set($entryIdentifier, $string, array $tags = array(), $lifetime = NULL) {
                if (!$this->isValidEntryIdentifier($entryIdentifier)) {
-                       throw new \InvalidArgumentException(('"' . $entryIdentifier) . '" is not a valid cache entry identifier.', 1233057566);
+                       throw new \InvalidArgumentException('"' . $entryIdentifier . '" is not a valid cache entry identifier.', 1233057566);
                }
                if (!is_string($string)) {
-                       throw new \TYPO3\CMS\Core\Cache\Exception\InvalidDataException(('Given data is of type "' . gettype($string)) . '", but a string is expected for string cache.', 1222808333);
+                       throw new \TYPO3\CMS\Core\Cache\Exception\InvalidDataException('Given data is of type "' . gettype($string) . '", but a string is expected for string cache.', 1222808333);
                }
                foreach ($tags as $tag) {
                        if (!$this->isValidTag($tag)) {
-                               throw new \InvalidArgumentException(('"' . $tag) . '" is not a valid tag for a cache entry.', 1233057512);
+                               throw new \InvalidArgumentException('"' . $tag . '" is not a valid tag for a cache entry.', 1233057512);
                        }
                }
                $this->backend->set($entryIdentifier, $string, $tags, $lifetime);
@@ -72,7 +72,7 @@ class StringFrontend extends \TYPO3\CMS\Core\Cache\Frontend\AbstractFrontend {
         */
        public function get($entryIdentifier) {
                if (!$this->isValidEntryIdentifier($entryIdentifier)) {
-                       throw new \InvalidArgumentException(('"' . $entryIdentifier) . '" is not a valid cache entry identifier.', 1233057752);
+                       throw new \InvalidArgumentException('"' . $entryIdentifier . '" is not a valid cache entry identifier.', 1233057752);
                }
                return $this->backend->get($entryIdentifier);
        }
@@ -87,7 +87,7 @@ class StringFrontend extends \TYPO3\CMS\Core\Cache\Frontend\AbstractFrontend {
         */
        public function getByTag($tag) {
                if (!$this->isValidTag($tag)) {
-                       throw new \InvalidArgumentException(('"' . $tag) . '" is not a valid tag for a cache entry.', 1233057772);
+                       throw new \InvalidArgumentException('"' . $tag . '" is not a valid tag for a cache entry.', 1233057772);
                }
                $entries = array();
                $identifiers = $this->backend->findIdentifiersByTag($tag);
index 90b3d9b..2082c48 100644 (file)
@@ -67,11 +67,11 @@ class VariableFrontend extends \TYPO3\CMS\Core\Cache\Frontend\AbstractFrontend {
         */
        public function set($entryIdentifier, $variable, array $tags = array(), $lifetime = NULL) {
                if (!$this->isValidEntryIdentifier($entryIdentifier)) {
-                       throw new \InvalidArgumentException(('"' . $entryIdentifier) . '" is not a valid cache entry identifier.', 1233058264);
+                       throw new \InvalidArgumentException('"' . $entryIdentifier . '" is not a valid cache entry identifier.', 1233058264);
                }
                foreach ($tags as $tag) {
                        if (!$this->isValidTag($tag)) {
-                               throw new \InvalidArgumentException(('"' . $tag) . '" is not a valid tag for a cache entry.', 1233058269);
+                               throw new \InvalidArgumentException('"' . $tag . '" is not a valid tag for a cache entry.', 1233058269);
                        }
                }
                if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/cache/frontend/class.t3lib_Cache\Frontend\VariableFrontend.php']['set'])) {
@@ -102,7 +102,7 @@ class VariableFrontend extends \TYPO3\CMS\Core\Cache\Frontend\AbstractFrontend {
         */
        public function get($entryIdentifier) {
                if (!$this->isValidEntryIdentifier($entryIdentifier)) {
-                       throw new \InvalidArgumentException(('"' . $entryIdentifier) . '" is not a valid cache entry identifier.', 1233058294);
+                       throw new \InvalidArgumentException('"' . $entryIdentifier . '" is not a valid cache entry identifier.', 1233058294);
                }
                $rawResult = $this->backend->get($entryIdentifier);
                if ($rawResult === FALSE) {
@@ -122,7 +122,7 @@ class VariableFrontend extends \TYPO3\CMS\Core\Cache\Frontend\AbstractFrontend {
         */
        public function getByTag($tag) {
                if (!$this->isValidTag($tag)) {
-                       throw new \InvalidArgumentException(('"' . $tag) . '" is not a valid tag for a cache entry.', 1233058312);
+                       throw new \InvalidArgumentException('"' . $tag . '" is not a valid tag for a cache entry.', 1233058312);
                }
                $entries = array();
                $identifiers = $this->backend->findIdentifiersByTag($tag);
index 8e510be..f9f1c21 100644 (file)
@@ -59,7 +59,7 @@ class CategoryRegistry implements \TYPO3\CMS\Core\SingletonInterface {
         * Creates this object.
         */
        public function __construct() {
-               $this->template = (((((str_repeat(PHP_EOL, 3) . 'CREATE TABLE %s (') . PHP_EOL) . '  %s int(11) DEFAULT \'0\' NOT NULL') . PHP_EOL) . ');') . str_repeat(PHP_EOL, 3);
+               $this->template = str_repeat(PHP_EOL, 3) . 'CREATE TABLE %s (' . PHP_EOL . '  %s int(11) DEFAULT \'0\' NOT NULL' . PHP_EOL . ');' . str_repeat(PHP_EOL, 3);
        }
 
        /**
index bcb239e..ce992a0 100644 (file)
@@ -88,7 +88,7 @@ class CategoryCollection extends \TYPO3\CMS\Core\Collection\AbstractRecordCollec
         */
        static public function load($id, $fillItems = FALSE, $tableName = '') {
                \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA(static::$storageTableName);
-               $collectionRecord = $GLOBALS['TYPO3_DB']->exec_SELECTgetSingleRow('*', static::$storageTableName, ('uid=' . intval($id)) . \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause(static::$storageTableName));
+               $collectionRecord = $GLOBALS['TYPO3_DB']->exec_SELECTgetSingleRow('*', static::$storageTableName, 'uid=' . intval($id) . \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause(static::$storageTableName));
                $collectionRecord['table_name'] = $tableName;
                return self::create($collectionRecord, $fillItems);
        }
@@ -103,7 +103,7 @@ class CategoryCollection extends \TYPO3\CMS\Core\Collection\AbstractRecordCollec
        protected function getCollectedRecords() {
                $relatedRecords = array();
                /** @var $GLOBALS['TYPO3_DB'] \TYPO3\CMS\Core\Database\DatabaseConnection */
-               $resource = $this->getDatabase()->exec_SELECT_mm_query($this->getItemTableName() . '.*', self::$storageTableName, 'sys_category_record_mm', $this->getItemTableName(), (('AND ' . self::$storageTableName) . '.uid=') . intval($this->getIdentifier()));
+               $resource = $this->getDatabase()->exec_SELECT_mm_query($this->getItemTableName() . '.*', self::$storageTableName, 'sys_category_record_mm', $this->getItemTableName(), 'AND ' . self::$storageTableName . '.uid=' . intval($this->getIdentifier()));
                if ($resource) {
                        while ($record = $this->getDatabase()->sql_fetch_assoc($resource)) {
                                $relatedRecords[] = $record;
index 2be6aab..01f9d78 100644 (file)
@@ -719,7 +719,7 @@ class CharsetConverter {
                                }
                                break;
                        case 'recode':
-                               $conv_str = recode_string(($fromCS . '..') . $toCS, $str);
+                               $conv_str = recode_string($fromCS . '..' . $toCS, $str);
                                if (FALSE !== $conv_str) {
                                        return $conv_str;
                                }
@@ -870,7 +870,7 @@ class CharsetConverter {
                                                        }
                                                } elseif ($useEntityForNoChar) {
                                                        // Create num entity:
-                                                       $outStr .= ('&#' . $this->utf8CharToUnumber($buf, 1)) . ';';
+                                                       $outStr .= '&#' . $this->utf8CharToUnumber($buf, 1) . ';';
                                                } else {
                                                        $outStr .= chr($this->noCharByteVal);
                                                }
@@ -919,7 +919,7 @@ class CharsetConverter {
                                                        break;
                                                }
                                        }
-                                       $outStr .= ('&#' . $this->utf8CharToUnumber($buf, 1)) . ';';
+                                       $outStr .= '&#' . $this->utf8CharToUnumber($buf, 1) . ';';
                                } else {
                                        $outStr .= chr($this->noCharByteVal);
                                }
@@ -943,7 +943,7 @@ class CharsetConverter {
                        $trans_tbl = array_flip(get_html_translation_table(HTML_ENTITIES, ENT_COMPAT, 'UTF-8'));
                }
                $token = md5(microtime());
-               $parts = explode($token, preg_replace('/(&([#[:alnum:]]*);)/', ($token . '${2}') . $token, $str));
+               $parts = explode($token, preg_replace('/(&([#[:alnum:]]*);)/', $token . '${2}' . $token, $str));
                foreach ($parts as $k => $v) {
                        // Only take every second element
                        if ($k % 2 === 0) {
@@ -959,12 +959,12 @@ class CharsetConverter {
                                        $v = substr($v, $position);
                                }
                                $parts[$k] = $this->UnumberToChar($v);
-                       } elseif ($alsoStdHtmlEnt && isset($trans_tbl[('&' . $v) . ';'])) {
+                       } elseif ($alsoStdHtmlEnt && isset($trans_tbl['&' . $v . ';'])) {
                                // Other entities:
-                               $parts[$k] = $trans_tbl[('&' . $v) . ';'];
+                               $parts[$k] = $trans_tbl['&' . $v . ';'];
                        } else {
                                // No conversion:
-                               $parts[$k] = ('&' . $v) . ';';
+                               $parts[$k] = '&' . $v . ';';
                        }
                }
                return implode('', $parts);
@@ -1144,12 +1144,12 @@ class CharsetConverter {
                // Only process if the charset is not yet loaded:
                if (!is_array($this->parsedCharsets[$charset])) {
                        // Conversion table filename:
-                       $charsetConvTableFile = ((PATH_t3lib . 'csconvtbl/') . $charset) . '.tbl';
+                       $charsetConvTableFile = PATH_t3lib . 'csconvtbl/' . $charset . '.tbl';
                        // If the conversion table is found:
-                       if (($charset && \TYPO3\CMS\Core\Utility\GeneralUtility::validPathStr($charsetConvTableFile)) && @is_file($charsetConvTableFile)) {
+                       if ($charset && \TYPO3\CMS\Core\Utility\GeneralUtility::validPathStr($charsetConvTableFile) && @is_file($charsetConvTableFile)) {
                                // Cache file for charsets:
                                // Caching brought parsing time for gb2312 down from 2400 ms to 150 ms. For other charsets we are talking 11 ms down to zero.
-                               $cacheFile = \TYPO3\CMS\Core\Utility\GeneralUtility::getFileAbsFileName(('typo3temp/cs/charset_' . $charset) . '.tbl');
+                               $cacheFile = \TYPO3\CMS\Core\Utility\GeneralUtility::getFileAbsFileName('typo3temp/cs/charset_' . $charset . '.tbl');
                                if ($cacheFile && @is_file($cacheFile)) {
                                        $this->parsedCharsets[$charset] = unserialize(\TYPO3\CMS\Core\Utility\GeneralUtility::getUrl($cacheFile));
                                } else {
@@ -1304,11 +1304,11 @@ class CharsetConverter {
                                switch ($match[1]) {
                                case '<circle>':
                                        // add parenthesis as circle replacement, eg (1)
-                                       $match[2] = ('0028 ' . $match[2]) . ' 0029';
+                                       $match[2] = '0028 ' . $match[2] . ' 0029';
                                        break;
                                case '<square>':
                                        // add square brackets as square replacement, eg [1]
-                                       $match[2] = ('005B ' . $match[2]) . ' 005D';
+                                       $match[2] = '005B ' . $match[2] . ' 005D';
                                        break;
                                case '<compat>':
                                        // ignore multi char decompositions that start with a space
@@ -1454,7 +1454,7 @@ class CharsetConverter {
                        return 1;
                }
                // Use cached version if possible
-               $cacheFile = \TYPO3\CMS\Core\Utility\GeneralUtility::getFileAbsFileName(('typo3temp/cs/cscase_' . $charset) . '.tbl');
+               $cacheFile = \TYPO3\CMS\Core\Utility\GeneralUtility::getFileAbsFileName('typo3temp/cs/cscase_' . $charset . '.tbl');
                if ($cacheFile && @is_file($cacheFile)) {
                        $this->caseFolding[$charset] = unserialize(\TYPO3\CMS\Core\Utility\GeneralUtility::getUrl($cacheFile));
                        return 2;
@@ -1512,7 +1512,7 @@ class CharsetConverter {
                        return 1;
                }
                // Use cached version if possible
-               $cacheFile = \TYPO3\CMS\Core\Utility\GeneralUtility::getFileAbsFileName(('typo3temp/cs/csascii_' . $charset) . '.tbl');
+               $cacheFile = \TYPO3\CMS\Core\Utility\GeneralUtility::getFileAbsFileName('typo3temp/cs/csascii_' . $charset . '.tbl');
                if ($cacheFile && @is_file($cacheFile)) {
                        $this->toASCII[$charset] = unserialize(\TYPO3\CMS\Core\Utility\GeneralUtility::getUrl($cacheFile));
                        return 2;
index 87944d8..60eb7cd 100644 (file)
@@ -322,7 +322,7 @@ abstract class AbstractRecordCollection implements \TYPO3\CMS\Core\Collection\Re
         */
        static public function load($id, $fillItems = FALSE) {
                \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA(static::$storageTableName);
-               $collectionRecord = $GLOBALS['TYPO3_DB']->exec_SELECTgetSingleRow('*', static::$storageTableName, ('uid=' . intval($id)) . \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause(static::$storageTableName));
+               $collectionRecord = $GLOBALS['TYPO3_DB']->exec_SELECTgetSingleRow('*', static::$storageTableName, 'uid=' . intval($id) . \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause(static::$storageTableName));
                return self::create($collectionRecord, $fillItems);
        }
 
index e368e64..5a88d0a 100644 (file)
@@ -61,7 +61,7 @@ class RecordCollectionRepository {
         */
        public function findByUid($uid) {
                $result = NULL;
-               $data = $this->getDatabase()->exec_SELECTgetSingleRow('*', $this->table, ('uid=' . intval($uid)) . \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause($this->table));
+               $data = $this->getDatabase()->exec_SELECTgetSingleRow('*', $this->table, 'uid=' . intval($uid) . \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause($this->table));
                if ($data !== NULL) {
                        $result = $this->createDomainObject($data);
                }
@@ -85,7 +85,7 @@ class RecordCollectionRepository {
         */
        public function findByTableName($tableName) {
                $conditions = array(
-                       ($this->tableField . '=') . $this->getDatabase()->fullQuoteStr($tableName, $this->table)
+                       $this->tableField . '=' . $this->getDatabase()->fullQuoteStr($tableName, $this->table)
                );
                return $this->queryMultipleRecords($conditions);
        }
@@ -98,7 +98,7 @@ class RecordCollectionRepository {
         */
        public function findByType($type) {
                $conditions = array(
-                       ($this->typeField . '=') . $this->getDatabase()->fullQuoteStr($type, $this->table)
+                       $this->typeField . '=' . $this->getDatabase()->fullQuoteStr($type, $this->table)
                );
                return $this->queryMultipleRecords($conditions);
        }
@@ -112,8 +112,8 @@ class RecordCollectionRepository {
         */
        public function findByTypeAndTableName($type, $tableName) {
                $conditions = array(
-                       ($this->typeField . '=') . $this->getDatabase()->fullQuoteStr($type, $this->table),
-                       ($this->tableField . '=') . $this->getDatabase()->fullQuoteStr($tableName, $this->table)
+                       $this->typeField . '=' . $this->getDatabase()->fullQuoteStr($type, $this->table),
+                       $this->tableField . '=' . $this->getDatabase()->fullQuoteStr($tableName, $this->table)
                );
                return $this->queryMultipleRecords($conditions);
        }
index 4a806f7..9d8a166 100644 (file)
@@ -166,7 +166,7 @@ class StaticRecordCollection extends \TYPO3\CMS\Core\Collection\AbstractRecordCo
         */
        protected function getCollectedRecords() {
                $relatedRecords = array();
-               $resource = $GLOBALS['TYPO3_DB']->exec_SELECT_mm_query($this->getItemTableName() . '.*', self::$storageTableName, 'sys_collection_entries', $this->getItemTableName(), (('AND ' . self::$storageTableName) . '.uid=') . intval($this->getIdentifier()));
+               $resource = $GLOBALS['TYPO3_DB']->exec_SELECT_mm_query($this->getItemTableName() . '.*', self::$storageTableName, 'sys_collection_entries', $this->getItemTableName(), 'AND ' . self::$storageTableName . '.uid=' . intval($this->getIdentifier()));
                if ($resource) {
                        while ($record = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($resource)) {
                                $relatedRecords[] = $record;
index 2c6e660..1922b90 100644 (file)
@@ -169,7 +169,7 @@ class ConfigurationManager {
         */
        static protected function writeLocalConfiguration(array $configuration) {
                $configuration = \TYPO3\CMS\Core\Utility\ArrayUtility::sortByKeyRecursive($configuration);
-               $result = \TYPO3\CMS\Core\Utility\GeneralUtility::writeFile(PATH_site . static::LOCAL_CONFIGURATION_FILE, ((((('<?php' . LF) . 'return ') . \TYPO3\CMS\Core\Utility\ArrayUtility::arrayExport($configuration)) . ';') . LF) . '?>');
+               $result = \TYPO3\CMS\Core\Utility\GeneralUtility::writeFile(PATH_site . static::LOCAL_CONFIGURATION_FILE, '<?php' . LF . 'return ' . \TYPO3\CMS\Core\Utility\ArrayUtility::arrayExport($configuration) . ';' . LF . '?>');
                return $result === FALSE ? FALSE : TRUE;
        }
 
index adf0a55..4fd009f 100644 (file)
@@ -176,9 +176,9 @@ class FlexFormTools {
                                                $this->traverseFlexFormXMLData_DS =& $dataStruct;
                                                $this->traverseFlexFormXMLData_Data =& $editData;
                                                // Render flexform:
-                                               $this->traverseFlexFormXMLData_recurse($dataStruct['ROOT']['el'], $editData['data'][$sheet][$lang], $PA, (('data/' . $sheet) . '/') . $lang);
+                                               $this->traverseFlexFormXMLData_recurse($dataStruct['ROOT']['el'], $editData['data'][$sheet][$lang], $PA, 'data/' . $sheet . '/' . $lang);
                                        } else {
-                                               return ('Data Structure ERROR: No ROOT element found for sheet "' . $sheet) . '".';
+                                               return 'Data Structure ERROR: No ROOT element found for sheet "' . $sheet . '".';
                                        }
                                }
                        }
@@ -222,14 +222,14 @@ class FlexFormTools {
                                                                                $theDat = $v3[$theType];
                                                                                $newSectionEl = $value['el'][$theType];
                                                                                if (is_array($newSectionEl)) {
-                                                                                       $this->traverseFlexFormXMLData_recurse(array($theType => $newSectionEl), array($theType => $theDat), $PA, ((($path . '/') . $key) . '/el/') . $cc);
+                                                                                       $this->traverseFlexFormXMLData_recurse(array($theType => $newSectionEl), array($theType => $theDat), $PA, $path . '/' . $key . '/el/' . $cc);
                                                                                }
                                                                        }
                                                                }
                                                        }
                                                } else {
                                                        // Array traversal:
-                                                       $this->traverseFlexFormXMLData_recurse($value['el'], $editData[$key]['el'], $PA, (($path . '/') . $key) . '/el');
+                                                       $this->traverseFlexFormXMLData_recurse($value['el'], $editData[$key]['el'], $PA, $path . '/' . $key . '/el');
                                                }
                                        } elseif (is_array($value['TCEforms']['config'])) {
                                                // Processing a field value:
@@ -237,7 +237,7 @@ class FlexFormTools {
                                                        $vKey = 'v' . $vKey;
                                                        // Call back:
                                                        if ($PA['callBackMethod_value']) {
-                                                               $this->callBackObj->{$PA['callBackMethod_value']}($value, $editData[$key][$vKey], $PA, ((($path . '/') . $key) . '/') . $vKey, $this);
+                                                               $this->callBackObj->{$PA['callBackMethod_value']}($value, $editData[$key][$vKey], $PA, $path . '/' . $key . '/' . $vKey, $this);
                                                        }
                                                }
                                        }
@@ -408,7 +408,7 @@ class FlexFormTools {
                $spaceInd = $GLOBALS['TYPO3_CONF_VARS']['BE']['compactFlexFormXML'] ? -1 : 4;
                $output = \TYPO3\CMS\Core\Utility\GeneralUtility::array2xml($array, '', 0, 'T3FlexForms', $spaceInd, $options);
                if ($addPrologue) {
-                       $output = ((('<?xml version="1.0" encoding="' . $GLOBALS['LANG']->charSet) . '" standalone="yes" ?>') . LF) . $output;
+                       $output = '<?xml version="1.0" encoding="' . $GLOBALS['LANG']->charSet . '" standalone="yes" ?>' . LF . $output;
                }
                return $output;
        }
index b80c792..4abefcc 100644 (file)
@@ -219,7 +219,7 @@ abstract class AbstractConditionMatcher {
                        // "webkit532.5 chrome4.1 safari532.5"
                        $all = '';
                        foreach ($browserInfo['all'] as $key => $value) {
-                               $all .= ($key . $value) . ' ';
+                               $all .= $key . $value . ' ';
                        }
                        foreach ($values as $test) {
                                if (stripos($all, $test) !== FALSE) {
@@ -530,7 +530,7 @@ abstract class AbstractConditionMatcher {
                                $regex = $needle;
                        } else {
                                $needle = str_replace(array('*', '?'), array('###MANY###', '###ONE###'), $needle);
-                               $regex = ('/^' . preg_quote($needle, '/')) . '$/';
+                               $regex = '/^' . preg_quote($needle, '/') . '$/';
                                // Replace the marker with .* to match anything (wildcard)
                                $regex = str_replace(array('###MANY###', '###ONE###'), array('.*', '.'), $regex);
                        }
index e0a594e..f6399bd 100644 (file)
@@ -222,15 +222,15 @@ class Bootstrap {
                // Check if [BE][forceCharset] has been set in localconf.php
                if (isset($GLOBALS['TYPO3_CONF_VARS']['BE']['forceCharset'])) {
                        // die() unless we're already on UTF-8
-                       if (($GLOBALS['TYPO3_CONF_VARS']['BE']['forceCharset'] != 'utf-8' && $GLOBALS['TYPO3_CONF_VARS']['BE']['forceCharset']) && TYPO3_enterInstallScript !== '1') {
-                               die((('This installation was just upgraded to a new TYPO3 version. Since TYPO3 4.7, utf-8 is always enforced.<br />' . 'The configuration option $GLOBALS[\'TYPO3_CONF_VARS\'][BE][forceCharset] was marked as deprecated in TYPO3 4.5 and is now ignored.<br />') . 'You have configured the value to something different, which is not supported anymore.<br />') . 'Please proceed to the Update Wizard in the TYPO3 Install Tool to update your configuration.');
+                       if ($GLOBALS['TYPO3_CONF_VARS']['BE']['forceCharset'] != 'utf-8' && $GLOBALS['TYPO3_CONF_VARS']['BE']['forceCharset'] && TYPO3_enterInstallScript !== '1') {
+                               die('This installation was just upgraded to a new TYPO3 version. Since TYPO3 4.7, utf-8 is always enforced.<br />' . 'The configuration option $GLOBALS[\'TYPO3_CONF_VARS\'][BE][forceCharset] was marked as deprecated in TYPO3 4.5 and is now ignored.<br />' . 'You have configured the value to something different, which is not supported anymore.<br />' . 'Please proceed to the Update Wizard in the TYPO3 Install Tool to update your configuration.');
                        } else {
                                unset($GLOBALS['TYPO3_CONF_VARS']['BE']['forceCharset']);
                        }
                }
-               if (((isset($GLOBALS['TYPO3_CONF_VARS']['SYS']['setDBinit']) && $GLOBALS['TYPO3_CONF_VARS']['SYS']['setDBinit'] !== '-1') && preg_match('/SET NAMES utf8/', $GLOBALS['TYPO3_CONF_VARS']['SYS']['setDBinit']) === FALSE) && TYPO3_enterInstallScript !== '1') {
+               if (isset($GLOBALS['TYPO3_CONF_VARS']['SYS']['setDBinit']) && $GLOBALS['TYPO3_CONF_VARS']['SYS']['setDBinit'] !== '-1' && preg_match('/SET NAMES utf8/', $GLOBALS['TYPO3_CONF_VARS']['SYS']['setDBinit']) === FALSE && TYPO3_enterInstallScript !== '1') {
                        // Only accept "SET NAMES utf8" for this setting, otherwise die with a nice error
-                       die(((((((((('This TYPO3 installation is using the $GLOBALS[\'TYPO3_CONF_VARS\'][\'SYS\'][\'setDBinit\'] property with the following value:' . chr(10)) . $GLOBALS['TYPO3_CONF_VARS']['SYS']['setDBinit']) . chr(10)) . chr(10)) . 'It looks like UTF-8 is not used for this connection.') . chr(10)) . chr(10)) . 'Everything other than UTF-8 is unsupported since TYPO3 4.7.') . chr(10)) . 'The DB, its connection and TYPO3 should be migrated to UTF-8 therefore. Please check your setup.');
+                       die('This TYPO3 installation is using the $GLOBALS[\'TYPO3_CONF_VARS\'][\'SYS\'][\'setDBinit\'] property with the following value:' . chr(10) . $GLOBALS['TYPO3_CONF_VARS']['SYS']['setDBinit'] . chr(10) . chr(10) . 'It looks like UTF-8 is not used for this connection.' . chr(10) . chr(10) . 'Everything other than UTF-8 is unsupported since TYPO3 4.7.' . chr(10) . 'The DB, its connection and TYPO3 should be migrated to UTF-8 therefore. Please check your setup.');
                } else {
                        $GLOBALS['TYPO3_CONF_VARS']['SYS']['setDBinit'] = 'SET NAMES utf8;';
                }
@@ -447,7 +447,7 @@ class Bootstrap {
                define('TYPO3_REQUESTTYPE_CLI', 4);
                define('TYPO3_REQUESTTYPE_AJAX', 8);
                define('TYPO3_REQUESTTYPE_INSTALL', 16);
-               define('TYPO3_REQUESTTYPE', ((((TYPO3_MODE == 'FE' ? TYPO3_REQUESTTYPE_FE : 0) | (TYPO3_MODE == 'BE' ? TYPO3_REQUESTTYPE_BE : 0)) | (defined('TYPO3_cliMode') && TYPO3_cliMode ? TYPO3_REQUESTTYPE_CLI : 0)) | (defined('TYPO3_enterInstallScript') && TYPO3_enterInstallScript ? TYPO3_REQUESTTYPE_INSTALL : 0)) | ($GLOBALS['TYPO3_AJAX'] ? TYPO3_REQUESTTYPE_AJAX : 0));
+               define('TYPO3_REQUESTTYPE', (TYPO3_MODE == 'FE' ? TYPO3_REQUESTTYPE_FE : 0) | (TYPO3_MODE == 'BE' ? TYPO3_REQUESTTYPE_BE : 0) | (defined('TYPO3_cliMode') && TYPO3_cliMode ? TYPO3_REQUESTTYPE_CLI : 0) | (defined('TYPO3_enterInstallScript') && TYPO3_enterInstallScript ? TYPO3_REQUESTTYPE_INSTALL : 0) | ($GLOBALS['TYPO3_AJAX'] ? TYPO3_REQUESTTYPE_AJAX : 0));
                return $this;
        }
 
@@ -592,7 +592,7 @@ class Bootstrap {
         */
        public function checkLockedBackendAndRedirectOrDie() {
                if ($GLOBALS['TYPO3_CONF_VARS']['BE']['adminOnly'] < 0) {
-                       throw new \RuntimeException(('TYPO3 Backend locked: Backend and Install Tool are locked for maintenance. [BE][adminOnly] is set to "' . intval($GLOBALS['TYPO3_CONF_VARS']['BE']['adminOnly'])) . '".', 1294586847);
+                       throw new \RuntimeException('TYPO3 Backend locked: Backend and Install Tool are locked for maintenance. [BE][adminOnly] is set to "' . intval($GLOBALS['TYPO3_CONF_VARS']['BE']['adminOnly']) . '".', 1294586847);
                }
                if (@is_file((PATH_typo3conf . 'LOCK_BACKEND'))) {
                        if (TYPO3_PROCEED_IF_NO_USER === 2) {
@@ -648,14 +648,14 @@ class Bootstrap {
                                if ($requestStr === 'index.php' && !\TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_SSL')) {
                                        list(, $url) = explode('://', \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_REQUEST_URL'), 2);
                                        list($server, $address) = explode('/', $url, 2);
-                                       header(((('Location: https://' . $server) . $sslPortSuffix) . '/') . $address);
+                                       header('Location: https://' . $server . $sslPortSuffix . '/' . $address);
                                        die;
                                }
                        } elseif (!\TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_SSL')) {
                                if (intval($GLOBALS['TYPO3_CONF_VARS']['BE']['lockSSL']) === 2) {
                                        list(, $url) = explode('://', \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_SITE_URL') . TYPO3_mainDir, 2);
                                        list($server, $address) = explode('/', $url, 2);
-                                       header(((('Location: https://' . $server) . $sslPortSuffix) . '/') . $address);
+                                       header('Location: https://' . $server . $sslPortSuffix . '/' . $address);
                                } else {
                                        // Send Not Found header - if the webserver can make use of it...
                                        header('Status: 404 Not Found');
index ef67f31..b791d77 100644 (file)
@@ -260,7 +260,7 @@ class SystemEnvironmentBuilder {
         * @return void
         */
        static protected function addCorePearPathToIncludePath() {
-               set_include_path(((PATH_typo3 . 'contrib/pear/') . PATH_SEPARATOR) . get_include_path());
+               set_include_path(PATH_typo3 . 'contrib/pear/' . PATH_SEPARATOR . get_include_path());
        }
 
        /**
@@ -321,7 +321,7 @@ class SystemEnvironmentBuilder {
         */
        static protected function initializeBasicErrorReporting() {
                // Core should be notice free at least until this point ...
-               error_reporting(E_ALL & ~((E_STRICT | E_NOTICE) | E_DEPRECATED));
+               error_reporting(E_ALL & ~(E_STRICT | E_NOTICE | E_DEPRECATED));
        }
 
        /**
@@ -373,7 +373,7 @@ class SystemEnvironmentBuilder {
                } elseif (isset($_SERVER['PATH_TRANSLATED'])) {
                        $cgiPath = $_SERVER['PATH_TRANSLATED'];
                }
-               if ($cgiPath && (((PHP_SAPI === 'fpm-fcgi' || PHP_SAPI === 'cgi') || PHP_SAPI === 'isapi') || PHP_SAPI === 'cgi-fcgi')) {
+               if ($cgiPath && (PHP_SAPI === 'fpm-fcgi' || PHP_SAPI === 'cgi' || PHP_SAPI === 'isapi' || PHP_SAPI === 'cgi-fcgi')) {
                        $scriptPath = $cgiPath;
                } else {
                        if (isset($_SERVER['ORIG_SCRIPT_FILENAME'])) {
@@ -424,7 +424,7 @@ class SystemEnvironmentBuilder {
                        } else {
                                $workingDirectory = getcwd();
                        }
-                       $scriptPath = ($workingDirectory . '/') . preg_replace('/\\.\\//', '', $scriptPath);
+                       $scriptPath = $workingDirectory . '/' . preg_replace('/\\.\\//', '', $scriptPath);
                }
                return $scriptPath;
        }
@@ -478,7 +478,7 @@ class SystemEnvironmentBuilder {
         * @return string Absolute path to document root of installation
         */
        static protected function getPathSiteByTypo3ModulePath() {
-               if ((substr(TYPO3_MOD_PATH, 0, strlen('sysext/')) === 'sysext/' || substr(TYPO3_MOD_PATH, 0, strlen('ext/')) === 'ext/') || substr(TYPO3_MOD_PATH, 0, strlen('install/')) === 'install/') {
+               if (substr(TYPO3_MOD_PATH, 0, strlen('sysext/')) === 'sysext/' || substr(TYPO3_MOD_PATH, 0, strlen('ext/')) === 'ext/' || substr(TYPO3_MOD_PATH, 0, strlen('install/')) === 'install/') {
                        $pathPartRelativeToDocumentRoot = TYPO3_mainDir . TYPO3_MOD_PATH;
                } elseif (substr(TYPO3_MOD_PATH, 0, strlen('../typo3conf/')) === '../typo3conf/') {
                        $pathPartRelativeToDocumentRoot = substr(TYPO3_MOD_PATH, 3);
index 4a3bdd3..18474bc 100644 (file)
@@ -572,7 +572,7 @@ class DataHandler {
                if (is_array($userTS)) {
                        foreach ($userTS as $k => $v) {
                                $k = substr($k, 0, -1);
-                               if (($k && is_array($v)) && isset($GLOBALS['TCA'][$k])) {
+                               if ($k && is_array($v) && isset($GLOBALS['TCA'][$k])) {
                                        if (is_array($this->defaultValues[$k])) {
                                                $this->defaultValues[$k] = array_merge($this->defaultValues[$k], $v);
                                        } else {
@@ -600,7 +600,7 @@ class DataHandler {
                        }
                        $subA = reset($postFiles);
                        if (is_array($subA)) {
-                               if (((is_array($subA['name']) && is_array($subA['type'])) && is_array($subA['tmp_name'])) && is_array($subA['size'])) {
+                               if (is_array($subA['name']) && is_array($subA['type']) && is_array($subA['tmp_name']) && is_array($subA['size'])) {
                                        // Initialize the uploadedFilesArray:
                                        $this->uploadedFileArray = array();
                                        // For each entry:
@@ -745,7 +745,7 @@ class DataHandler {
                                $id = 0;
                                $this->log($table, $id, 2, 0, 1, 'Attempt to modify table \'%s\' without permission', 1, array($table));
                        }
-                       if (((isset($GLOBALS['TCA'][$table]) && !$this->tableReadOnly($table)) && is_array($this->datamap[$table])) && $modifyAccessList) {
+                       if (isset($GLOBALS['TCA'][$table]) && !$this->tableReadOnly($table) && is_array($this->datamap[$table]) && $modifyAccessList) {
                                if ($this->reverseOrder) {
                                        $this->datamap[$table] = array_reverse($this->datamap[$table], 1);
                                }
@@ -846,7 +846,7 @@ class DataHandler {
                                                                        $this->addDefaultPermittedLanguageIfNotSet($table, $incomingFieldArray);
                                                                        $recordAccess = $this->BE_USER->recordEditAccessInternals($table, $incomingFieldArray, TRUE);
                                                                        if (!$recordAccess) {
-                                                                               $this->newlog(('recordEditAccessInternals() check failed. [' . $this->BE_USER->errorMsg) . ']', 1);
+                                                                               $this->newlog('recordEditAccessInternals() check failed. [' . $this->BE_USER->errorMsg . ']', 1);
                                                                        } elseif (!$this->bypassWorkspaceRestrictions) {
                                                                                // Workspace related processing:
                                                                                // If LIVE records cannot be created in the current PID due to workspace restrictions, prepare creation of placeholder-record
@@ -877,13 +877,13 @@ class DataHandler {
                                                        $recordAccess = $this->checkRecordUpdateAccess($table, $id, $incomingFieldArray, $hookObjectsArr);
                                                        if (!$recordAccess) {
                                                                $propArr = $this->getRecordProperties($table, $id);
-                                                               $this->log($table, $id, 2, 0, 1, 'Attempt to modify record \'%s\' (%s) without permission. Or non-existing page.', 2, array($propArr['header'], ($table . ':') . $id), $propArr['event_pid']);
+                                                               $this->log($table, $id, 2, 0, 1, 'Attempt to modify record \'%s\' (%s) without permission. Or non-existing page.', 2, array($propArr['header'], $table . ':' . $id), $propArr['event_pid']);
                                                        } else {
                                                                // Next check of the record permissions (internals)
                                                                $recordAccess = $this->BE_USER->recordEditAccessInternals($table, $id);
                                                                if (!$recordAccess) {
                                                                        $propArr = $this->getRecordProperties($table, $id);
-                                                                       $this->newlog(('recordEditAccessInternals() check failed. [' . $this->BE_USER->errorMsg) . ']', 1);
+                                                                       $this->newlog('recordEditAccessInternals() check failed. [' . $this->BE_USER->errorMsg . ']', 1);
                                                                } else {
                                                                        // Here we fetch the PID of the record that we point to...
                                                                        $tempdata = $this->recordInfo($table, $id, 'pid' . ($GLOBALS['TCA'][$table]['ctrl']['versioningWS'] ? ',t3ver_wsid,t3ver_stage' : ''));
@@ -941,10 +941,10 @@ class DataHandler {
                                                                                                $recordAccess = TRUE;
                                                                                                $this->autoVersioningUpdate = TRUE;
                                                                                        } else {
-                                                                                               $this->newlog(('Could not be edited in offline workspace in the branch where found (failure state: \'' . $errorCode) . '\'). Auto-creation of version failed!', 1);
+                                                                                               $this->newlog('Could not be edited in offline workspace in the branch where found (failure state: \'' . $errorCode . '\'). Auto-creation of version failed!', 1);
                                                                                        }
                                                                                } else {
-                                                                                       $this->newlog(('Could not be edited in offline workspace in the branch where found (failure state: \'' . $errorCode) . '\'). Auto-creation of version not allowed in workspace!', 1);
+                                                                                       $this->newlog('Could not be edited in offline workspace in the branch where found (failure state: \'' . $errorCode . '\'). Auto-creation of version not allowed in workspace!', 1);
                                                                                }
                                                                        }
                                                                }
@@ -957,7 +957,7 @@ class DataHandler {
                                                        // Here the "pid" is set IF NOT the old pid was a string pointing to a place in the subst-id array.
                                                        list($tscPID) = \TYPO3\CMS\Backend\Utility\BackendUtility::getTSCpid($table, $id, $old_pid_value ? $old_pid_value : $fieldArray['pid']);
                                                        $TSConfig = $this->getTCEMAIN_TSconfig($tscPID);
-                                                       if (($status == 'new' && $table == 'pages') && is_array($TSConfig['permissions.'])) {
+                                                       if ($status == 'new' && $table == 'pages' && is_array($TSConfig['permissions.'])) {
                                                                $fieldArray = $this->setTSconfigPermissions($fieldArray, $TSConfig['permissions.']);
                                                        }
                                                        if ($createNewVersion) {
@@ -1017,7 +1017,7 @@ class DataHandler {
                                                                                $newVersion_placeholderFieldArray['t3ver_state'] = 1;
                                                                                // Setting workspace - only so display of place holders can filter out those from other workspaces.
                                                                                $newVersion_placeholderFieldArray['t3ver_wsid'] = $this->BE_USER->workspace;
-                                                                               $newVersion_placeholderFieldArray[$GLOBALS['TCA'][$table]['ctrl']['label']] = ('[PLACEHOLDER, WS#' . $this->BE_USER->workspace) . ']';
+                                                                               $newVersion_placeholderFieldArray[$GLOBALS['TCA'][$table]['ctrl']['label']] = '[PLACEHOLDER, WS#' . $this->BE_USER->workspace . ']';
                                                                                // Saving placeholder as 'original'
                                                                                $this->insertDB($table, $id, $newVersion_placeholderFieldArray, FALSE);
                                                                                // For the actual new offline version, set versioning values to point to placeholder:
@@ -1090,12 +1090,12 @@ class DataHandler {
                                $shadowCols .= ',' . $GLOBALS['TCA'][$table]['ctrl']['label'];
                                $shadowColumns = array_unique(\TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $shadowCols, 1));
                                foreach ($shadowColumns as $fieldName) {
-                                       if (((strcmp($justStoredRecord[$fieldName], $liveRec[$fieldName]) && isset($GLOBALS['TCA'][$table]['columns'][$fieldName])) && $fieldName !== 'uid') && $fieldName !== 'pid') {
+                                       if (strcmp($justStoredRecord[$fieldName], $liveRec[$fieldName]) && isset($GLOBALS['TCA'][$table]['columns'][$fieldName]) && $fieldName !== 'uid' && $fieldName !== 'pid') {
                                                $newRecord[$fieldName] = $justStoredRecord[$fieldName];
                                        }
                                }
                                if (count($newRecord)) {
-                                       $this->newlog2(((((((('Shadowing done on fields <i>' . implode(',', array_keys($newRecord))) . '</i> in placeholder record ') . $table) . ':') . $liveRec['uid']) . ' (offline version UID=') . $id) . ')', $table, $liveRec['uid'], $liveRec['pid']);
+                                       $this->newlog2('Shadowing done on fields <i>' . implode(',', array_keys($newRecord)) . '</i> in placeholder record ' . $table . ':' . $liveRec['uid'] . ' (offline version UID=' . $id . ')', $table, $liveRec['uid'], $liveRec['pid']);
                                        $this->updateDB($table, $liveRec['uid'], $newRecord);
                                }
                        }
@@ -1137,7 +1137,7 @@ class DataHandler {
                        // This is done to make the pid positive for offline versions; Necessary to have diff-view for pages_language_overlay in workspaces.
                        \TYPO3\CMS\Backend\Utility\BackendUtility::fixVersioningPid($table, $currentRecord);
                        // Get original language record if available:
-                       if (((((is_array($currentRecord) && $GLOBALS['TCA'][$table]['ctrl']['transOrigDiffSourceField']) && $GLOBALS['TCA'][$table]['ctrl']['languageField']) && $currentRecord[$GLOBALS['TCA'][$table]['ctrl']['languageField']] > 0) && $GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField']) && intval($currentRecord[$GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField']]) > 0) {
+                       if (is_array($currentRecord) && $GLOBALS['TCA'][$table]['ctrl']['transOrigDiffSourceField'] && $GLOBALS['TCA'][$table]['ctrl']['languageField'] && $currentRecord[$GLOBALS['TCA'][$table]['ctrl']['languageField']] > 0 && $GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField'] && intval($currentRecord[$GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField']]) > 0) {
                                $lookUpTable = $GLOBALS['TCA'][$table]['ctrl']['transOrigPointerTable'] ? $GLOBALS['TCA'][$table]['ctrl']['transOrigPointerTable'] : $table;
                                $originalLanguageRecord = $this->recordInfo($lookUpTable, $currentRecord[$GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField']], '*');
                                \TYPO3\CMS\Backend\Utility\BackendUtility::workspaceOL($lookUpTable, $originalLanguageRecord);
@@ -1152,10 +1152,10 @@ class DataHandler {
                // - If the field is nothing of the above and the field is configured in TCA, the fieldvalues are evaluated by ->checkValue
                // If everything is OK, the field is entered into $fieldArray[]
                foreach ($incomingFieldArray as $field => $fieldValue) {
-                       if (!in_array((($table . '-') . $field), $this->exclude_array) && !$this->data_disableFields[$table][$id][$field]) {
+                       if (!in_array(($table . '-' . $field), $this->exclude_array) && !$this->data_disableFields[$table][$id][$field]) {
                                // The field must be editable.
                                // Checking if a value for language can be changed:
-                               $languageDeny = ($GLOBALS['TCA'][$table]['ctrl']['languageField'] && !strcmp($GLOBALS['TCA'][$table]['ctrl']['languageField'], $field)) && !$this->BE_USER->checkLanguageAccess($fieldValue);
+                               $languageDeny = $GLOBALS['TCA'][$table]['ctrl']['languageField'] && !strcmp($GLOBALS['TCA'][$table]['ctrl']['languageField'], $field) && !$this->BE_USER->checkLanguageAccess($fieldValue);
                                if (!$languageDeny) {
                                        // Stripping slashes - will probably be removed the day $this->stripslashes_values is removed as an option...
                                        if ($this->stripslashes_values) {
@@ -1181,7 +1181,7 @@ class DataHandler {
 
                                        case 'perms_everybody':
                                                // Permissions can be edited by the owner or the administrator
-                                               if ($table == 'pages' && (($this->admin || $status == 'new') || $this->pageInfo($id, 'perms_userid') == $this->userid)) {
+                                               if ($table == 'pages' && ($this->admin || $status == 'new' || $this->pageInfo($id, 'perms_userid') == $this->userid)) {
                                                        $value = intval($fieldValue);
                                                        switch ($field) {
                                                        case 'perms_userid':
@@ -1233,7 +1233,7 @@ class DataHandler {
                                                        if ($this->autoVersioningUpdate === TRUE) {
                                                                if (is_array($this->RTEmagic_copyIndex[$table][$id][$field])) {
                                                                        foreach ($this->RTEmagic_copyIndex[$table][$id][$field] as $oldRTEmagicName => $newRTEmagicName) {
-                                                                               $fieldArray[$field] = str_replace((' src="' . $oldRTEmagicName) . '"', (' src="' . $newRTEmagicName) . '"', $fieldArray[$field]);
+                                                                               $fieldArray[$field] = str_replace(' src="' . $oldRTEmagicName . '"', ' src="' . $newRTEmagicName . '"', $fieldArray[$field]);
                                                                        }
                                                                }
                                                        }
@@ -1290,12 +1290,12 @@ class DataHandler {
                                        $eFileMarker = $eFile['markerField'] && trim($mixedRec[$eFile['markerField']]) ? trim($mixedRec[$eFile['markerField']]) : '###TYPO3_STATICFILE_EDIT###';
                                        // Must replace the marker if present in content!
                                        $insertContent = str_replace($eFileMarker, '', $mixedRec[$eFile['contentField']]);
-                                       $SW_fileNewContent = $parseHTML->substituteSubpart($SW_fileContent, $eFileMarker, (LF . $insertContent) . LF, 1, 1);
+                                       $SW_fileNewContent = $parseHTML->substituteSubpart($SW_fileContent, $eFileMarker, LF . $insertContent . LF, 1, 1);
                                        \TYPO3\CMS\Core\Utility\GeneralUtility::writeFile($eFile['editFile'], $SW_fileNewContent);
                                        // Write status:
                                        if (!strstr($id, 'NEW') && $eFile['statusField']) {
                                                $GLOBALS['TYPO3_DB']->exec_UPDATEquery($table, 'uid=' . intval($id), array(
-                                                       $eFile['statusField'] => ((($eFile['relEditFile'] . ' updated ') . date('d-m-Y H:i:s')) . ', bytes ') . strlen($mixedRec[$eFile['contentField']])
+                                                       $eFile['statusField'] => $eFile['relEditFile'] . ' updated ' . date('d-m-Y H:i:s') . ', bytes ' . strlen($mixedRec[$eFile['contentField']])
                                                ));
                                        }
                                } elseif ($eFile && is_string($eFile)) {
@@ -1331,7 +1331,7 @@ class DataHandler {
                \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($table);
                // Result array
                $res = array();
-               $recFID = ((($table . ':') . $id) . ':') . $field;
+               $recFID = $table . ':' . $id . ':' . $field;
                // Processing special case of field pages.doktype
                if (($table === 'pages' || $table === 'pages_language_overlay') && $field === 'doktype') {
                        // If the user may not use this specific doktype, we issue a warning
@@ -1465,7 +1465,7 @@ class DataHandler {
                        $value = $GLOBALS['LANG']->csConvObj->substr($GLOBALS['LANG']->charSet, $value, 0, intval($tcaFieldConf['max']));
                }
                // Checking range of value:
-               if (($tcaFieldConf['range'] && $value != $tcaFieldConf['checkbox']) && intval($value) !== intval($tcaFieldConf['default'])) {
+               if ($tcaFieldConf['range'] && $value != $tcaFieldConf['checkbox'] && intval($value) !== intval($tcaFieldConf['default'])) {
                        if (isset($tcaFieldConf['range']['upper']) && $value > $tcaFieldConf['range']['upper']) {
                                $value = $tcaFieldConf['range']['upper'];
                        }
@@ -1733,7 +1733,7 @@ class DataHandler {
                                                foreach ($valueArray as $key => $theFile) {
                                                        // If it is an already attached file...
                                                        if ($theFile === basename($theFile)) {
-                                                               $valueArray[$key] = ((PATH_site . $tcaFieldConf['uploadfolder']) . '/') . $theFile;
+                                                               $valueArray[$key] = PATH_site . $tcaFieldConf['uploadfolder'] . '/' . $theFile;
                                                        }
                                                }
                                        }
@@ -1764,10 +1764,10 @@ class DataHandler {
                                                // This array contains the filenames in the uploadfolder that should be deleted:
                                                foreach ($theFileValues as $key => $theFile) {
                                                        $theFile = trim($theFile);
-                                                       if (@is_file((($dest . '/') . $theFile))) {
-                                                               $this->removeFilesStore[] = ($dest . '/') . $theFile;
+                                                       if (@is_file(($dest . '/' . $theFile))) {
+                                                               $this->removeFilesStore[] = $dest . '/' . $theFile;
                                                        } elseif ($theFile) {
-                                                               $this->log($table, $id, 5, 0, 1, 'Could not delete file \'%s\' (does not exist). (%s)', 10, array(($dest . '/') . $theFile, $recFID), $propArr['event_pid']);
+                                                               $this->log($table, $id, 5, 0, 1, 'Could not delete file \'%s\' (does not exist). (%s)', 10, array($dest . '/' . $theFile, $recFID), $propArr['event_pid']);
                                                        }
                                                }
                                        }
@@ -1862,11 +1862,11 @@ class DataHandler {
                                        $newFiles = implode(',', $dbAnalysis->getValueArray());
                                        list(, , $recFieldName) = explode(':', $recFID);
                                        if ($currentFilesForHistory != $newFiles) {
-                                               $this->mmHistoryRecords[($table . ':') . $id]['oldRecord'][$recFieldName] = $currentFilesForHistory;
-                                               $this->mmHistoryRecords[($table . ':') . $id]['newRecord'][$recFieldName] = $newFiles;
+                                               $this->mmHistoryRecords[$table . ':' . $id]['oldRecord'][$recFieldName] = $currentFilesForHistory;
+                                               $this->mmHistoryRecords[$table . ':' . $id]['newRecord'][$recFieldName] = $newFiles;
                                        } else {
-                                               $this->mmHistoryRecords[($table . ':') . $id]['oldRecord'][$recFieldName] = '';
-                                               $this->mmHistoryRecords[($table . ':') . $id]['newRecord'][$recFieldName] = '';
+                                               $this->mmHistoryRecords[$table . ':' . $id]['oldRecord'][$recFieldName] = '';
+                                               $this->mmHistoryRecords[$table . ':' . $id]['newRecord'][$recFieldName] = '';
                                        }
                                } else {
                                        $this->dbAnalysisStore[] = array($dbAnalysis, $tcaFieldConf['MM'], $id, 0);
@@ -2160,12 +2160,12 @@ class DataHandler {
                // If the field is configured in TCA, proceed:
                if (is_array($GLOBALS['TCA'][$table]) && is_array($GLOBALS['TCA'][$table]['columns'][$field])) {
                        // Look for a record which might already have the value:
-                       $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('uid', $table, (((($field . '=') . $GLOBALS['TYPO3_DB']->fullQuoteStr($value, $table)) . ' AND uid<>') . intval($id)) . $whereAdd);
+                       $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('uid', $table, $field . '=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($value, $table) . ' AND uid<>' . intval($id) . $whereAdd);
                        $counter = 0;
                        // For as long as records with the test-value existing, try again (with incremented numbers appended).
                        while ($GLOBALS['TYPO3_DB']->sql_num_rows($res)) {
                                $newValue = $value . $counter;
-                               $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('uid', $table, (((($field . '=') . $GLOBALS['TYPO3_DB']->fullQuoteStr($newValue, $table)) . ' AND uid<>') . intval($id)) . $whereAdd);
+                               $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('uid', $table, $field . '=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($newValue, $table) . ' AND uid<>' . intval($id) . $whereAdd);
                                $counter++;
                                if ($counter > 100) {
                                        break;
@@ -2200,7 +2200,7 @@ class DataHandler {
                                }
                                break;
                        default:
-                               $evalObj = \TYPO3\CMS\Core\Utility\GeneralUtility::getUserObj(($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tce']['formevals'][$func] . ':&') . $func);
+                               $evalObj = \TYPO3\CMS\Core\Utility\GeneralUtility::getUserObj($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tce']['formevals'][$func] . ':&' . $func);
                                if (is_object($evalObj) && method_exists($evalObj, 'evaluateFieldValue')) {
                                        $value = $evalObj->evaluateFieldValue($value, $is_in, $set);
                                }
@@ -2254,7 +2254,7 @@ class DataHandler {
                                }
                                $valueArray = explode('.', $value);
                                $dec = array_pop($valueArray);
-                               $value = (join('', $valueArray) . '.') . $dec;
+                               $value = join('', $valueArray) . '.' . $dec;
                                if ($negative) {
                                        $value *= -1;
                                }
@@ -2317,7 +2317,7 @@ class DataHandler {
                                }
                                break;
                        default:
-                               $evalObj = \TYPO3\CMS\Core\Utility\GeneralUtility::getUserObj(($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tce']['formevals'][$func] . ':&') . $func);
+                               $evalObj = \TYPO3\CMS\Core\Utility\GeneralUtility::getUserObj($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tce']['formevals'][$func] . ':&' . $func);
                                if (is_object($evalObj) && method_exists($evalObj, 'evaluateFieldValue')) {
                                        $value = $evalObj->evaluateFieldValue($value, $is_in, $set);
                                }
@@ -2344,7 +2344,7 @@ class DataHandler {
         * @todo Define visibility
         */
        public function checkValue_group_select_processDBdata($valueArray, $tcaFieldConf, $id, $status, $type, $currentTable, $currentField) {
-               $tables = $type == 'group' ? $tcaFieldConf['allowed'] : ($tcaFieldConf['foreign_table'] . ',') . $tcaFieldConf['neg_foreign_table'];
+               $tables = $type == 'group' ? $tcaFieldConf['allowed'] : $tcaFieldConf['foreign_table'] . ',' . $tcaFieldConf['neg_foreign_table'];
                $prep = $type == 'group' ? $tcaFieldConf['prepend_tname'] : $tcaFieldConf['neg_foreign_table'];
                $newRelations = implode(',', $valueArray);
                /** @var $dbAnalysis \TYPO3\CMS\Core\Database\RelationHandler */
@@ -2361,11 +2361,11 @@ class DataHandler {
                                $oldRelations = implode(',', $oldRelations_dbAnalysis->getValueArray());
                                $dbAnalysis->writeMM($tcaFieldConf['MM'], $id, $prep);
                                if ($oldRelations != $newRelations) {
-                                       $this->mmHistoryRecords[($currentTable . ':') . $id]['oldRecord'][$currentField] = $oldRelations;
-                                       $this->mmHistoryRecords[($currentTable . ':') . $id]['newRecord'][$currentField] = $newRelations;
+                                       $this->mmHistoryRecords[$currentTable . ':' . $id]['oldRecord'][$currentField] = $oldRelations;
+                                       $this->mmHistoryRecords[$currentTable . ':' . $id]['newRecord'][$currentField] = $newRelations;
                                } else {
-                                       $this->mmHistoryRecords[($currentTable . ':') . $id]['oldRecord'][$currentField] = '';
-                                       $this->mmHistoryRecords[($currentTable . ':') . $id]['newRecord'][$currentField] = '';
+                                       $this->mmHistoryRecords[$currentTable . ':' . $id]['oldRecord'][$currentField] = '';
+                                       $this->mmHistoryRecords[$currentTable . ':' . $id]['newRecord'][$currentField] = '';
                                }
                        } else {
                                $this->dbAnalysisStore[] = array($dbAnalysis, $tcaFieldConf['MM'], $id, $prep, $currentTable);
@@ -2417,9 +2417,9 @@ class DataHandler {
                if (is_array($dataPart)) {
                        foreach ($dataPart as $sKey => $sheetDef) {
                                list($dataStruct, $actualSheet) = \TYPO3\CMS\Core\Utility\GeneralUtility::resolveSheetDefInDS($dataStructArray, $sKey);
-                               if ((is_array($dataStruct) && $actualSheet == $sKey) && is_array($sheetDef)) {
+                               if (is_array($dataStruct) && $actualSheet == $sKey && is_array($sheetDef)) {
                                        foreach ($sheetDef as $lKey => $lData) {
-                                               $this->checkValue_flex_procInData_travDS($dataPart[$sKey][$lKey], $dataPart_current[$sKey][$lKey], $uploadedFiles[$sKey][$lKey], $dataStruct['ROOT']['el'], $pParams, $callBackFunc, (($sKey . '/') . $lKey) . '/');
+                                               $this->checkValue_flex_procInData_travDS($dataPart[$sKey][$lKey], $dataPart_current[$sKey][$lKey], $uploadedFiles[$sKey][$lKey], $dataStruct['ROOT']['el'], $pParams, $callBackFunc, $sKey . '/' . $lKey . '/');
                                        }
                                }
                        }
@@ -2458,7 +2458,7 @@ class DataHandler {
                                                                        }
                                                                        $theKey = key($el);
                                                                        if (is_array($dataValues[$key]['el'][$ik][$theKey]['el'])) {
-                                                                               $this->checkValue_flex_procInData_travDS($dataValues[$key]['el'][$ik][$theKey]['el'], is_array($dataValues_current[$key]['el'][$ik]) ? $dataValues_current[$key]['el'][$ik][$theKey]['el'] : array(), $uploadedFiles[$key]['el'][$ik][$theKey]['el'], $DSelements[$key]['el'][$theKey]['el'], $pParams, $callBackFunc, ((((($structurePath . $key) . '/el/') . $ik) . '/') . $theKey) . '/el/');
+                                                                               $this->checkValue_flex_procInData_travDS($dataValues[$key]['el'][$ik][$theKey]['el'], is_array($dataValues_current[$key]['el'][$ik]) ? $dataValues_current[$key]['el'][$ik][$theKey]['el'] : array(), $uploadedFiles[$key]['el'][$ik][$theKey]['el'], $DSelements[$key]['el'][$theKey]['el'], $pParams, $callBackFunc, $structurePath . $key . '/el/' . $ik . '/' . $theKey . '/el/');
                                                                                // If element is added dynamically in the flexform of TCEforms, we map the ID-string to the next numerical index we can have in that particular section of elements:
                                                                                // The fact that the order changes is not important since order is controlled by a separately submitted index.
                                                                                if (substr($ik, 0, 3) == 'ID-') {
@@ -2477,7 +2477,7 @@ class DataHandler {
                                                        if (!isset($dataValues[$key]['el'])) {
                                                                $dataValues[$key]['el'] = array();
                                                        }
-                                                       $this->checkValue_flex_procInData_travDS($dataValues[$key]['el'], $dataValues_current[$key]['el'], $uploadedFiles[$key]['el'], $DSelements[$key]['el'], $pParams, $callBackFunc, ($structurePath . $key) . '/el/');
+                                                       $this->checkValue_flex_procInData_travDS($dataValues[$key]['el'], $dataValues_current[$key]['el'], $uploadedFiles[$key]['el'], $DSelements[$key]['el'], $pParams, $callBackFunc, $structurePath . $key . '/el/');
                                                }
                                        }
                                } else {
@@ -2485,9 +2485,9 @@ class DataHandler {
                                                foreach ($dataValues[$key] as $vKey => $data) {
                                                        if ($callBackFunc) {
                                                                if (is_object($this->callBackObj)) {
-                                                                       $res = $this->callBackObj->{$callBackFunc}($pParams, $dsConf['TCEforms']['config'], $dataValues[$key][$vKey], $dataValues_current[$key][$vKey], $uploadedFiles[$key][$vKey], ((($structurePath . $key) . '/') . $vKey) . '/');
+                                                                       $res = $this->callBackObj->{$callBackFunc}($pParams, $dsConf['TCEforms']['config'], $dataValues[$key][$vKey], $dataValues_current[$key][$vKey], $uploadedFiles[$key][$vKey], $structurePath . $key . '/' . $vKey . '/');
                                                                } else {
-                                                                       $res = $this->{$callBackFunc}($pParams, $dsConf['TCEforms']['config'], $dataValues[$key][$vKey], $dataValues_current[$key][$vKey], $uploadedFiles[$key][$vKey], ((($structurePath . $key) . '/') . $vKey) . '/');
+                                                                       $res = $this->{$callBackFunc}($pParams, $dsConf['TCEforms']['config'], $dataValues[$key][$vKey], $dataValues_current[$key][$vKey], $uploadedFiles[$key][$vKey], $structurePath . $key . '/' . $vKey . '/');
                                                                }
                                                        } else {
                                                                // Default
@@ -2524,7 +2524,7 @@ class DataHandler {
                                                        if (substr($vKey, -9) != '.vDEFbase') {
                                                                if ($this->clear_flexFormData_vDEFbase) {
                                                                        $dataValues[$key][$vKey . '.vDEFbase'] = '';
-                                                               } elseif ((($this->updateModeL10NdiffData && $GLOBALS['TYPO3_CONF_VARS']['BE']['flexFormXMLincludeDiffBase']) && $vKey !== 'vDEF') && ((strcmp($dataValues[$key][$vKey], $dataValues_current[$key][$vKey]) || !isset($dataValues_current[$key][($vKey . '.vDEFbase')])) || $this->updateModeL10NdiffData === 'FORCE_FFUPD')) {
+                                                               } elseif ($this->updateModeL10NdiffData && $GLOBALS['TYPO3_CONF_VARS']['BE']['flexFormXMLincludeDiffBase'] && $vKey !== 'vDEF' && (strcmp($dataValues[$key][$vKey], $dataValues_current[$key][$vKey]) || !isset($dataValues_current[$key][($vKey . '.vDEFbase')]) || $this->updateModeL10NdiffData === 'FORCE_FFUPD')) {
                                                                        // Now, check if a vDEF value is submitted in the input data, if so we expect this has been processed prior to this operation (normally the case since those fields are higher in the form) and we can use that:
                                                                        if (isset($dataValues[$key]['vDEF'])) {
                                                                                $diffValue = $dataValues[$key]['vDEF'];
@@ -2644,7 +2644,7 @@ class DataHandler {
                        }
                        // FIXME: $id not set here (Comment added by Sebastian Kurf├╝rst)
                        // Check basic permissions and circumstances:
-                       if (((isset($GLOBALS['TCA'][$table]) && !$this->tableReadOnly($table)) && is_array($this->cmdmap[$table])) && $modifyAccessList) {
+                       if (isset($GLOBALS['TCA'][$table]) && !$this->tableReadOnly($table) && is_array($this->cmdmap[$table]) && $modifyAccessList) {
                                // Traverse the command map:
                                foreach ($this->cmdmap[$table] as $id => $incomingCmdArray) {
                                        if (is_array($incomingCmdArray)) {
@@ -2743,7 +2743,7 @@ class DataHandler {
        public function copyRecord($table, $uid, $destPid, $first = 0, $overrideValues = array(), $excludeFields = '', $language = 0) {
                $uid = ($origUid = intval($uid));
                // Only copy if the table is defined in $GLOBALS['TCA'], a uid is given and the record wasn't copied before:
-               if (($GLOBALS['TCA'][$table] && $uid) && !$this->isRecordCopied($table, $uid)) {
+               if ($GLOBALS['TCA'][$table] && $uid && !$this->isRecordCopied($table, $uid)) {
                        \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($table);
                        // This checks if the record can be selected which is all that a copy action requires.
                        if ($this->doesRecordExist($table, $uid, 'show')) {
@@ -2787,11 +2787,11 @@ class DataHandler {
                                                                        $value = $defaultData[$field];
                                                                } else {
                                                                        // Hide at copy may override:
-                                                                       if (((($first && $field == $enableField) && $GLOBALS['TCA'][$table]['ctrl']['hideAtCopy']) && !$this->neverHideAtCopy) && !$tE['disableHideAtCopy']) {
+                                                                       if ($first && $field == $enableField && $GLOBALS['TCA'][$table]['ctrl']['hideAtCopy'] && !$this->neverHideAtCopy && !$tE['disableHideAtCopy']) {
                                                                                $value = 1;
                                                                        }
                                                                        // Prepend label on copy:
-                                                                       if ((($first && $field == $headerField) && $GLOBALS['TCA'][$table]['ctrl']['prependAtCopy']) && !$tE['disablePrependAtCopy']) {
+                                                                       if ($first && $field == $headerField && $GLOBALS['TCA'][$table]['ctrl']['prependAtCopy'] && !$tE['disablePrependAtCopy']) {
                                                                                $value = $this->getCopyHeader($table, $this->resolvePid($table, $destPid), $field, $this->clearPrefixFromValue($table, $value), 0);
                                                                        }
                                                                        // Processing based on the TCA config field type (files, references, flexforms...)
@@ -2844,7 +2844,7 @@ class DataHandler {
                                                $this->log($table, $uid, 3, 0, 1, 'Attempt to copy record that did not exist!');
                                        }
                                } else {
-                                       $this->log($table, $uid, 3, 0, 1, ('Attempt to copy record without having permissions to do so. [' . $this->BE_USER->errorMsg) . '].');
+                                       $this->log($table, $uid, 3, 0, 1, 'Attempt to copy record without having permissions to do so. [' . $this->BE_USER->errorMsg . '].');
                                }
                        } else {
                                $this->log($table, $uid, 3, 0, 1, 'Attempt to copy record without permission');
@@ -2919,8 +2919,8 @@ class DataHandler {
                if ($theNewRootID) {
                        foreach ($copyTablesArray as $table) {
                                // All records under the page is copied.
-                               if (($table && is_array($GLOBALS['TCA'][$table])) && $table != 'pages') {
-                                       $mres = $GLOBALS['TYPO3_DB']->exec_SELECTquery('uid', $table, ('pid=' . intval($uid)) . $this->deleteClause($table), '', $GLOBALS['TCA'][$table]['ctrl']['sortby'] ? $GLOBALS['TCA'][$table]['ctrl']['sortby'] . ' DESC' : '');
+                               if ($table && is_array($GLOBALS['TCA'][$table]) && $table != 'pages') {
+                                       $mres = $GLOBALS['TYPO3_DB']->exec_SELECTquery('uid', $table, 'pid=' . intval($uid) . $this->deleteClause($table), '', $GLOBALS['TCA'][$table]['ctrl']['sortby'] ? $GLOBALS['TCA'][$table]['ctrl']['sortby'] . ' DESC' : '');
                                        while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($mres)) {
                                                // Copying each of the underlying records...
                                                $this->copyRecord($table, $row['uid'], $theNewRootID);
@@ -2956,7 +2956,7 @@ class DataHandler {
                        return NULL;
                }
                // Only copy if the table is defined in TCA, a uid is given and the record wasn't copied before:
-               if (($GLOBALS['TCA'][$table] && $uid) && !$this->isRecordCopied($table, $uid)) {
+               if ($GLOBALS['TCA'][$table] && $uid && !$this->isRecordCopied($table, $uid)) {
                        \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($table);
                        if ($this->doesRecordExist($table, $uid, 'show')) {
                                // Set up fields which should not be processed. They are still written - just passed through no-questions-asked!
@@ -3074,17 +3074,17 @@ class DataHandler {
                $localizationMode = \TYPO3\CMS\Backend\Utility\BackendUtility::getInlineLocalizationMode($table, $field);
                // Register if there are references to take care of or MM is used on an inline field (no change to value):
                if ($this->isReferenceField($conf) || $inlineSubType == 'mm') {
-                       $allowedTables = $conf['type'] == 'group' ? $conf['allowed'] : ($conf['foreign_table'] . ',') . $conf['neg_foreign_table'];
+                       $allowedTables = $conf['type'] == 'group' ? $conf['allowed'] : $conf['foreign_table'] . ',' . $conf['neg_foreign_table'];
                        $prependName = $conf['type'] == 'group' ? $conf['prepend_tname'] : $conf['neg_foreign_table'];
                        $mmTable = isset($conf['MM']) && $conf['MM'] ? $conf['MM'] : '';
                        $localizeForeignTable = isset($conf['foreign_table']) && \TYPO3\CMS\Backend\Utility\BackendUtility::isTableLocalizable($conf['foreign_table']);
-                       $localizeReferences = ($localizeForeignTable && isset($conf['localizeReferencesAtParentLocalization'])) && $conf['localizeReferencesAtParentLocalization'];
-                       $localizeChildren = ($localizeForeignTable && isset($conf['behaviour']['localizeChildrenAtParentLocalization'])) && $conf['behaviour']['localizeChildrenAtParentLocalization'];
+                       $localizeReferences = $localizeForeignTable && isset($conf['localizeReferencesAtParentLocalization']) && $conf['localizeReferencesAtParentLocalization'];
+                       $localizeChildren = $localizeForeignTable && isset($conf['behaviour']['localizeChildrenAtParentLocalization']) && $conf['behaviour']['localizeChildrenAtParentLocalization'];
                        /** @var $dbAnalysis \TYPO3\CMS\Core\Database\RelationHandler */
                        $dbAnalysis = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Database\\RelationHandler');
                        $dbAnalysis->start($value, $allowedTables, $mmTable, $uid, $table, $conf);
                        // Localize referenced records of select fields:
-                       if ($language > 0 && ($localizeReferences && empty($mmTable) || ($localizeChildren && $localizationMode === 'select') && $inlineSubType === 'mm')) {
+                       if ($language > 0 && ($localizeReferences && empty($mmTable) || $localizeChildren && $localizationMode === 'select' && $inlineSubType === 'mm')) {
                                foreach ($dbAnalysis->itemArray as $index => $item) {
                                        // Since select fields can reference many records, check whether there's already a localization:
                                        $recordLocalization = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecordLocalization($item['table'], $item['id'], $language);
@@ -3095,7 +3095,7 @@ class DataHandler {
                                        }
                                }
                                $value = implode(',', $dbAnalysis->getValueArray($prependName));
-                       } elseif ((($language > 0 && $localizeChildren === FALSE) && $localizationMode === 'select') && $inlineSubType === 'mm') {
+                       } elseif ($language > 0 && $localizeChildren === FALSE && $localizationMode === 'select' && $inlineSubType === 'mm') {
                                foreach ($dbAnalysis->itemArray as $index => $item) {
                                        // Since select fields can reference many records, check whether there's already a localization:
                                        $recordLocalization = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecordLocalization($item['table'], $item['id'], $language);
@@ -3125,9 +3125,9 @@ class DataHandler {
                                // Walk through the items, copy them and remember the new id:
                                foreach ($dbAnalysis->itemArray as $k => $v) {
                                        // If language is set and differs from original record, this isn't a copy action but a localization of our parent/ancestor:
-                                       if (($language > 0 && \TYPO3\CMS\Backend\Utility\BackendUtility::isTableLocalizable($table)) && $language != $row[$GLOBALS['TCA'][$table]['ctrl']['languageField']]) {
+                                       if ($language > 0 && \TYPO3\CMS\Backend\Utility\BackendUtility::isTableLocalizable($table) && $language != $row[$GLOBALS['TCA'][$table]['ctrl']['languageField']]) {
                                                // If children should be localized when the parent gets localized the first time, just do it:
-                                               if (($localizationMode != FALSE && isset($conf['behaviour']['localizeChildrenAtParentLocalization'])) && $conf['behaviour']['localizeChildrenAtParentLocalization']) {
+                                               if ($localizationMode != FALSE && isset($conf['behaviour']['localizeChildrenAtParentLocalization']) && $conf['behaviour']['localizeChildrenAtParentLocalization']) {
                                                        $newId = $this->localize($v['table'], $v['id'], $language);
                                                }
                                        } else {
@@ -3234,7 +3234,7 @@ class DataHandler {
                        $newValue = array();
                        foreach ($theFileValues as $file) {
                                if (trim($file)) {
-                                       $realFile = str_replace('//', '/', ($dest . '/') . trim($file));
+                                       $realFile = str_replace('//', '/', $dest . '/' . trim($file));
                                        if (@is_file($realFile)) {
                                                $newValue[] = $realFile;
                                        }
@@ -3264,7 +3264,7 @@ class DataHandler {
                        $this->include_filefunctions = 1;
                }
                // Select all RTEmagic files in the reference table from the table/ID
-               $recs = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('*', 'sys_refindex', (((((((('ref_table=' . $GLOBALS['TYPO3_DB']->fullQuoteStr('_FILE', 'sys_refindex')) . ' AND ref_string LIKE ') . $GLOBALS['TYPO3_DB']->fullQuoteStr('%/RTEmagic%', 'sys_refindex')) . ' AND softref_key=') . $GLOBALS['TYPO3_DB']->fullQuoteStr('images', 'sys_refindex')) . ' AND tablename=') . $GLOBALS['TYPO3_DB']->fullQuoteStr($table, 'sys_refindex')) . ' AND recuid=') . intval($theNewSQLID), '', 'sorting DESC');
+               $recs = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('*', 'sys_refindex', 'ref_table=' . $GLOBALS['TYPO3_DB']->fullQuoteStr('_FILE', 'sys_refindex') . ' AND ref_string LIKE ' . $GLOBALS['TYPO3_DB']->fullQuoteStr('%/RTEmagic%', 'sys_refindex') . ' AND softref_key=' . $GLOBALS['TYPO3_DB']->fullQuoteStr('images', 'sys_refindex') . ' AND tablename=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($table, 'sys_refindex') . ' AND recuid=' . intval($theNewSQLID), '', 'sorting DESC');
                // Traverse the files found and copy them:
                if (is_array($recs)) {
                        foreach ($recs as $rec) {
@@ -3272,7 +3272,7 @@ class DataHandler {
                                $fileInfo = array();
                                if (\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($filename, 'RTEmagicC_')) {
                                        $fileInfo['exists'] = @is_file((PATH_site . $rec['ref_string']));
-                                       $fileInfo['original'] = (substr($rec['ref_string'], 0, -strlen($filename)) . 'RTEmagicP_') . preg_replace('/\\.[[:alnum:]]+$/', '', substr($filename, 10));
+                                       $fileInfo['original'] = substr($rec['ref_string'], 0, -strlen($filename)) . 'RTEmagicP_' . preg_replace('/\\.[[:alnum:]]+$/', '', substr($filename, 10));
                                        $fileInfo['original_exists'] = @is_file((PATH_site . $fileInfo['original']));
                                        // CODE from tx_impexp and class.rte_images.php adapted for use here:
                                        if ($fileInfo['exists'] && $fileInfo['original_exists']) {
@@ -3280,14 +3280,14 @@ class DataHandler {
                                                $dirPrefix = dirname($rec['ref_string']) . '/';
                                                $rteOrigName = basename($fileInfo['original']);
                                                // If filename looks like an RTE file, and the directory is in "uploads/", then process as a RTE file!
-                                               if (($rteOrigName && \TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($dirPrefix, 'uploads/')) && @is_dir((PATH_site . $dirPrefix))) {
+                                               if ($rteOrigName && \TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($dirPrefix, 'uploads/') && @is_dir((PATH_site . $dirPrefix))) {
                                                        // RTE:
                                                        // From the "original" RTE filename, produce a new "original" destination filename which is unused.
                                                        $origDestName = $this->fileFunc->getUniqueName($rteOrigName, PATH_site . $dirPrefix);
                                                        // Create copy file name:
                                                        $pI = pathinfo($rec['ref_string']);
-                                                       $copyDestName = (((dirname($origDestName) . '/RTEmagicC_') . substr(basename($origDestName), 10)) . '.') . $pI['extension'];
-                                                       if (((!@is_file($copyDestName) && !@is_file($origDestName)) && $origDestName === \TYPO3\CMS\Core\Utility\GeneralUtility::getFileAbsFileName($origDestName)) && $copyDestName === \TYPO3\CMS\Core\Utility\GeneralUtility::getFileAbsFileName($copyDestName)) {
+                                                       $copyDestName = dirname($origDestName) . '/RTEmagicC_' . substr(basename($origDestName), 10) . '.' . $pI['extension'];
+                                                       if (!@is_file($copyDestName) && !@is_file($origDestName) && $origDestName === \TYPO3\CMS\Core\Utility\GeneralUtility::getFileAbsFileName($origDestName) && $copyDestName === \TYPO3\CMS\Core\Utility\GeneralUtility::getFileAbsFileName($copyDestName)) {
                                                                // Making copies:
                                                                \TYPO3\CMS\Core\Utility\GeneralUtility::upload_copy_move(PATH_site . $fileInfo['original'], $origDestName);
                                                                \TYPO3\CMS\Core\Utility\GeneralUtility::upload_copy_move(PATH_site . $rec['ref_string'], $copyDestName);
@@ -3302,7 +3302,7 @@ class DataHandler {
                                                                                echo $this->newlog('TYPO3\\CMS\\Core\\Database\\ReferenceIndex::setReferenceValue(): ' . $error, 1);
                                                                        }
                                                                } else {
-                                                                       $this->newlog(('File "' . $copyDestName) . '" was not created!', 1);
+                                                                       $this->newlog('File "' . $copyDestName . '" was not created!', 1);
                                                                }
                                                        } else {
                                                                $this->newlog('Could not construct new unique names for file!', 1);
@@ -3311,7 +3311,7 @@ class DataHandler {
                                                        $this->newlog('Maybe directory of file was not within "uploads/"?', 1);
                                                }
                                        } else {
-                                               $this->newlog(((('Trying to copy RTEmagic files (' . $rec['ref_string']) . ' / ') . $fileInfo['original']) . ') but one or both were missing', 1);
+                                               $this->newlog('Trying to copy RTEmagic files (' . $rec['ref_string'] . ' / ' . $fileInfo['original'] . ') but one or both were missing', 1);
                                        }
                                }
                        }
@@ -3332,7 +3332,7 @@ class DataHandler {
         */
        public function copyL10nOverlayRecords($table, $uid, $destPid, $first = 0, $overrideValues = array(), $excludeFields = '') {
                // There's no need to perform this for page-records or for tables that are not localizeable
-               if ((!\TYPO3\CMS\Backend\Utility\BackendUtility::isTableLocalizable($table) || !empty($GLOBALS['TCA'][$table]['ctrl']['transForeignTable'])) || !empty($GLOBALS['TCA'][$table]['ctrl']['transOrigPointerTable'])) {
+               if (!\TYPO3\CMS\Backend\Utility\BackendUtility::isTableLocalizable($table) || !empty($GLOBALS['TCA'][$table]['ctrl']['transForeignTable']) || !empty($GLOBALS['TCA'][$table]['ctrl']['transOrigPointerTable'])) {
                        return;
                }
                $where = '';
@@ -3436,13 +3436,13 @@ class DataHandler {
                                                        $this->moveRecord_raw($table, $uid, $destPid);
                                                }
                                        } else {
-                                               $this->log($table, $uid, 4, 0, 1, 'Attempt to move record \'%s\' (%s) without having permissions to insert.', 14, array($propArr['header'], ($table . ':') . $uid), $propArr['event_pid']);
+                                               $this->log($table, $uid, 4, 0, 1, 'Attempt to move record \'%s\' (%s) without having permissions to insert.', 14, array($propArr['header'], $table . ':' . $uid), $propArr['event_pid']);
                                        }
                                } else {
-                                       $this->log($table, $uid, 4, 0, 1, 'Attempt to move record \'%s\' (%s) without having permissions to do so.', 14, array($propArr['header'], ($table . ':') . $uid), $propArr['event_pid']);
+                                       $this->log($table, $uid, 4, 0, 1, 'Attempt to move record \'%s\' (%s) without having permissions to do so.', 14, array($propArr['header'], $table . ':' . $uid), $propArr['event_pid']);
                                }
                        } else {
-                               $this->log($table, $uid, 4, 0, 1, ('Attempt to move record "%s" (%s) without having permissions to do so. [' . $this->BE_USER->errorMsg) . ']', 14, array($propArr['header'], ($table . ':') . $uid), $propArr['event_pid']);
+                               $this->log($table, $uid, 4, 0, 1, 'Attempt to move record "%s" (%s) without having permissions to do so. [' . $this->BE_USER->errorMsg . ']', 14, array($propArr['header'], $table . ':' . $uid), $propArr['event_pid']);
                        }
                }
        }
@@ -3513,12 +3513,12 @@ class DataHandler {
                                $newpagePropArr = $this->getRecordProperties('pages', $destPid);
                                if ($destPid != $propArr['pid']) {
                                        // Logged to old page
-                                       $this->log($table, $uid, 4, $destPid, 0, 'Moved record \'%s\' (%s) to page \'%s\' (%s)', 2, array($propArr['header'], ($table . ':') . $uid, $newpagePropArr['header'], $newPropArr['pid']), $propArr['pid']);
+                                       $this->log($table, $uid, 4, $destPid, 0, 'Moved record \'%s\' (%s) to page \'%s\' (%s)', 2, array($propArr['header'], $table . ':' . $uid, $newpagePropArr['header'], $newPropArr['pid']), $propArr['pid']);
                                        // Logged to new page
-                                       $this->log($table, $uid, 4, $destPid, 0, 'Moved record \'%s\' (%s) from page \'%s\' (%s)', 3, array($propArr['header'], ($table . ':') . $uid, $oldpagePropArr['header'], $propArr['pid']), $destPid);
+                                       $this->log($table, $uid, 4, $destPid, 0, 'Moved record \'%s\' (%s) from page \'%s\' (%s)', 3, array($propArr['header'], $table . ':' . $uid, $oldpagePropArr['header'], $propArr['pid']), $destPid);
                                } else {
                                        // Logged to new page
-                                       $this->log($table, $uid, 4, $destPid, 0, 'Moved record \'%s\' (%s) on page \'%s\' (%s)', 4, array($propArr['header'], ($table . ':') . $uid, $oldpagePropArr['header'], $propArr['pid']), $destPid);
+                                       $this->log($table, $uid, 4, $destPid, 0, 'Moved record \'%s\' (%s) on page \'%s\' (%s)', 4, array($propArr['header'], $table . ':' . $uid, $oldpagePropArr['header'], $propArr['pid']), $destPid);
                                }
                                // Clear cache after moving
                                $this->clear_cache($table, $uid);
@@ -3566,12 +3566,12 @@ class DataHandler {
                                                if ($destPid != $propArr['pid']) {
                                                        $newpagePropArr = $this->getRecordProperties('pages', $destPid);
                                                        // Logged to old page
-                                                       $this->log($table, $uid, 4, 0, 0, 'Moved record \'%s\' (%s) to page \'%s\' (%s)', 2, array($propArr['header'], ($table . ':') . $uid, $newpagePropArr['header'], $newPropArr['pid']), $propArr['pid']);
+                                                       $this->log($table, $uid, 4, 0, 0, 'Moved record \'%s\' (%s) to page \'%s\' (%s)', 2, array($propArr['header'], $table . ':' . $uid, $newpagePropArr['header'], $newPropArr['pid']), $propArr['pid']);
                                                        // Logged to old page
-                                                       $this->log($table, $uid, 4, 0, 0, 'Moved record \'%s\' (%s) from page \'%s\' (%s)', 3, array($propArr['header'], ($table . ':') . $uid, $oldpagePropArr['header'], $propArr['pid']), $destPid);
+                                                       $this->log($table, $uid, 4, 0, 0, 'Moved record \'%s\' (%s) from page \'%s\' (%s)', 3, array($propArr['header'], $table . ':' . $uid, $oldpagePropArr['header'], $propArr['pid']), $destPid);
                                                } else {
                                                        // Logged to old page
-                                                       $this->log($table, $uid, 4, 0, 0, 'Moved record \'%s\' (%s) on page \'%s\' (%s)', 4, array($propArr['header'], ($table . ':') . $uid, $oldpagePropArr['header'], $propArr['pid']), $destPid);
+                                                       $this->log($table, $uid, 4, 0, 0, 'Moved record \'%s\' (%s) on page \'%s\' (%s)', 4, array($propArr['header'], $table . ':' . $uid, $oldpagePropArr['header'], $propArr['pid']), $destPid);
                                                }
                                                // Clear cache after moving
                                                $this->clear_cache($table, $uid);
@@ -3587,7 +3587,7 @@ class DataHandler {
                                        }
                                }
                        } else {
-                               $this->log($table, $uid, 4, 0, 1, 'Attempt to move record \'%s\' (%s) to after another record, although the table has no sorting row.', 13, array($propArr['header'], ($table . ':') . $uid), $propArr['event_pid']);
+                               $this->log($table, $uid, 4, 0, 1, 'Attempt to move record \'%s\' (%s) to after another record, although the table has no sorting row.', 13, array($propArr['header'], $table . ':' . $uid), $propArr['event_pid']);
                        }
                }
        }
@@ -3667,7 +3667,7 @@ class DataHandler {
         */
        public function moveL10nOverlayRecords($table, $uid, $destPid, $originalRecordDestinationPid) {
                // There's no need to perform this for page-records or not localizeable tables
-               if ((!\TYPO3\CMS\Backend\Utility\BackendUtility::isTableLocalizable($table) || !empty($GLOBALS['TCA'][$table]['ctrl']['transForeignTable'])) || !empty($GLOBALS['TCA'][$table]['ctrl']['transOrigPointerTable'])) {
+               if (!\TYPO3\CMS\Backend\Utility\BackendUtility::isTableLocalizable($table) || !empty($GLOBALS['TCA'][$table]['ctrl']['transForeignTable']) || !empty($GLOBALS['TCA'][$table]['ctrl']['transOrigPointerTable'])) {
                        return;
                }
                $where = '';
@@ -3713,10 +3713,10 @@ class DataHandler {
        public function localize($table, $uid, $language) {
                $newId = FALSE;
                $uid = intval($uid);
-               if (($GLOBALS['TCA'][$table] && $uid) && $this->isNestedElementCallRegistered($table, $uid, 'localize') === FALSE) {
+               if ($GLOBALS['TCA'][$table] && $uid && $this->isNestedElementCallRegistered($table, $uid, 'localize') === FALSE) {
                        $this->registerNestedElementCall($table, $uid, 'localize');
                        \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($table);
-                       if (($GLOBALS['TCA'][$table]['ctrl']['languageField'] && $GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField']) && !$GLOBALS['TCA'][$table]['ctrl']['transOrigPointerTable'] || $table === 'pages') {
+                       if ($GLOBALS['TCA'][$table]['ctrl']['languageField'] && $GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField'] && !$GLOBALS['TCA'][$table]['ctrl']['transOrigPointerTable'] || $table === 'pages') {
                                if ($langRec = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecord('sys_language', intval($language), 'uid,title')) {
                                        if ($this->doesRecordExist($table, $uid, 'show')) {
                                                // Getting workspace overlay if possible - this will localize versions in workspace if any
@@ -3725,7 +3725,7 @@ class DataHandler {
                                                        if ($row[$GLOBALS['TCA'][$table]['ctrl']['languageField']] <= 0 || $table === 'pages') {
                                                                if ($row[$GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField']] == 0 || $table === 'pages') {
                                                                        if ($table === 'pages') {
-                                                                               $pass = $GLOBALS['TCA'][$table]['ctrl']['transForeignTable'] === 'pages_language_overlay' && !\TYPO3\CMS\Backend\Utility\BackendUtility::getRecordsByField('pages_language_overlay', 'pid', $uid, (((' AND ' . $GLOBALS['TCA']['pages_language_overlay']['ctrl']['languageField']) . '=') . intval($langRec['uid'])));
+                                                                               $pass = $GLOBALS['TCA'][$table]['ctrl']['transForeignTable'] === 'pages_language_overlay' && !\TYPO3\CMS\Backend\Utility\BackendUtility::getRecordsByField('pages_language_overlay', 'pid', $uid, (' AND ' . $GLOBALS['TCA']['pages_language_overlay']['ctrl']['languageField'] . '=' . intval($langRec['uid'])));
                                                                                $Ttable = 'pages_language_overlay';
                                                                                \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($Ttable);
                                                                        } else {
@@ -3754,11 +3754,11 @@ class DataHandler {
                                                                                                                $translateToMsg = @sprintf($TSConfig['translateToMessage'], $langRec['title']);
                                                                                                        }
                                                                                                        if (!strlen($translateToMsg)) {
-                                                                                                               $translateToMsg = ('Translate to ' . $langRec['title']) . ':';
+                                                                                                               $translateToMsg = 'Translate to ' . $langRec['title'] . ':';
                                                                                                        }
-                                                                                                       $overrideValues[$fN] = (('[' . $translateToMsg) . '] ') . $row[$fN];
+                                                                                                       $overrideValues[$fN] = '[' . $translateToMsg . '] ' . $row[$fN];
                                                                                                }
-                                                                                       } elseif ((\TYPO3\CMS\Core\Utility\GeneralUtility::inList('exclude,noCopy,mergeIfNotBlank', $fCfg['l10n_mode']) && $fN != $GLOBALS['TCA'][$Ttable]['ctrl']['languageField']) && $fN != $GLOBALS['TCA'][$Ttable]['ctrl']['transOrigPointerField']) {
+                                                                                       } elseif (\TYPO3\CMS\Core\Utility\GeneralUtility::inList('exclude,noCopy,mergeIfNotBlank', $fCfg['l10n_mode']) && $fN != $GLOBALS['TCA'][$Ttable]['ctrl']['languageField'] && $fN != $GLOBALS['TCA'][$Ttable]['ctrl']['transOrigPointerField']) {
                                                                                                // Otherwise, do not copy field (unless it is the language field or
                                                                                                // pointer to the original language)
                                                                                                $excludeFields[] = $fN;
@@ -3808,7 +3808,7 @@ class DataHandler {
                                                $this->newlog('Attempt to localize record without permission', 1);
                                        }
                                } else {
-                                       $this->newlog(('Sys language UID "' . $language) . '" not found valid!', 1);
+                                       $this->newlog('Sys language UID "' . $language . '" not found valid!', 1);
                                }
                        } else {
                                $this->newlog('Localization failed; "languageField" and "transOrigPointerField" must be defined for the table!', 1);
@@ -3830,7 +3830,7 @@ class DataHandler {
                $parts = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $command);
                $field = $parts[0];
                $type = $parts[1];
-               if (($field && (\TYPO3\CMS\Core\Utility\GeneralUtility::inList('localize,synchronize', $type) || \TYPO3\CMS\Core\Utility\MathUtility::canBeInterpretedAsInteger($type))) && isset($GLOBALS['TCA'][$table]['columns'][$field]['config'])) {
+               if ($field && (\TYPO3\CMS\Core\Utility\GeneralUtility::inList('localize,synchronize', $type) || \TYPO3\CMS\Core\Utility\MathUtility::canBeInterpretedAsInteger($type)) && isset($GLOBALS['TCA'][$table]['columns'][$field]['config'])) {
                        $config = $GLOBALS['TCA'][$table]['columns'][$field]['config'];
                        $foreignTable = $config['foreign_table'];
                        $localizationMode = \TYPO3\CMS\Backend\Utility\BackendUtility::getInlineLocalizationMode($table, $config);
@@ -3839,12 +3839,12 @@ class DataHandler {
                                $language = intval($parentRecord[$GLOBALS['TCA'][$table]['ctrl']['languageField']]);
                                $transOrigPointer = intval($parentRecord[$GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField']]);
                                $childTransOrigPointerField = $GLOBALS['TCA'][$foreignTable]['ctrl']['transOrigPointerField'];
-                               if ((($parentRecord && is_array($parentRecord)) && $language > 0) && $transOrigPointer) {
+                               if ($parentRecord && is_array($parentRecord) && $language > 0 && $transOrigPointer) {
                                        $inlineSubType = $this->getInlineFieldType($config);
                                        $transOrigRecord = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecordWSOL($table, $transOrigPointer);
                                        if ($inlineSubType !== FALSE) {
                                                $removeArray = array();
-                                               $mmTable = ($inlineSubType == 'mm' && isset($config['MM'])) && $config['MM'] ? $config['MM'] : '';
+                                               $mmTable = $inlineSubType == 'mm' && isset($config['MM']) && $config['MM'] ? $config['MM'] : '';
                                                // Fetch children from original language parent:
                                                /** @var $dbAnalysisOriginal \TYPO3\CMS\Core\Database\RelationHandler */
                                                $dbAnalysisOriginal = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Database\\RelationHandler');
@@ -4093,7 +4093,7 @@ class DataHandler {
                                                }
                                                $this->log($table, $uid, $state, 0, 0, $message, 0, array(
                                                        $propArr['header'],
-                                                       ($table . ':') . $uid,
+                                                       $table . ':' . $uid,
                                                        $pagePropArr['header'],
                                                        $propArr['pid']
                                                ), $propArr['event_pid']);
@@ -4114,7 +4114,7 @@ class DataHandler {
                                        $this->log($table, $uid, 3, 0, 1, 'Attempt to delete record without delete-permissions');
                                }
                        } else {
-                               $this->log($table, $uid, 3, 0, 1, ('Attempt to delete record without delete-permissions. [' . $this->BE_USER->errorMsg) . ']');
+                               $this->log($table, $uid, 3, 0, 1, 'Attempt to delete record without delete-permissions. [' . $this->BE_USER->errorMsg . ']');
                        }
                }
        }
@@ -4140,7 +4140,7 @@ class DataHandler {
                                if (@is_file($dat['ID_absFile'])) {
                                        unlink($dat['ID_absFile']);
                                } else {
-                                       $this->log('', 0, 3, 0, 100, ('Delete: Referenced file \'' . $dat['ID_absFile']) . '\' that was supposed to be deleted together with its record which didn\'t exist');
+                                       $this->log('', 0, 3, 0, 100, 'Delete: Referenced file \'' . $dat['ID_absFile'] . '\' that was supposed to be deleted together with its record which didn\'t exist');
                                }
                        }
                }
@@ -4189,7 +4189,7 @@ class DataHandler {
                if ($uid) {
                        foreach (array_keys($GLOBALS['TCA']) as $table) {
                                if ($table != 'pages') {
-                                       $mres = $GLOBALS['TYPO3_DB']->exec_SELECTquery('uid', $table, ('pid=' . intval($uid)) . $this->deleteClause($table));
+                                       $mres = $GLOBALS['TYPO3_DB']->exec_SELECTquery('uid', $table, 'pid=' . intval($uid) . $this->deleteClause($table));
                                        while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($mres)) {
                                                $this->deleteVersionsForRecord($table, $row['uid'], $forceHardDelete);
                                                $this->deleteRecord($table, $row['uid'], TRUE, $forceHardDelete);
@@ -4287,7 +4287,7 @@ class DataHandler {
                        if (!$page['deleted']) {
                                $result = TRUE;
                        } else {
-                               $this->log($table, $uid, 'isRecordUndeletable', '', 1, ((('Record cannot be undeleted since the page containing it is deleted! Undelete page "' . $page['title']) . ' (UID: ') . $page['uid']) . ')" first');
+                               $this->log($table, $uid, 'isRecordUndeletable', '', 1, 'Record cannot be undeleted since the page containing it is deleted! Undelete page "' . $page['title'] . ' (UID: ' . $page['uid'] . ')" first');
                        }
                } else {
                        // The page containing the record is on rootlevel, so there is no parent record to check, and the record can be undeleted:
@@ -4350,7 +4350,7 @@ class DataHandler {
                                }
                        }
                } elseif ($this->isReferenceField($conf)) {
-                       $allowedTables = $conf['type'] == 'group' ? $conf['allowed'] : ($conf['foreign_table'] . ',') . $conf['neg_foreign_table'];
+                       $allowedTables = $conf['type'] == 'group' ? $conf['allowed'] : $conf['foreign_table'] . ',' . $conf['neg_foreign_table'];
                        $prependName = $conf['type'] == 'group' ? $conf['prepend_tname'] : $conf['neg_foreign_table'];
                        $dbAnalysis = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Database\\RelationHandler');
                        $dbAnalysis->start($value, $allowedTables, $conf['MM'], $uid, $table, $conf);
@@ -4370,7 +4370,7 @@ class DataHandler {
         */
        public function deleteL10nOverlayRecords($table, $uid) {
                // Check whether table can be localized or has a different table defined to store localizations:
-               if ((!\TYPO3\CMS\Backend\Utility\BackendUtility::isTableLocalizable($table) || !empty($GLOBALS['TCA'][$table]['ctrl']['transForeignTable'])) || !empty($GLOBALS['TCA'][$table]['ctrl']['transOrigPointerTable'])) {
+               if (!\TYPO3\CMS\Backend\Utility\BackendUtility::isTableLocalizable($table) || !empty($GLOBALS['TCA'][$table]['ctrl']['transForeignTable']) || !empty($GLOBALS['TCA'][$table]['ctrl']['transOrigPointerTable'])) {
                        return;
                }
                $where = '';
@@ -4409,7 +4409,7 @@ class DataHandler {
                if ($this->isElementToBeDeleted($table, $id)) {
                        return NULL;
                }
-               if (($GLOBALS['TCA'][$table] && $GLOBALS['TCA'][$table]['ctrl']['versioningWS']) && $id > 0) {
+               if ($GLOBALS['TCA'][$table] && $GLOBALS['TCA'][$table]['ctrl']['versioningWS'] && $id > 0) {
                        if ($this->doesRecordExist($table, $id, 'show')) {
                                // Select main record:
                                $row = $this->recordInfo($table, $id, 'pid,t3ver_id,t3ver_state');
@@ -4420,16 +4420,16 @@ class DataHandler {
                                                if ($row['t3ver_state'] != 3) {
                                                        if (!$delete || !$this->cannotDeleteRecord($table, $id)) {
                                                                // Look for next version number:
-                                                               $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('t3ver_id', $table, (((('((pid=-1 && t3ver_oid=' . $id) . ') OR uid=') . $id) . ')') . $this->deleteClause($table), '', 't3ver_id DESC', '1');
+                                                               $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('t3ver_id', $table, '((pid=-1 && t3ver_oid=' . $id . ') OR uid=' . $id . ')' . $this->deleteClause($table), '', 't3ver_id DESC', '1');
                                                                list($highestVerNumber) = $GLOBALS['TYPO3_DB']->sql_fetch_row($res);
                                                                $GLOBALS['TYPO3_DB']->sql_free_result($res);
                                                                // Look for version number of the current:
-                                                               $subVer = ($row['t3ver_id'] . '.') . ($highestVerNumber + 1);
+                                                               $subVer = $row['t3ver_id'] . '.' . ($highestVerNumber + 1);
                                                                // Set up the values to override when making a raw-copy:
                                                                $overrideArray = array(
                                                                        't3ver_id' => $highestVerNumber + 1,
                                                                        't3ver_oid' => $id,
-                                                                       't3ver_label' => $label ? $label : ($subVer . ' / ') . date('d-m-Y H:m:s'),
+                                                                       't3ver_label' => $label ? $label : $subVer . ' / ' . date('d-m-Y H:m:s'),
                                                                        't3ver_wsid' => $this->BE_USER->workspace,
                                                                        't3ver_state' => $delete ? 2 : 0,
                                                                        't3ver_count' => 0,
@@ -4458,7 +4458,7 @@ class DataHandler {
                                                                        }
                                                                        return $this->copyRecord_raw($table, $id, -1, $overrideArray, $workspaceOptions);
                                                                } else {
-                                                                       $this->newlog(((((('Record "' . $table) . ':') . $id) . '" you wanted to versionize was already a version in the workspace (wsid=') . $this->BE_USER->workspace) . ')!', 1);
+                                                                       $this->newlog('Record "' . $table . ':' . $id . '" you wanted to versionize was already a version in the workspace (wsid=' . $this->BE_USER->workspace . ')!', 1);
                                                                }
                                                        } else {
                                                                $this->newlog('Record cannot be deleted: ' . $this->cannotDeleteRecord($table, $id), 1);
@@ -4467,16 +4467,16 @@ class DataHandler {
                                                        $this->newlog('Record cannot be versioned because it is a placeholder for a moving operation', 1);
                                                }
                                        } else {
-                                               $this->newlog(((('Record "' . $table) . ':') . $id) . '" you wanted to versionize was already a version in archive (pid=-1)!', 1);
+                                               $this->newlog('Record "' . $table . ':' . $id . '" you wanted to versionize was already a version in archive (pid=-1)!', 1);
                                        }
                                } else {
-                                       $this->newlog(((('Record "' . $table) . ':') . $id) . '" you wanted to versionize did not exist!', 1);
+                                       $this->newlog('Record "' . $table . ':' . $id . '" you wanted to versionize did not exist!', 1);
                                }
                        } else {
-                               $this->newlog((('You didnt have correct permissions to make a new version (copy) of this record "' . $table) . '" / ') . $id, 1);
+                               $this->newlog('You didnt have correct permissions to make a new version (copy) of this record "' . $table . '" / ' . $id, 1);
                        }
                } else {
-                       $this->newlog((('Versioning is not supported for this table "' . $table) . '" / ') . $id, 1);
+                       $this->newlog('Versioning is not supported for this table "' . $table . '" / ' . $id, 1);
                }
        }
 
@@ -4498,7 +4498,7 @@ class DataHandler {
                foreach ($GLOBALS['TCA'][$table]['columns'] as $field => $fConf) {
                        $conf = $fConf['config'];
                        if ($this->isReferenceField($conf)) {
-                               $allowedTables = $conf['type'] == 'group' ? $conf['allowed'] : ($conf['foreign_table'] . ',') . $conf['neg_foreign_table'];
+                               $allowedTables = $conf['type'] == 'group' ? $conf['allowed'] : $conf['foreign_table'] . ',' . $conf['neg_foreign_table'];
                                $prependName = $conf['type'] == 'group' ? $conf['prepend_tname'] : $conf['neg_foreign_table'];
                                if ($conf['MM']) {
                                        /** @var $dbAnalysis \TYPO3\CMS\Core\Database\RelationHandler */
@@ -4550,13 +4550,13 @@ class DataHandler {
                // Extract parameters:
                list($table, $uid, $field) = $pParams;
                if ($this->isReferenceField($dsConf)) {
-                       $allowedTables = $dsConf['type'] == 'group' ? $dsConf['allowed'] : ($dsConf['foreign_table'] . ',') . $dsConf['neg_foreign_table'];
+                       $allowedTables = $dsConf['type'] == 'group' ? $dsConf['allowed'] : $dsConf['foreign_table'] . ',' . $dsConf['neg_foreign_table'];
                        $prependName = $dsConf['type'] == 'group' ? $dsConf['prepend_tname'] : $dsConf['neg_foreign_table'];
                        if ($dsConf['MM']) {
                                /** @var $dbAnalysis \TYPO3\CMS\Core\Database\RelationHandler */
                                $dbAnalysis = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Database\\RelationHandler');
                                $dbAnalysis->start('', $allowedTables, $dsConf['MM'], $uid, $table, $dsConf);
-                               $this->version_remapMMForVersionSwap_reg[$uid][($field . '/') . $path] = array($dbAnalysis, $dsConf['MM'], $prependName);
+                               $this->version_remapMMForVersionSwap_reg[$uid][$field . '/' . $path] = array($dbAnalysis, $dsConf['MM'], $prependName);
                        }
                }
        }
@@ -4697,7 +4697,7 @@ class DataHandler {
                // Will be set TRUE if an upgrade should be done...
                $set = FALSE;
                // Allowed tables for references.
-               $allowedTables = $conf['type'] == 'group' ? $conf['allowed'] : ($conf['foreign_table'] . ',') . $conf['neg_foreign_table'];
+               $allowedTables = $conf['type'] == 'group' ? $conf['allowed'] : $conf['foreign_table'] . ',' . $conf['neg_foreign_table'];
                // Table name to prepend the UID
                $prependName = $conf['type'] == 'group' ? $conf['prepend_tname'] : '';
                // Which tables that should possibly not be remapped
@@ -4763,7 +4763,7 @@ class DataHandler {
                                if ($thePidToUpdate) {
                                        $updateValues = array('pid' => $thePidToUpdate);
                                        foreach ($dbAnalysis->itemArray as $v) {
-                                               if (($v['id'] && $v['table']) && is_null(\TYPO3\CMS\Backend\Utility\BackendUtility::getLiveVersionIdOfRecord($v['table'], $v['id']))) {
+                                               if ($v['id'] && $v['table'] && is_null(\TYPO3\CMS\Backend\Utility\BackendUtility::getLiveVersionIdOfRecord($v['table'], $v['id']))) {
                                                        $GLOBALS['TYPO3_DB']->exec_UPDATEquery($v['table'], 'uid=' . intval($v['id']), $updateValues);
                                                }
                                        }
@@ -4883,7 +4883,7 @@ class DataHandler {
         */
        protected function triggerRemapAction($table, $id, array $callback, array $arguments, $forceRemapStackActions = FALSE) {
                // Check whether the affected record is marked to be remapped:
-               if ((!$forceRemapStackActions && !isset($this->remapStackRecords[$table][$id])) && !isset($this->remapStackChildIds[$id])) {
+               if (!$forceRemapStackActions && !isset($this->remapStackRecords[$table][$id]) && !isset($this->remapStackChildIds[$id])) {
                        call_user_func_array($callback, $arguments);
                } else {
                        $this->addRemapAction($table, $id, $callback, $arguments);
@@ -4988,11 +4988,11 @@ class DataHandler {
         * @todo Define visibility
         */
        public function isRecordInWebMount($table, $id) {
-               if (!isset($this->isRecordInWebMount_Cache[(($table . ':') . $id)])) {
+               if (!isset($this->isRecordInWebMount_Cache[($table . ':' . $id)])) {
                        $recP = $this->getRecordProperties($table, $id);
-                       $this->isRecordInWebMount_Cache[($table . ':') . $id] = $this->isInWebMount($recP['event_pid']);
+                       $this->isRecordInWebMount_Cache[$table . ':' . $id] = $this->isInWebMount($recP['event_pid']);
                }
-               return $this->isRecordInWebMount_Cache[($table .&n