[TASK] Namespacing: Use-statement for common classes like GeneralUtility 41/22041/3
authorStefan Neufeind <typo3.neufeind@speedpartner.de>
Sat, 6 Jul 2013 16:24:33 +0000 (18:24 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Sun, 7 Jul 2013 00:07:53 +0000 (02:07 +0200)
Change-Id: I43d6ef559b0b46e6302ea891b4d39501a99423a6
Resolves: #49745
Releases: 6.2
Reviewed-on: https://review.typo3.org/22041
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
78 files changed:
typo3/sysext/core/Classes/Authentication/AbstractUserAuthentication.php
typo3/sysext/core/Classes/Authentication/BackendUserAuthentication.php
typo3/sysext/core/Classes/Charset/CharsetConverter.php
typo3/sysext/core/Classes/Configuration/TypoScript/ConditionMatching/AbstractConditionMatcher.php
typo3/sysext/core/Classes/DataHandling/DataHandler.php
typo3/sysext/core/Classes/Database/QueryView.php
typo3/sysext/core/Classes/Database/ReferenceIndex.php
typo3/sysext/core/Classes/Database/SoftReferenceIndex.php
typo3/sysext/core/Classes/Html/HtmlParser.php
typo3/sysext/core/Classes/Html/RteHtmlParser.php
typo3/sysext/core/Classes/Imaging/GraphicalFunctions.php
typo3/sysext/core/Classes/Page/PageRenderer.php
typo3/sysext/core/Classes/Resource/ResourceFactory.php
typo3/sysext/core/Classes/Resource/ResourceStorage.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/ExtensionManagementUtility.php
typo3/sysext/core/Classes/Utility/File/BasicFileUtility.php
typo3/sysext/core/Tests/Unit/Utility/ExtensionMangementUtilityTest.php
typo3/sysext/dbal/Classes/Database/DatabaseConnection.php
typo3/sysext/feedit/Classes/FrontendEditPanel.php
typo3/sysext/filelist/Classes/Controller/FileListController.php
typo3/sysext/filelist/Classes/FileList.php
typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php
typo3/sysext/frontend/Classes/ContentObject/FilesContentObject.php
typo3/sysext/frontend/Classes/ContentObject/FormContentObject.php
typo3/sysext/frontend/Classes/ContentObject/Menu/AbstractMenuContentObject.php
typo3/sysext/frontend/Classes/ContentObject/Menu/GraphicalMenuContentObject.php
typo3/sysext/frontend/Classes/Controller/TranslationStatusController.php
typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php
typo3/sysext/frontend/Classes/Imaging/GifBuilder.php
typo3/sysext/frontend/Classes/Page/PageGenerator.php
typo3/sysext/frontend/Classes/Page/PageRepository.php
typo3/sysext/frontend/Classes/Plugin/AbstractPlugin.php
typo3/sysext/frontend/Classes/View/AdminPanelView.php
typo3/sysext/impexp/Classes/Controller/ImportExportController.php
typo3/sysext/impexp/Classes/ImportExport.php
typo3/sysext/indexed_search/Classes/Controller/IndexedPagesController.php
typo3/sysext/indexed_search/Classes/Controller/SearchController.php
typo3/sysext/indexed_search/Classes/Controller/SearchFormController.php
typo3/sysext/indexed_search/Classes/Hook/CrawlerHook.php
typo3/sysext/indexed_search/Classes/Indexer.php
typo3/sysext/info_pagetsconfig/Classes/Controller/InfoPageTyposcriptConfigController.php
typo3/sysext/linkvalidator/Classes/Report/LinkValidatorReport.php
typo3/sysext/linkvalidator/Classes/Task/ValidatorTask.php
typo3/sysext/lowlevel/Classes/CleanerCommand.php
typo3/sysext/lowlevel/Classes/View/ConfigurationView.php
typo3/sysext/lowlevel/Classes/View/DatabaseIntegrityView.php
typo3/sysext/perm/Classes/Controller/PermissionModuleController.php
typo3/sysext/recordlist/Classes/Browser/ElementBrowser.php
typo3/sysext/recordlist/Classes/RecordList.php
typo3/sysext/recordlist/Classes/RecordList/AbstractDatabaseRecordList.php
typo3/sysext/recordlist/Classes/RecordList/DatabaseRecordList.php
typo3/sysext/recycler/Classes/Controller/RecyclerAjaxController.php
typo3/sysext/reports/Classes/Report/Status/ConfigurationStatus.php
typo3/sysext/reports/Classes/Report/Status/SecurityStatus.php
typo3/sysext/rtehtmlarea/Classes/BrowseLinks.php
typo3/sysext/rtehtmlarea/Classes/ContentParser.php
typo3/sysext/rtehtmlarea/Classes/Controller/SpellCheckingController.php
typo3/sysext/rtehtmlarea/Classes/RteHtmlAreaBase.php
typo3/sysext/rtehtmlarea/Classes/SelectImage.php
typo3/sysext/scheduler/Classes/Controller/SchedulerModuleController.php
typo3/sysext/setup/Classes/Controller/SetupModuleController.php
typo3/sysext/sys_action/Classes/ActionTask.php
typo3/sysext/taskcenter/Classes/Controller/TaskModuleController.php
typo3/sysext/tstemplate/Classes/Controller/TypoScriptTemplateInformationModuleFunctionController.php
typo3/sysext/tstemplate/Classes/Controller/TypoScriptTemplateModuleController.php
typo3/sysext/tstemplate/Classes/Controller/TypoScriptTemplateObjectBrowserModuleFunctionController.php
typo3/sysext/version/Classes/Controller/VersionModuleController.php
typo3/sysext/version/Classes/Hook/DataHandlerHook.php
typo3/sysext/version/Classes/Hook/PreviewHook.php
typo3/sysext/wizard_crpages/Classes/Controller/CreatePagesWizardModuleFunctionController.php
typo3/sysext/workspaces/Classes/Controller/PreviewController.php
typo3/sysext/workspaces/Classes/Controller/ReviewController.php
typo3/sysext/workspaces/Classes/ExtDirect/ActionHandler.php
typo3/sysext/workspaces/Classes/Service/StagesService.php
typo3/sysext/workspaces/Classes/Service/WorkspaceService.php

index 169d5ac..c3fcd92 100644 (file)
@@ -27,6 +27,8 @@ namespace TYPO3\CMS\Core\Authentication;
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
 
+use TYPO3\CMS\Core\Utility\GeneralUtility;
+
 /**
  * Authentication of users in TYPO3
  *
@@ -378,7 +380,7 @@ abstract class AbstractUserAuthentication {
                        $this->writeDevLog = TRUE;
                }
                if ($this->writeDevLog) {
-                       \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('## Beginning of auth logging.', 'TYPO3\\CMS\\Core\\Authentication\\AbstractUserAuthentication');
+                       GeneralUtility::devLog('## Beginning of auth logging.', 'TYPO3\\CMS\\Core\\Authentication\\AbstractUserAuthentication');
                }
                // Init vars.
                $mode = '';
@@ -388,11 +390,11 @@ abstract class AbstractUserAuthentication {
                $this->svConfig = $GLOBALS['TYPO3_CONF_VARS']['SVCONF']['auth'];
                // If we have a flash client, take the ID from the GP
                if (!$id && $GLOBALS['CLIENT']['BROWSER'] == 'flash') {
-                       $id = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP($this->name);
+                       $id = GeneralUtility::_GP($this->name);
                }
                // If fallback to get mode....
                if (!$id && $this->getFallBack && $this->get_name) {
-                       $id = isset($_GET[$this->get_name]) ? \TYPO3\CMS\Core\Utility\GeneralUtility::_GET($this->get_name) : '';
+                       $id = isset($_GET[$this->get_name]) ? GeneralUtility::_GET($this->get_name) : '';
                        if (strlen($id) != $this->hash_length) {
                                $id = '';
                        }
@@ -424,8 +426,8 @@ abstract class AbstractUserAuthentication {
                        $pragmaHeader = 'no-cache';
                        // Prevent error message in IE when using a https connection
                        // see http://forge.typo3.org/issues/24125
-                       $clientInfo = \TYPO3\CMS\Core\Utility\GeneralUtility::clientInfo();
-                       if ($clientInfo['BROWSER'] === 'msie' && \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_SSL')) {
+                       $clientInfo = GeneralUtility::clientInfo();
+                       if ($clientInfo['BROWSER'] === 'msie' && GeneralUtility::getIndpEnv('TYPO3_SSL')) {
                                // Some IEs can not handle no-cache
                                // see http://support.microsoft.com/kb/323308/en-us
                                $cacheControlHeader = 'must-revalidate';
@@ -444,7 +446,7 @@ abstract class AbstractUserAuthentication {
                // Determine whether we need to skip session update.
                // This is used mainly for checking session timeout without
                // refreshing the session itself while checking.
-               if (\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('skipSessionUpdate')) {
+               if (GeneralUtility::_GP('skipSessionUpdate')) {
                        $skipSessionUpdate = TRUE;
                } else {
                        $skipSessionUpdate = FALSE;
@@ -452,10 +454,10 @@ abstract class AbstractUserAuthentication {
                // Re-read user session
                $this->user = $this->fetchUserSession($skipSessionUpdate);
                if ($this->writeDevLog && is_array($this->user)) {
-                       \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('User session finally read: ' . \TYPO3\CMS\Core\Utility\GeneralUtility::arrayToLogString($this->user, array($this->userid_column, $this->username_column)), 'TYPO3\\CMS\\Core\\Authentication\\AbstractUserAuthentication', -1);
+                       GeneralUtility::devLog('User session finally read: ' . GeneralUtility::arrayToLogString($this->user, array($this->userid_column, $this->username_column)), 'TYPO3\\CMS\\Core\\Authentication\\AbstractUserAuthentication', -1);
                }
                if ($this->writeDevLog && !is_array($this->user)) {
-                       \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('No user session found.', 'TYPO3\\CMS\\Core\\Authentication\\AbstractUserAuthentication', 2);
+                       GeneralUtility::devLog('No user session found.', 'TYPO3\\CMS\\Core\\Authentication\\AbstractUserAuthentication', 2);
                }
                // Setting cookies
                if (!$this->dontSetCookie) {
@@ -467,7 +469,7 @@ abstract class AbstractUserAuthentication {
                                $_params = array(
                                        'pObj' => &$this
                                );
-                               \TYPO3\CMS\Core\Utility\GeneralUtility::callUserFunction($funcName, $_params, $this);
+                               GeneralUtility::callUserFunction($funcName, $_params, $this);
                        }
                }
                // Set $this->gc_time if not explicitely specified
@@ -494,22 +496,22 @@ abstract class AbstractUserAuthentication {
                        // Get the domain to be used for the cookie (if any):
                        $cookieDomain = $this->getCookieDomain();
                        // If no cookie domain is set, use the base path:
-                       $cookiePath = $cookieDomain ? '/' : \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_SITE_PATH');
+                       $cookiePath = $cookieDomain ? '/' : GeneralUtility::getIndpEnv('TYPO3_SITE_PATH');
                        // If the cookie lifetime is set, use it:
                        $cookieExpire = $isRefreshTimeBasedCookie ? $GLOBALS['EXEC_TIME'] + $this->lifetime : 0;
                        // Use the secure option when the current request is served by a secure connection:
-                       $cookieSecure = (bool) $settings['cookieSecure'] && \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_SSL');
+                       $cookieSecure = (bool) $settings['cookieSecure'] && GeneralUtility::getIndpEnv('TYPO3_SSL');
                        // Deliver cookies only via HTTP and prevent possible XSS by JavaScript:
                        $cookieHttpOnly = (bool) $settings['cookieHttpOnly'];
                        // Do not set cookie if cookieSecure is set to "1" (force HTTPS) and no secure channel is used:
-                       if ((int) $settings['cookieSecure'] !== 1 || \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_SSL')) {
+                       if ((int) $settings['cookieSecure'] !== 1 || GeneralUtility::getIndpEnv('TYPO3_SSL')) {
                                setcookie($this->name, $this->id, $cookieExpire, $cookiePath, $cookieDomain, $cookieSecure, $cookieHttpOnly);
                        } else {
                                throw new \TYPO3\CMS\Core\Exception('Cookie was not set since HTTPS was forced in $TYPO3_CONF_VARS[SYS][cookieSecure].', 1254325546);
                        }
                        if ($this->writeDevLog) {
                                $devLogMessage = ($isRefreshTimeBasedCookie ? 'Updated Cookie: ' : 'Set Cookie: ') . $this->id;
-                               \TYPO3\CMS\Core\Utility\GeneralUtility::devLog($devLogMessage . ($cookieDomain ? ', ' . $cookieDomain : ''), 'TYPO3\\CMS\\Core\\Authentication\\AbstractUserAuthentication');
+                               GeneralUtility::devLog($devLogMessage . ($cookieDomain ? ', ' . $cookieDomain : ''), 'TYPO3\\CMS\\Core\\Authentication\\AbstractUserAuthentication');
                        }
                }
        }
@@ -531,9 +533,9 @@ abstract class AbstractUserAuthentication {
                if ($cookieDomain) {
                        if ($cookieDomain[0] == '/') {
                                $match = array();
-                               $matchCnt = @preg_match($cookieDomain, \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_HOST_ONLY'), $match);
+                               $matchCnt = @preg_match($cookieDomain, 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);
+                                       GeneralUtility::sysLog('The regular expression for the cookie domain (' . $cookieDomain . ') contains errors. The session is not shared across sub-domains.', 'Core', GeneralUtility::SYSLOG_SEVERITY_ERROR);
                                } elseif ($matchCnt) {
                                        $result = $match[0];
                                }
@@ -559,9 +561,9 @@ abstract class AbstractUserAuthentication {
         */
        protected function getCookie($cookieName) {
                if (isset($_SERVER['HTTP_COOKIE'])) {
-                       $cookies = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(';', $_SERVER['HTTP_COOKIE']);
+                       $cookies = GeneralUtility::trimExplode(';', $_SERVER['HTTP_COOKIE']);
                        foreach ($cookies as $cookie) {
-                               list($name, $value) = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode('=', $cookie);
+                               list($name, $value) = GeneralUtility::trimExplode('=', $cookie);
                                if (strcmp(trim($name), $cookieName) == 0) {
                                        // Use the last one
                                        $cookieValue = urldecode($value);
@@ -614,14 +616,14 @@ abstract class AbstractUserAuthentication {
                // Indicates if an active authentication failed (not auto login)
                $this->loginFailure = FALSE;
                if ($this->writeDevLog) {
-                       \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('Login type: ' . $this->loginType, 'TYPO3\\CMS\\Core\\Authentication\\AbstractUserAuthentication');
+                       GeneralUtility::devLog('Login type: ' . $this->loginType, 'TYPO3\\CMS\\Core\\Authentication\\AbstractUserAuthentication');
                }
                // The info array provide additional information for auth services
                $authInfo = $this->getAuthInfoArray();
                // Get Login/Logout data submitted by a form or params
                $loginData = $this->getLoginFormData();
                if ($this->writeDevLog) {
-                       \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('Login data: ' . \TYPO3\CMS\Core\Utility\GeneralUtility::arrayToLogString($loginData), 'TYPO3\\CMS\\Core\\Authentication\\AbstractUserAuthentication');
+                       GeneralUtility::devLog('Login data: ' . GeneralUtility::arrayToLogString($loginData), 'TYPO3\\CMS\\Core\\Authentication\\AbstractUserAuthentication');
                }
                // Active logout (eg. with "logout" button)
                if ($loginData['status'] == 'logout') {
@@ -631,7 +633,7 @@ abstract class AbstractUserAuthentication {
                        }
                        // Logout written to log
                        if ($this->writeDevLog) {
-                               \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('User logged out. Id: ' . $this->id, 'TYPO3\\CMS\\Core\\Authentication\\AbstractUserAuthentication', -1);
+                               GeneralUtility::devLog('User logged out. Id: ' . $this->id, 'TYPO3\\CMS\\Core\\Authentication\\AbstractUserAuthentication', -1);
                        }
                        $this->logoff();
                }
@@ -639,11 +641,11 @@ abstract class AbstractUserAuthentication {
                if ($loginData['status'] == 'login') {
                        $activeLogin = TRUE;
                        if ($this->writeDevLog) {
-                               \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('Active login (eg. with login form)', 'TYPO3\\CMS\\Core\\Authentication\\AbstractUserAuthentication');
+                               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']) {
-                               $httpHost = \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_HOST_ONLY');
+                               $httpHost = 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 />
                                                It\'s possible that the environment variable HTTP_REFERER is not passed to the script because of a proxy.<br />
@@ -662,7 +664,7 @@ abstract class AbstractUserAuthentication {
                // Determine whether we need to skip session update.
                // This is used mainly for checking session timeout without
                // refreshing the session itself while checking.
-               if (\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('skipSessionUpdate')) {
+               if (GeneralUtility::_GP('skipSessionUpdate')) {
                        $skipSessionUpdate = TRUE;
                } else {
                        $skipSessionUpdate = FALSE;
@@ -672,10 +674,10 @@ abstract class AbstractUserAuthentication {
                $haveSession = is_array($authInfo['userSession']) ? TRUE : FALSE;
                if ($this->writeDevLog) {
                        if ($haveSession) {
-                               \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('User session found: ' . \TYPO3\CMS\Core\Utility\GeneralUtility::arrayToLogString($authInfo['userSession'], array($this->userid_column, $this->username_column)), 'TYPO3\\CMS\\Core\\Authentication\\AbstractUserAuthentication', 0);
+                               GeneralUtility::devLog('User session found: ' . GeneralUtility::arrayToLogString($authInfo['userSession'], array($this->userid_column, $this->username_column)), 'TYPO3\\CMS\\Core\\Authentication\\AbstractUserAuthentication', 0);
                        }
                        if (is_array($this->svConfig['setup'])) {
-                               \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('SV setup: ' . \TYPO3\CMS\Core\Utility\GeneralUtility::arrayToLogString($this->svConfig['setup']), 'TYPO3\\CMS\\Core\\Authentication\\AbstractUserAuthentication', 0);
+                               GeneralUtility::devLog('SV setup: ' . GeneralUtility::arrayToLogString($this->svConfig['setup']), 'TYPO3\\CMS\\Core\\Authentication\\AbstractUserAuthentication', 0);
                        }
                }
                // Fetch user if ...
@@ -684,13 +686,13 @@ abstract class AbstractUserAuthentication {
                        // First found user will be used
                        $serviceChain = '';
                        $subType = 'getUser' . $this->loginType;
-                       while (is_object($serviceObj = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstanceService('auth', $subType, $serviceChain))) {
+                       while (is_object($serviceObj = GeneralUtility::makeInstanceService('auth', $subType, $serviceChain))) {
                                $serviceChain .= ',' . $serviceObj->getServiceKey();
                                $serviceObj->initAuth($subType, $loginData, $authInfo, $this);
                                if ($row = $serviceObj->getUser()) {
                                        $tempuserArr[] = $row;
                                        if ($this->writeDevLog) {
-                                               \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('User found: ' . \TYPO3\CMS\Core\Utility\GeneralUtility::arrayToLogString($row, array($this->userid_column, $this->username_column)), 'TYPO3\\CMS\\Core\\Authentication\\AbstractUserAuthentication', 0);
+                                               GeneralUtility::devLog('User found: ' . GeneralUtility::arrayToLogString($row, array($this->userid_column, $this->username_column)), 'TYPO3\\CMS\\Core\\Authentication\\AbstractUserAuthentication', 0);
                                        }
                                        // User found, just stop to search for more if not configured to go on
                                        if (!$this->svConfig['setup'][($this->loginType . '_fetchAllUsers')]) {
@@ -701,16 +703,16 @@ abstract class AbstractUserAuthentication {
                        }
                        unset($serviceObj);
                        if ($this->writeDevLog && $this->svConfig['setup'][$this->loginType . '_alwaysFetchUser']) {
-                               \TYPO3\CMS\Core\Utility\GeneralUtility::devLog($this->loginType . '_alwaysFetchUser option is enabled', 'TYPO3\\CMS\\Core\\Authentication\\AbstractUserAuthentication');
+                               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');
+                               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');
+                               GeneralUtility::devLog('No user found by services', 'TYPO3\\CMS\\Core\\Authentication\\AbstractUserAuthentication');
                        }
                        if ($this->writeDevLog && count($tempuserArr)) {
-                               \TYPO3\CMS\Core\Utility\GeneralUtility::devLog(count($tempuserArr) . ' user records found by services', 'TYPO3\\CMS\\Core\\Authentication\\AbstractUserAuthentication');
+                               GeneralUtility::devLog(count($tempuserArr) . ' user records found by services', 'TYPO3\\CMS\\Core\\Authentication\\AbstractUserAuthentication');
                        }
                }
                // If no new user was set we use the already found user session
@@ -720,14 +722,14 @@ abstract class AbstractUserAuthentication {
                        // User is authenticated because we found a user session
                        $authenticated = TRUE;
                        if ($this->writeDevLog) {
-                               \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('User session used: ' . \TYPO3\CMS\Core\Utility\GeneralUtility::arrayToLogString($authInfo['userSession'], array($this->userid_column, $this->username_column)), 'TYPO3\\CMS\\Core\\Authentication\\AbstractUserAuthentication');
+                               GeneralUtility::devLog('User session used: ' . GeneralUtility::arrayToLogString($authInfo['userSession'], array($this->userid_column, $this->username_column)), 'TYPO3\\CMS\\Core\\Authentication\\AbstractUserAuthentication');
                        }
                }
                // Re-auth user when 'auth'-service option is set
                if ($this->svConfig['setup'][$this->loginType . '_alwaysAuthUser']) {
                        $authenticated = FALSE;
                        if ($this->writeDevLog) {
-                               \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('alwaysAuthUser option is enabled', 'TYPO3\\CMS\\Core\\Authentication\\AbstractUserAuthentication');
+                               GeneralUtility::devLog('alwaysAuthUser option is enabled', 'TYPO3\\CMS\\Core\\Authentication\\AbstractUserAuthentication');
                        }
                }
                // Authenticate the user if needed
@@ -737,11 +739,11 @@ abstract class AbstractUserAuthentication {
                                // If one service returns FALSE then authentication failed
                                // a service might return 100 which means there's no reason to stop but the user can't be authenticated by that service
                                if ($this->writeDevLog) {
-                                       \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('Auth user: ' . \TYPO3\CMS\Core\Utility\GeneralUtility::arrayToLogString($tempuser), 'TYPO3\\CMS\\Core\\Authentication\\AbstractUserAuthentication');
+                                       GeneralUtility::devLog('Auth user: ' . GeneralUtility::arrayToLogString($tempuser), 'TYPO3\\CMS\\Core\\Authentication\\AbstractUserAuthentication');
                                }
                                $serviceChain = '';
                                $subType = 'authUser' . $this->loginType;
-                               while (is_object($serviceObj = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstanceService('auth', $subType, $serviceChain))) {
+                               while (is_object($serviceObj = GeneralUtility::makeInstanceService('auth', $subType, $serviceChain))) {
                                        $serviceChain .= ',' . $serviceObj->getServiceKey();
                                        $serviceObj->initAuth($subType, $loginData, $authInfo, $this);
                                        if (($ret = $serviceObj->authUser($tempuser)) > 0) {
@@ -762,7 +764,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');
+                                       GeneralUtility::devLog($subType . ' auth services called: ' . $serviceChain, 'TYPO3\\CMS\\Core\\Authentication\\AbstractUserAuthentication');
                                }
                                if ($authenticated) {
                                        // Leave foreach() because a user is authenticated
@@ -782,19 +784,19 @@ abstract class AbstractUserAuthentication {
                        }
                        // User logged in - write that to the log!
                        if ($this->writeStdLog && $activeLogin) {
-                               $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']);
+                               $this->writelog(255, 1, 0, 1, 'User %s logged in from %s (%s)', array($tempuser[$this->username_column], GeneralUtility::getIndpEnv('REMOTE_ADDR'), 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);
+                               GeneralUtility::devLog('User ' . $tempuser[$this->username_column] . ' logged in from ' . GeneralUtility::getIndpEnv('REMOTE_ADDR') . ' (' . 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);
+                               GeneralUtility::devLog('User ' . $tempuser[$this->username_column] . ' authenticated from ' . GeneralUtility::getIndpEnv('REMOTE_ADDR') . ' (' . 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));
+                               $requestStr = substr(GeneralUtility::getIndpEnv('TYPO3_REQUEST_SCRIPT'), strlen(GeneralUtility::getIndpEnv('TYPO3_SITE_URL') . TYPO3_mainDir));
                                $backendScript = \TYPO3\CMS\Backend\Utility\BackendUtility::getBackendScript();
-                               if ($requestStr == $backendScript && \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_SSL')) {
-                                       list(, $url) = explode('://', \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_SITE_URL'), 2);
+                               if ($requestStr == $backendScript && GeneralUtility::getIndpEnv('TYPO3_SSL')) {
+                                       list(, $url) = explode('://', GeneralUtility::getIndpEnv('TYPO3_SITE_URL'), 2);
                                        list($server, $address) = explode('/', $url, 2);
                                        if (intval($GLOBALS['TYPO3_CONF_VARS']['BE']['lockSSLPort'])) {
                                                $sslPortSuffix = ':' . intval($GLOBALS['TYPO3_CONF_VARS']['BE']['lockSSLPort']);
@@ -807,16 +809,16 @@ abstract class AbstractUserAuthentication {
                } elseif ($activeLogin || count($tempuserArr)) {
                        $this->loginFailure = TRUE;
                        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);
+                               GeneralUtility::devLog('Login failed: ' . GeneralUtility::arrayToLogString($loginData), 'TYPO3\\CMS\\Core\\Authentication\\AbstractUserAuthentication', 2);
                        }
                        if ($this->writeDevLog && count($tempuserArr)) {
-                               \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('Login failed: ' . \TYPO3\CMS\Core\Utility\GeneralUtility::arrayToLogString($tempuser, array($this->userid_column, $this->username_column)), 'TYPO3\\CMS\\Core\\Authentication\\AbstractUserAuthentication', 2);
+                               GeneralUtility::devLog('Login failed: ' . GeneralUtility::arrayToLogString($tempuser, array($this->userid_column, $this->username_column)), 'TYPO3\\CMS\\Core\\Authentication\\AbstractUserAuthentication', 2);
                        }
                }
                // If there were a login failure, check to see if a warning email should be sent:
                if ($this->loginFailure && $activeLogin) {
                        if ($this->writeDevLog) {
-                               \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('Call checkLogFailures: ' . \TYPO3\CMS\Core\Utility\GeneralUtility::arrayToLogString(array('warningEmail' => $this->warningEmail, 'warningPeriod' => $this->warningPeriod, 'warningMax' => $this->warningMax)), 'TYPO3\\CMS\\Core\\Authentication\\AbstractUserAuthentication', -1);
+                               GeneralUtility::devLog('Call checkLogFailures: ' . GeneralUtility::arrayToLogString(array('warningEmail' => $this->warningEmail, 'warningPeriod' => $this->warningPeriod, 'warningMax' => $this->warningMax)), 'TYPO3\\CMS\\Core\\Authentication\\AbstractUserAuthentication', -1);
                        }
                        $this->checkLogFailures($this->warningEmail, $this->warningPeriod, $this->warningMax);
                }
@@ -828,7 +830,7 @@ abstract class AbstractUserAuthentication {
         * @return string The new session ID
         */
        public function createSessionId() {
-               return \TYPO3\CMS\Core\Utility\GeneralUtility::getRandomHexString($this->hash_length);
+               return GeneralUtility::getRandomHexString($this->hash_length);
        }
 
        /*************************
@@ -845,7 +847,7 @@ abstract class AbstractUserAuthentication {
         */
        public function createUserSession($tempuser) {
                if ($this->writeDevLog) {
-                       \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('Create session ses_id = ' . $this->id, 'TYPO3\\CMS\\Core\\Authentication\\AbstractUserAuthentication');
+                       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) . '
@@ -888,7 +890,7 @@ abstract class AbstractUserAuthentication {
        public function fetchUserSession($skipSessionUpdate = FALSE) {
                $user = '';
                if ($this->writeDevLog) {
-                       \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('Fetch session ses_id = ' . $this->id, 'TYPO3\\CMS\\Core\\Authentication\\AbstractUserAuthentication');
+                       GeneralUtility::devLog('Fetch session ses_id = ' . $this->id, 'TYPO3\\CMS\\Core\\Authentication\\AbstractUserAuthentication');
                }
                // Fetch the user session from the DB
                $statement = $this->fetchUserSessionFromDB();
@@ -936,7 +938,7 @@ abstract class AbstractUserAuthentication {
         */
        public function logoff() {
                if ($this->writeDevLog) {
-                       \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('logoff: ses_id = ' . $this->id, 'TYPO3\\CMS\\Core\\Authentication\\AbstractUserAuthentication');
+                       GeneralUtility::devLog('logoff: ses_id = ' . $this->id, 'TYPO3\\CMS\\Core\\Authentication\\AbstractUserAuthentication');
                }
                // Release the locked records
                \TYPO3\CMS\Backend\Utility\BackendUtility::lockRecords();
@@ -945,7 +947,7 @@ abstract class AbstractUserAuthentication {
                        $_params = array();
                        foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauth.php']['logoff_pre_processing'] as $_funcRef) {
                                if ($_funcRef) {
-                                       \TYPO3\CMS\Core\Utility\GeneralUtility::callUserFunction($_funcRef, $_params, $this);
+                                       GeneralUtility::callUserFunction($_funcRef, $_params, $this);
                                }
                        }
                }
@@ -957,7 +959,7 @@ abstract class AbstractUserAuthentication {
                        $_params = array();
                        foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauth.php']['logoff_post_processing'] as $_funcRef) {
                                if ($_funcRef) {
-                                       \TYPO3\CMS\Core\Utility\GeneralUtility::callUserFunction($_funcRef, $_params, $this);
+                                       GeneralUtility::callUserFunction($_funcRef, $_params, $this);
                                }
                        }
                }
@@ -1000,7 +1002,7 @@ abstract class AbstractUserAuthentication {
                if ($GLOBALS['CLIENT']['BROWSER'] == 'flash') {
                        // 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()) {
+                       if (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 . '
@@ -1070,7 +1072,7 @@ abstract class AbstractUserAuthentication {
         * @access private
         */
        protected function ipLockClause_remoteIPNumber($parts) {
-               $IP = \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('REMOTE_ADDR');
+               $IP = GeneralUtility::getIndpEnv('REMOTE_ADDR');
                if ($parts >= 4) {
                        return $IP;
                } else {
@@ -1112,10 +1114,10 @@ abstract class AbstractUserAuthentication {
         */
        protected function hashLockClause_getHashInt() {
                $hashStr = '';
-               if (\TYPO3\CMS\Core\Utility\GeneralUtility::inList($this->lockHashKeyWords, 'useragent')) {
-                       $hashStr .= ':' . \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('HTTP_USER_AGENT');
+               if (GeneralUtility::inList($this->lockHashKeyWords, 'useragent')) {
+                       $hashStr .= ':' . GeneralUtility::getIndpEnv('HTTP_USER_AGENT');
                }
-               return \TYPO3\CMS\Core\Utility\GeneralUtility::md5int($hashStr);
+               return GeneralUtility::md5int($hashStr);
        }
 
        /*************************
@@ -1138,7 +1140,7 @@ 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');
+                               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)));
                }
@@ -1219,7 +1221,7 @@ abstract class AbstractUserAuthentication {
                $sesDat[$key] = $data;
                $this->user['ses_data'] = serialize($sesDat);
                if ($this->writeDevLog) {
-                       \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('setAndSaveSessionData: ses_id = ' . $this->user['ses_id'], 'TYPO3\\CMS\\Core\\Authentication\\AbstractUserAuthentication');
+                       GeneralUtility::devLog('setAndSaveSessionData: ses_id = ' . $this->user['ses_id'], 'TYPO3\\CMS\\Core\\Authentication\\AbstractUserAuthentication');
                }
                $GLOBALS['TYPO3_DB']->exec_UPDATEquery($this->session_table, 'ses_id=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($this->user['ses_id'], $this->session_table), array('ses_data' => $this->user['ses_data']));
        }
@@ -1239,15 +1241,15 @@ abstract class AbstractUserAuthentication {
        public function getLoginFormData() {
                $loginData = array();
                if ($this->getMethodEnabled) {
-                       $loginData['status'] = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP($this->formfield_status);
-                       $loginData['uname'] = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP($this->formfield_uname);
-                       $loginData['uident'] = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP($this->formfield_uident);
-                       $loginData['chalvalue'] = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP($this->formfield_chalvalue);
+                       $loginData['status'] = GeneralUtility::_GP($this->formfield_status);
+                       $loginData['uname'] = GeneralUtility::_GP($this->formfield_uname);
+                       $loginData['uident'] = GeneralUtility::_GP($this->formfield_uident);
+                       $loginData['chalvalue'] = GeneralUtility::_GP($this->formfield_chalvalue);
                } else {
-                       $loginData['status'] = \TYPO3\CMS\Core\Utility\GeneralUtility::_POST($this->formfield_status);
-                       $loginData['uname'] = \TYPO3\CMS\Core\Utility\GeneralUtility::_POST($this->formfield_uname);
-                       $loginData['uident'] = \TYPO3\CMS\Core\Utility\GeneralUtility::_POST($this->formfield_uident);
-                       $loginData['chalvalue'] = \TYPO3\CMS\Core\Utility\GeneralUtility::_POST($this->formfield_chalvalue);
+                       $loginData['status'] = GeneralUtility::_POST($this->formfield_status);
+                       $loginData['uname'] = GeneralUtility::_POST($this->formfield_uname);
+                       $loginData['uident'] = GeneralUtility::_POST($this->formfield_uident);
+                       $loginData['chalvalue'] = GeneralUtility::_POST($this->formfield_chalvalue);
                }
                // Only process the login data if a login is requested
                if ($loginData['status'] === 'login') {
@@ -1269,14 +1271,14 @@ abstract class AbstractUserAuthentication {
        public function processLoginData($loginData, $passwordTransmissionStrategy = '') {
                $passwordTransmissionStrategy = $passwordTransmissionStrategy ? $passwordTransmissionStrategy : ($GLOBALS['TYPO3_CONF_VARS'][$this->loginType]['loginSecurityLevel'] ? trim($GLOBALS['TYPO3_CONF_VARS'][$this->loginType]['loginSecurityLevel']) : $this->security_level);
                if ($this->writeDevLog) {
-                       \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('Login data before processing: ' . \TYPO3\CMS\Core\Utility\GeneralUtility::arrayToLogString($loginData), 'TYPO3\\CMS\\Core\\Authentication\\AbstractUserAuthentication');
+                       GeneralUtility::devLog('Login data before processing: ' . GeneralUtility::arrayToLogString($loginData), 'TYPO3\\CMS\\Core\\Authentication\\AbstractUserAuthentication');
                }
                $serviceChain = '';
                $subType = 'processLoginData' . $this->loginType;
                $authInfo = $this->getAuthInfoArray();
                $isLoginDataProcessed = FALSE;
                $processedLoginData = $loginData;
-               while (is_object($serviceObject = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstanceService('auth', $subType, $serviceChain))) {
+               while (is_object($serviceObject = GeneralUtility::makeInstanceService('auth', $subType, $serviceChain))) {
                        $serviceChain .= ',' . $serviceObject->getServiceKey();
                        $serviceObject->initAuth($subType, $loginData, $authInfo, $this);
                        $serviceResult = $serviceObject->processLoginData($processedLoginData, $passwordTransmissionStrategy);
@@ -1293,7 +1295,7 @@ abstract class AbstractUserAuthentication {
                if ($isLoginDataProcessed) {
                        $loginData = $processedLoginData;
                        if ($this->writeDevLog) {
-                               \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('Processed login data: ' . \TYPO3\CMS\Core\Utility\GeneralUtility::arrayToLogString($processedLoginData), 'TYPO3\\CMS\\Core\\Authentication\\AbstractUserAuthentication');
+                               GeneralUtility::devLog('Processed login data: ' . GeneralUtility::arrayToLogString($processedLoginData), 'TYPO3\\CMS\\Core\\Authentication\\AbstractUserAuthentication');
                        }
                }
                return $loginData;
@@ -1309,10 +1311,10 @@ abstract class AbstractUserAuthentication {
        public function getAuthInfoArray() {
                $authInfo = array();
                $authInfo['loginType'] = $this->loginType;
-               $authInfo['refInfo'] = parse_url(\TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('HTTP_REFERER'));
-               $authInfo['HTTP_HOST'] = \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('HTTP_HOST');
-               $authInfo['REMOTE_ADDR'] = \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('REMOTE_ADDR');
-               $authInfo['REMOTE_HOST'] = \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('REMOTE_HOST');
+               $authInfo['refInfo'] = parse_url(GeneralUtility::getIndpEnv('HTTP_REFERER'));
+               $authInfo['HTTP_HOST'] = GeneralUtility::getIndpEnv('HTTP_HOST');
+               $authInfo['REMOTE_ADDR'] = GeneralUtility::getIndpEnv('REMOTE_ADDR');
+               $authInfo['REMOTE_HOST'] = GeneralUtility::getIndpEnv('REMOTE_HOST');
                /** @deprecated the usage of $authInfo['security_level'] is deprecated since 4.7 */
                $authInfo['security_level'] = $this->security_level;
                $authInfo['showHiddenRecords'] = $this->showHiddenRecords;
@@ -1350,7 +1352,7 @@ 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);
+                                                       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;
index 2ff0d48..b054d57 100644 (file)
@@ -26,6 +26,10 @@ namespace TYPO3\CMS\Core\Authentication;
  *
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
+
+use TYPO3\CMS\Core\Utility\GeneralUtility;
+use TYPO3\CMS\Backend\Utility\BackendUtility;
+
 /**
  * TYPO3 backend user authentication
  * Contains most of the functions used for checking permissions, authenticating users,
@@ -374,7 +378,7 @@ class BackendUserAuthentication extends \TYPO3\CMS\Core\Authentication\AbstractU
        public function isMemberOfGroup($groupId) {
                $groupId = intval($groupId);
                if ($this->groupList && $groupId) {
-                       return \TYPO3\CMS\Core\Utility\GeneralUtility::inList($this->groupList, $groupId);
+                       return GeneralUtility::inList($this->groupList, $groupId);
                }
        }
 
@@ -418,7 +422,7 @@ class BackendUserAuthentication extends \TYPO3\CMS\Core\Authentication\AbstractU
                }
                $id = intval($id);
                // Check if input id is an offline version page in which case we will map id to the online version:
-               $checkRec = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecord('pages', $id, 'pid,t3ver_oid');
+               $checkRec = BackendUtility::getRecord('pages', $id, 'pid,t3ver_oid');
                if ($checkRec['pid'] == -1) {
                        $id = intval($checkRec['t3ver_oid']);
                }
@@ -427,7 +431,7 @@ class BackendUserAuthentication extends \TYPO3\CMS\Core\Authentication\AbstractU
                }
                if ($id > 0) {
                        $wM = $this->returnWebmounts();
-                       $rL = \TYPO3\CMS\Backend\Utility\BackendUtility::BEgetRootLine($id, ' AND ' . $readPerms);
+                       $rL = BackendUtility::BEgetRootLine($id, ' AND ' . $readPerms);
                        foreach ($rL as $v) {
                                if ($v['uid'] && in_array($v['uid'], $wM)) {
                                        return $v['uid'];
@@ -448,7 +452,7 @@ class BackendUserAuthentication extends \TYPO3\CMS\Core\Authentication\AbstractU
         * @todo Define visibility
         */
        public function modAccess($conf, $exitOnError) {
-               if (!\TYPO3\CMS\Backend\Utility\BackendUtility::isModuleSetInTBE_MODULES($conf['name'])) {
+               if (!BackendUtility::isModuleSetInTBE_MODULES($conf['name'])) {
                        if ($exitOnError) {
                                throw new \RuntimeException('Fatal Error: This module "' . $conf['name'] . '" is not enabled in TBE_MODULES', 1294586446);
                        }
@@ -456,7 +460,7 @@ class BackendUserAuthentication extends \TYPO3\CMS\Core\Authentication\AbstractU
                }
                // Workspaces check:
                if (\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::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 && GeneralUtility::inList($conf['workspaces'], 'online') || $this->workspace === -1 && GeneralUtility::inList($conf['workspaces'], 'offline') || $this->workspace > 0 && GeneralUtility::inList($conf['workspaces'], 'custom')) {
 
                        } else {
                                if ($exitOnError) {
@@ -515,7 +519,7 @@ class BackendUserAuthentication extends \TYPO3\CMS\Core\Authentication\AbstractU
                        if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauthgroup.php']['getPagePermsClause'])) {
                                foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauthgroup.php']['getPagePermsClause'] as $_funcRef) {
                                        $_params = array('currentClause' => $str, 'perms' => $perms);
-                                       $str = \TYPO3\CMS\Core\Utility\GeneralUtility::callUserFunction($_funcRef, $_params, $this);
+                                       $str = GeneralUtility::callUserFunction($_funcRef, $_params, $this);
                                }
                        }
                        return $str;
@@ -557,7 +561,7 @@ class BackendUserAuthentication extends \TYPO3\CMS\Core\Authentication\AbstractU
                                        'row' => $row,
                                        'outputPermissions' => $out
                                );
-                               $out = \TYPO3\CMS\Core\Utility\GeneralUtility::callUserFunction($_funcRef, $_params, $this);
+                               $out = GeneralUtility::callUserFunction($_funcRef, $_params, $this);
                        }
                }
                return $out;
@@ -581,7 +585,7 @@ class BackendUserAuthentication extends \TYPO3\CMS\Core\Authentication\AbstractU
                        $this->RTE_errors[] = 'RTE is not enabled in $TYPO3_CONF_VARS["BE"]["RTEenabled"]';
                }
                // Acquire RTE object:
-               $RTE = \TYPO3\CMS\Backend\Utility\BackendUtility::RTEgetObj();
+               $RTE = BackendUtility::RTEgetObj();
                if (!is_object($RTE)) {
                        $this->RTE_errors = array_merge($this->RTE_errors, $RTE);
                }
@@ -605,7 +609,7 @@ class BackendUserAuthentication extends \TYPO3\CMS\Core\Authentication\AbstractU
         */
        public function check($type, $value) {
                if (isset($this->groupData[$type])) {
-                       if ($this->isAdmin() || \TYPO3\CMS\Core\Utility\GeneralUtility::inList($this->groupData[$type], $value)) {
+                       if ($this->isAdmin() || GeneralUtility::inList($this->groupData[$type], $value)) {
                                return TRUE;
                        }
                }
@@ -641,12 +645,12 @@ class BackendUserAuthentication extends \TYPO3\CMS\Core\Authentication\AbstractU
                // Checking value:
                switch ((string) $authMode) {
                        case 'explicitAllow':
-                               if (!\TYPO3\CMS\Core\Utility\GeneralUtility::inList($this->groupData['explicit_allowdeny'], ($testValue . ':ALLOW'))) {
+                               if (!GeneralUtility::inList($this->groupData['explicit_allowdeny'], ($testValue . ':ALLOW'))) {
                                        $out = FALSE;
                                }
                                break;
                        case 'explicitDeny':
-                               if (\TYPO3\CMS\Core\Utility\GeneralUtility::inList($this->groupData['explicit_allowdeny'], $testValue . ':DENY')) {
+                               if (GeneralUtility::inList($this->groupData['explicit_allowdeny'], $testValue . ':DENY')) {
                                        $out = FALSE;
                                }
                                break;
@@ -658,12 +662,12 @@ class BackendUserAuthentication extends \TYPO3\CMS\Core\Authentication\AbstractU
                                                        if (!strcmp($iCfg[1], $value) && $iCfg[4]) {
                                                                switch ((string) $iCfg[4]) {
                                                                        case 'EXPL_ALLOW':
-                                                                               if (!\TYPO3\CMS\Core\Utility\GeneralUtility::inList($this->groupData['explicit_allowdeny'], ($testValue . ':ALLOW'))) {
+                                                                               if (!GeneralUtility::inList($this->groupData['explicit_allowdeny'], ($testValue . ':ALLOW'))) {
                                                                                        $out = FALSE;
                                                                                }
                                                                                break;
                                                                        case 'EXPL_DENY':
-                                                                               if (\TYPO3\CMS\Core\Utility\GeneralUtility::inList($this->groupData['explicit_allowdeny'], $testValue . ':DENY')) {
+                                                                               if (GeneralUtility::inList($this->groupData['explicit_allowdeny'], $testValue . ':DENY')) {
                                                                                        $out = FALSE;
                                                                                }
                                                                                break;
@@ -707,7 +711,7 @@ class BackendUserAuthentication extends \TYPO3\CMS\Core\Authentication\AbstractU
         */
        public function checkFullLanguagesAccess($table, $record) {
                $recordLocalizationAccess = $this->checkLanguageAccess(0);
-               if ($recordLocalizationAccess && (\TYPO3\CMS\Backend\Utility\BackendUtility::isTableLocalizable($table) || isset($GLOBALS['TCA'][$table]['ctrl']['transForeignTable']))) {
+               if ($recordLocalizationAccess && (BackendUtility::isTableLocalizable($table) || isset($GLOBALS['TCA'][$table]['ctrl']['transForeignTable']))) {
                        if (isset($GLOBALS['TCA'][$table]['ctrl']['transForeignTable'])) {
                                $l10nTable = $GLOBALS['TCA'][$table]['ctrl']['transForeignTable'];
                                $pointerField = $GLOBALS['TCA'][$l10nTable]['ctrl']['transOrigPointerField'];
@@ -717,7 +721,7 @@ class BackendUserAuthentication extends \TYPO3\CMS\Core\Authentication\AbstractU
                                $pointerField = $GLOBALS['TCA'][$l10nTable]['ctrl']['transOrigPointerField'];
                                $pointerValue = $record[$pointerField] > 0 ? $record[$pointerField] : $record['uid'];
                        }
-                       $recordLocalizations = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecordsByField($l10nTable, $pointerField, $pointerValue, '', '', '', '1');
+                       $recordLocalizations = BackendUtility::getRecordsByField($l10nTable, $pointerField, $pointerValue, '', '', '', '1');
                        if (is_array($recordLocalizations)) {
                                foreach ($recordLocalizations as $localization) {
                                        $recordLocalizationAccess = $recordLocalizationAccess && $this->checkLanguageAccess($localization[$GLOBALS['TCA'][$l10nTable]['ctrl']['languageField']]);
@@ -754,9 +758,9 @@ class BackendUserAuthentication extends \TYPO3\CMS\Core\Authentication\AbstractU
                        // Fetching the record if the $idOrRow variable was not an array on input:
                        if (!is_array($idOrRow)) {
                                if ($deletedRecord) {
-                                       $idOrRow = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecord($table, $idOrRow, '*', '', FALSE);
+                                       $idOrRow = BackendUtility::getRecord($table, $idOrRow, '*', '', FALSE);
                                } else {
-                                       $idOrRow = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecord($table, $idOrRow);
+                                       $idOrRow = BackendUtility::getRecord($table, $idOrRow);
                                }
                                if (!is_array($idOrRow)) {
                                        $this->errorMsg = 'ERROR: Record could not be fetched.';
@@ -816,7 +820,7 @@ class BackendUserAuthentication extends \TYPO3\CMS\Core\Authentication\AbstractU
                                                'idOrRow' => $idOrRow,
                                                'newRecord' => $newRecord
                                        );
-                                       if (!\TYPO3\CMS\Core\Utility\GeneralUtility::callUserFunction($funcRef, $params, $this)) {
+                                       if (!GeneralUtility::callUserFunction($funcRef, $params, $this)) {
                                                return FALSE;
                                        }
                                }
@@ -887,7 +891,7 @@ class BackendUserAuthentication extends \TYPO3\CMS\Core\Authentication\AbstractU
                // Only test offline spaces:
                if ($this->workspace !== 0) {
                        if (!is_array($recData)) {
-                               $recData = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecord($table, $recData, 'pid' . ($GLOBALS['TCA'][$table]['ctrl']['versioningWS'] ? ',t3ver_wsid,t3ver_stage' : ''));
+                               $recData = BackendUtility::getRecord($table, $recData, 'pid' . ($GLOBALS['TCA'][$table]['ctrl']['versioningWS'] ? ',t3ver_wsid,t3ver_stage' : ''));
                        }
                        if (is_array($recData)) {
                                // We are testing a "version" (identified by a pid of -1): it can be edited provided that workspace matches and versioning is enabled for the table.
@@ -935,7 +939,7 @@ class BackendUserAuthentication extends \TYPO3\CMS\Core\Authentication\AbstractU
        public function workspaceCannotEditOfflineVersion($table, $recData) {
                if ($GLOBALS['TCA'][$table]['ctrl']['versioningWS']) {
                        if (!is_array($recData)) {
-                               $recData = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecord($table, $recData, 'uid,pid,t3ver_wsid,t3ver_stage');
+                               $recData = BackendUtility::getRecord($table, $recData, 'uid,pid,t3ver_wsid,t3ver_stage');
                        }
                        if (is_array($recData)) {
                                if ((int) $recData['pid'] === -1) {
@@ -1007,11 +1011,11 @@ 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 && !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']) {
-                       \TYPO3\CMS\Core\Utility\GeneralUtility::deprecationLog('Usage of disable_autocreate feature is deprecated since 4.5.');
+                       GeneralUtility::deprecationLog('Usage of disable_autocreate feature is deprecated since 4.5.');
                }
        }
 
@@ -1034,17 +1038,17 @@ class BackendUserAuthentication extends \TYPO3\CMS\Core\Authentication\AbstractU
                        $stage = intval($stage);
                        $stat = $this->checkWorkspaceCurrent();
                        // Check if custom staging is activated
-                       $workspaceRec = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecord('sys_workspace', $stat['uid']);
+                       $workspaceRec = BackendUtility::getRecord('sys_workspace', $stat['uid']);
                        if ($workspaceRec['custom_stages'] > 0 && $stage !== 0 && $stage !== -10) {
                                // Get custom stage record
-                               $workspaceStageRec = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecord('sys_workspace_stage', $stage);
+                               $workspaceStageRec = BackendUtility::getRecord('sys_workspace_stage', $stage);
                                // Check if the user is responsible for the current stage
-                               if (\TYPO3\CMS\Core\Utility\GeneralUtility::inList($workspaceStageRec['responsible_persons'], 'be_users_' . $this->user['uid']) && $stat['_ACCESS'] === 'member' || $stat['_ACCESS'] === 'owner') {
+                               if (GeneralUtility::inList($workspaceStageRec['responsible_persons'], 'be_users_' . $this->user['uid']) && $stat['_ACCESS'] === 'member' || $stat['_ACCESS'] === 'owner') {
                                        return TRUE;
                                }
                                // Check if the user is in a group which is responsible for the current stage
                                foreach ($this->userGroupsUID as $groupUid) {
-                                       if (\TYPO3\CMS\Core\Utility\GeneralUtility::inList($workspaceStageRec['responsible_persons'], 'be_groups_' . $groupUid) && $stat['_ACCESS'] === 'member' || $stat['_ACCESS'] === 'owner') {
+                                       if (GeneralUtility::inList($workspaceStageRec['responsible_persons'], 'be_groups_' . $groupUid) && $stat['_ACCESS'] === 'member' || $stat['_ACCESS'] === 'owner') {
                                                return TRUE;
                                        }
                                }
@@ -1270,7 +1274,7 @@ class BackendUserAuthentication extends \TYPO3\CMS\Core\Authentication\AbstractU
                        $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');
+                               $parseObj = GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Configuration\\TsConfigParser');
                                $res = $parseObj->parseTSconfig($this->userTS_text, 'userTS');
                                if ($res) {
                                        $this->userTS = $res['TSconfig'];
@@ -1279,14 +1283,14 @@ class BackendUserAuthentication extends \TYPO3\CMS\Core\Authentication\AbstractU
                        } else {
                                // Parsing the user TSconfig (or getting from cache)
                                $hash = md5('userTS:' . $this->userTS_text);
-                               $cachedContent = \TYPO3\CMS\Backend\Utility\BackendUtility::getHash($hash);
+                               $cachedContent = BackendUtility::getHash($hash);
                                if (isset($cachedContent) && !$this->userTS_dontGetCached) {
                                        $this->userTS = unserialize($cachedContent);
                                } else {
-                                       $parseObj = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\TypoScript\\Parser\\TypoScriptParser');
+                                       $parseObj = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\TypoScript\\Parser\\TypoScriptParser');
                                        $parseObj->parse($this->userTS_text);
                                        $this->userTS = $parseObj->setup;
-                                       \TYPO3\CMS\Backend\Utility\BackendUtility::storeHash($hash, serialize($this->userTS), 'BE_USER_TSconfig');
+                                       BackendUtility::storeHash($hash, serialize($this->userTS), 'BE_USER_TSconfig');
                                        // Update UC:
                                        $this->userTSUpdated = 1;
                                }
@@ -1297,15 +1301,15 @@ class BackendUserAuthentication extends \TYPO3\CMS\Core\Authentication\AbstractU
                                $this->dataLists['webmount_list'] = '0,' . $this->dataLists['webmount_list'];
                        }
                        // 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_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']);
-                       $this->groupData['allowed_languages'] = \TYPO3\CMS\Core\Utility\GeneralUtility::uniqueList($this->dataLists['allowed_languages']);
-                       $this->groupData['custom_options'] = \TYPO3\CMS\Core\Utility\GeneralUtility::uniqueList($this->dataLists['custom_options']);
-                       $this->groupData['modules'] = \TYPO3\CMS\Core\Utility\GeneralUtility::uniqueList($this->dataLists['modList']);
+                       $this->groupData['webmounts'] = GeneralUtility::uniqueList($this->dataLists['webmount_list']);
+                       $this->groupData['pagetypes_select'] = GeneralUtility::uniqueList($this->dataLists['pagetypes_select']);
+                       $this->groupData['tables_select'] = GeneralUtility::uniqueList($this->dataLists['tables_modify'] . ',' . $this->dataLists['tables_select']);
+                       $this->groupData['tables_modify'] = GeneralUtility::uniqueList($this->dataLists['tables_modify']);
+                       $this->groupData['non_exclude_fields'] = GeneralUtility::uniqueList($this->dataLists['non_exclude_fields']);
+                       $this->groupData['explicit_allowdeny'] = GeneralUtility::uniqueList($this->dataLists['explicit_allowdeny']);
+                       $this->groupData['allowed_languages'] = GeneralUtility::uniqueList($this->dataLists['allowed_languages']);
+                       $this->groupData['custom_options'] = GeneralUtility::uniqueList($this->dataLists['custom_options']);
+                       $this->groupData['modules'] = GeneralUtility::uniqueList($this->dataLists['modList']);
                        $this->groupData['fileoper_perms'] = $this->dataLists['fileoper_perms'];
                        $this->groupData['workspace_perms'] = $this->dataLists['workspace_perms'];
                        // Populating the $this->userGroupsUID -array with the groups in the order in which they were LAST included.!!
@@ -1345,12 +1349,12 @@ 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') . '\')';
+               $lockToDomain_SQL = ' AND (lockToDomain=\'\' OR lockToDomain IS NULL OR lockToDomain=\'' . 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) {
-                               $hookObj = \TYPO3\CMS\Core\Utility\GeneralUtility::getUserObj($classRef);
+                               $hookObj = GeneralUtility::getUserObj($classRef);
                                if (method_exists($hookObj, 'fetchGroupQuery_processQuery')) {
                                        $whereSQL = $hookObj->fetchGroupQuery_processQuery($this, $grList, $idList, $whereSQL);
                                }
@@ -1363,17 +1367,17 @@ class BackendUserAuthentication extends \TYPO3\CMS\Core\Authentication\AbstractU
                }
                $GLOBALS['TYPO3_DB']->sql_free_result($res);
                // Traversing records in the correct order
-               $include_staticArr = \TYPO3\CMS\Core\Utility\GeneralUtility::intExplode(',', $grList);
+               $include_staticArr = GeneralUtility::intExplode(',', $grList);
                // Traversing list
                foreach ($include_staticArr as $key => $uid) {
                        // Get row:
                        $row = $this->userGroups[$uid];
                        // Must be an array and $uid should not be in the idList, because then it is somewhere previously in the grouplist
-                       if (is_array($row) && !\TYPO3\CMS\Core\Utility\GeneralUtility::inList($idList, $uid)) {
+                       if (is_array($row) && !GeneralUtility::inList($idList, $uid)) {
                                // Include sub groups
                                if (trim($row['subgroup'])) {
                                        // Make integer list
-                                       $theList = implode(',', \TYPO3\CMS\Core\Utility\GeneralUtility::intExplode(',', $row['subgroup']));
+                                       $theList = implode(',', GeneralUtility::intExplode(',', $row['subgroup']));
                                        // Call recursively, pass along list of already processed groups so they are not recursed again.
                                        $this->fetchGroups($theList, $idList . ',' . $uid);
                                }
@@ -1414,7 +1418,7 @@ class BackendUserAuthentication extends \TYPO3\CMS\Core\Authentication\AbstractU
                if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauthgroup.php']['fetchGroups_postProcessing'])) {
                        foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauthgroup.php']['fetchGroups_postProcessing'] as $_funcRef) {
                                $_params = array();
-                               \TYPO3\CMS\Core\Utility\GeneralUtility::callUserFunction($_funcRef, $_params, $this);
+                               GeneralUtility::callUserFunction($_funcRef, $_params, $this);
                        }
                }
        }
@@ -1443,7 +1447,7 @@ class BackendUserAuthentication extends \TYPO3\CMS\Core\Authentication\AbstractU
        protected function initializeFileStorages() {
                $this->fileStorages = array();
                /** @var $storageRepository \TYPO3\CMS\Core\Resource\StorageRepository */
-               $storageRepository = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Resource\\StorageRepository');
+               $storageRepository = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Resource\\StorageRepository');
                // Admin users have all file storages visible, without any filters
                if ($this->isAdmin()) {
                        $storageObjects = $storageRepository->findAll();
@@ -1483,7 +1487,7 @@ class BackendUserAuthentication extends \TYPO3\CMS\Core\Authentication\AbstractU
                                }
                        }
                        // Processing filemounts (both from the user and the groups)
-                       $this->dataLists['filemount_list'] = \TYPO3\CMS\Core\Utility\GeneralUtility::uniqueList($this->dataLists['filemount_list']);
+                       $this->dataLists['filemount_list'] = 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);
@@ -1706,7 +1710,7 @@ class BackendUserAuthentication extends \TYPO3\CMS\Core\Authentication\AbstractU
         * @deprecated since TYPO3 6.0, use the TSconfig settings instead
         */
        public function getFileoperationPermissions() {
-               \TYPO3\CMS\Core\Utility\GeneralUtility::logDeprecatedFunction();
+               GeneralUtility::logDeprecatedFunction();
                if ($this->isAdmin()) {
                        return 31;
                } else {
@@ -1731,7 +1735,7 @@ class BackendUserAuthentication extends \TYPO3\CMS\Core\Authentication\AbstractU
         * @todo Define visibility
         */
        public function addFileMount($title, $altTitle, $path, $webspace, $type) {
-               \TYPO3\CMS\Core\Utility\GeneralUtility::logDeprecatedFunction();
+               GeneralUtility::logDeprecatedFunction();
                // Return FALSE if fileadminDir is not set and we try to mount a relative path
                if ($webspace && !$GLOBALS['TYPO3_CONF_VARS']['BE']['fileadminDir']) {
                        return FALSE;
@@ -1743,7 +1747,7 @@ class BackendUserAuthentication extends \TYPO3\CMS\Core\Authentication\AbstractU
                        $path = str_replace('\\', '/', $path);
                }
                // If the path is TRUE and validates as a valid path string:
-               if ($path && \TYPO3\CMS\Core\Utility\GeneralUtility::validPathStr($path)) {
+               if ($path && GeneralUtility::validPathStr($path)) {
                        // normalize path: remove leading '/' and './', and trailing '/' and '/.'
                        $path = trim($path);
                        $path = preg_replace('#^\\.?/|/\\.?$#', '', $path);
@@ -1762,7 +1766,7 @@ class BackendUserAuthentication extends \TYPO3\CMS\Core\Authentication\AbstractU
                                }
                                $path .= '/';
                                // We now have a path with slash after and slash before (if unix)
-                               if (@is_dir($path) && ($GLOBALS['TYPO3_CONF_VARS']['BE']['lockRootPath'] && \TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($path, $GLOBALS['TYPO3_CONF_VARS']['BE']['lockRootPath']) || \TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($path, $fdir))) {
+                               if (@is_dir($path) && ($GLOBALS['TYPO3_CONF_VARS']['BE']['lockRootPath'] && GeneralUtility::isFirstPartOfStr($path, $GLOBALS['TYPO3_CONF_VARS']['BE']['lockRootPath']) || GeneralUtility::isFirstPartOfStr($path, $fdir))) {
                                        // 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.
@@ -1783,7 +1787,7 @@ class BackendUserAuthentication extends \TYPO3\CMS\Core\Authentication\AbstractU
         * @todo Define visibility
         */
        public function returnFilemounts() {
-               \TYPO3\CMS\Core\Utility\GeneralUtility::logDeprecatedFunction();
+               GeneralUtility::logDeprecatedFunction();
                // initialize the file storages in order to set some default settings in any time
                $this->getFileStorages();
                return $this->groupData['filemounts'];
@@ -1799,7 +1803,7 @@ class BackendUserAuthentication extends \TYPO3\CMS\Core\Authentication\AbstractU
        public function addTScomment($str) {
                $delimiter = '# ***********************************************';
                $out = $delimiter . LF;
-               $lines = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(LF, $str);
+               $lines = GeneralUtility::trimExplode(LF, $str);
                foreach ($lines as $v) {
                        $out .= '# ' . $v . LF;
                }
@@ -1822,7 +1826,7 @@ class BackendUserAuthentication extends \TYPO3\CMS\Core\Authentication\AbstractU
                $this->initializeDbMountpointsInWorkspace();
                if ($allowed_languages = $this->getTSConfigVal('options.workspaces.allowed_languages.' . $this->workspace)) {
                        $this->groupData['allowed_languages'] = $allowed_languages;
-                       $this->groupData['allowed_languages'] = \TYPO3\CMS\Core\Utility\GeneralUtility::uniqueList($this->groupData['allowed_languages']);
+                       $this->groupData['allowed_languages'] = GeneralUtility::uniqueList($this->groupData['allowed_languages']);
                }
        }
 
@@ -1839,7 +1843,7 @@ class BackendUserAuthentication extends \TYPO3\CMS\Core\Authentication\AbstractU
                        // The actual permission checking on page level is done elsewhere as usual anyway before the page tree is rendered.
                        $readPerms = '1=1';
                        // Traverse mount points of the
-                       $dbMountpoints = \TYPO3\CMS\Core\Utility\GeneralUtility::intExplode(',', $dbMountpoints);
+                       $dbMountpoints = GeneralUtility::intExplode(',', $dbMountpoints);
                        foreach ($dbMountpoints as $mpId) {
                                if ($this->isInWebMount($mpId, $readPerms)) {
                                        $filteredDbMountpoints[] = $mpId;
@@ -1868,7 +1872,7 @@ class BackendUserAuthentication extends \TYPO3\CMS\Core\Authentication\AbstractU
                                // empty the fileStorages (will be re-applied later)
                                $existingFileStoragesOfUser = $this->fileStorages;
                                $this->fileStorages = array();
-                               $storageRepository = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Resource\\StorageRepository');
+                               $storageRepository = 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) . ')');
                                // add every filemount of this workspace record
@@ -1906,7 +1910,7 @@ class BackendUserAuthentication extends \TYPO3\CMS\Core\Authentication\AbstractU
                                        break;
                                default:
                                        if (\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::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) . BackendUtility::deleteClause('sys_workspace'), '', 'title');
                                        }
                        }
                }
@@ -1921,32 +1925,32 @@ class BackendUserAuthentication extends \TYPO3\CMS\Core\Authentication\AbstractU
                                                break;
                                        default:
                                                // Checking if the guy is admin:
-                                               if (\TYPO3\CMS\Core\Utility\GeneralUtility::inList($wsRec['adminusers'], 'be_users_' . $this->user['uid'])) {
+                                               if (GeneralUtility::inList($wsRec['adminusers'], 'be_users_' . $this->user['uid'])) {
                                                        return array_merge($wsRec, array('_ACCESS' => 'owner'));
                                                }
                                                // Checking if he is owner through a user group of his:
                                                foreach ($this->userGroupsUID as $groupUid) {
-                                                       if (\TYPO3\CMS\Core\Utility\GeneralUtility::inList($wsRec['adminusers'], 'be_groups_' . $groupUid)) {
+                                                       if (GeneralUtility::inList($wsRec['adminusers'], 'be_groups_' . $groupUid)) {
                                                                return array_merge($wsRec, array('_ACCESS' => 'owner'));
                                                        }
                                                }
                                                // Checking if he is reviewer user:
-                                               if (\TYPO3\CMS\Core\Utility\GeneralUtility::inList($wsRec['reviewers'], 'be_users_' . $this->user['uid'])) {
+                                               if (GeneralUtility::inList($wsRec['reviewers'], 'be_users_' . $this->user['uid'])) {
                                                        return array_merge($wsRec, array('_ACCESS' => 'reviewer'));
                                                }
                                                // Checking if he is reviewer through a user group of his:
                                                foreach ($this->userGroupsUID as $groupUid) {
-                                                       if (\TYPO3\CMS\Core\Utility\GeneralUtility::inList($wsRec['reviewers'], 'be_groups_' . $groupUid)) {
+                                                       if (GeneralUtility::inList($wsRec['reviewers'], 'be_groups_' . $groupUid)) {
                                                                return array_merge($wsRec, array('_ACCESS' => 'reviewer'));
                                                        }
                                                }
                                                // Checking if he is member as user:
-                                               if (\TYPO3\CMS\Core\Utility\GeneralUtility::inList($wsRec['members'], 'be_users_' . $this->user['uid'])) {
+                                               if (GeneralUtility::inList($wsRec['members'], 'be_users_' . $this->user['uid'])) {
                                                        return array_merge($wsRec, array('_ACCESS' => 'member'));
                                                }
                                                // Checking if he is member through a user group of his:
                                                foreach ($this->userGroupsUID as $groupUid) {
-                                                       if (\TYPO3\CMS\Core\Utility\GeneralUtility::inList($wsRec['members'], 'be_groups_' . $groupUid)) {
+                                                       if (GeneralUtility::inList($wsRec['members'], 'be_groups_' . $groupUid)) {
                                                                return array_merge($wsRec, array('_ACCESS' => 'member'));
                                                        }
                                                }
@@ -2026,7 +2030,7 @@ class BackendUserAuthentication extends \TYPO3\CMS\Core\Authentication\AbstractU
                        $defaultWorkspace = -1;
                } elseif (\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('workspaces')) {
                        // Traverse custom workspaces:
-                       $workspaces = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('uid,title,adminusers,members,reviewers', 'sys_workspace', 'pid=0' . \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause('sys_workspace'), '', 'title');
+                       $workspaces = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('uid,title,adminusers,members,reviewers', 'sys_workspace', 'pid=0' . BackendUtility::deleteClause('sys_workspace'), '', 'title');
                        foreach ($workspaces as $rec) {
                                if ($this->checkWorkspace($rec)) {
                                        $defaultWorkspace = $rec['uid'];
@@ -2067,7 +2071,7 @@ class BackendUserAuthentication extends \TYPO3\CMS\Core\Authentication\AbstractU
                        'log_data' => serialize($data),
                        'tablename' => $tablename,
                        'recuid' => intval($recuid),
-                       'IP' => \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('REMOTE_ADDR'),
+                       'IP' => GeneralUtility::getIndpEnv('REMOTE_ADDR'),
                        'tstamp' => $GLOBALS['EXEC_TIME'],
                        'event_pid' => intval($event_pid),
                        'NEWid' => $NEWid,
@@ -2116,7 +2120,7 @@ class BackendUserAuthentication extends \TYPO3\CMS\Core\Authentication\AbstractU
                                // 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') . ').
+site "' . $GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename'] . '" (' . GeneralUtility::getIndpEnv('HTTP_HOST') . ').
 
 This is a dump of the failures:
 
@@ -2128,7 +2132,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 = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Mail\\MailMessage');
                                $mail->setTo($email)->setFrom($from)->setSubject($subject)->setBody($email_body);
                                $mail->send();
                                // Logout written to log
@@ -2165,8 +2169,8 @@ This is a dump of the failures:
                if ($GLOBALS['TYPO3_CONF_VARS']['BE']['enabledBeUserIPLock']) {
                        $IPList = $this->getTSConfigVal('options.lockToIP');
                        if (trim($IPList)) {
-                               $baseIP = \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('REMOTE_ADDR');
-                               $out = \TYPO3\CMS\Core\Utility\GeneralUtility::cmpIP($baseIP, $IPList);
+                               $baseIP = GeneralUtility::getIndpEnv('REMOTE_ADDR');
+                               $out = GeneralUtility::cmpIP($baseIP, $IPList);
                        }
                }
                return $out;
@@ -2257,7 +2261,7 @@ This is a dump of the failures:
                }
                // Setting defaults if uc is empty
                if (!is_array($this->uc)) {
-                       $this->uc = array_merge($this->uc_default, (array) $GLOBALS['TYPO3_CONF_VARS']['BE']['defaultUC'], \TYPO3\CMS\Core\Utility\GeneralUtility::removeDotsFromTS((array) $this->getTSConfigProp('setup.default')));
+                       $this->uc = array_merge($this->uc_default, (array) $GLOBALS['TYPO3_CONF_VARS']['BE']['defaultUC'], GeneralUtility::removeDotsFromTS((array) $this->getTSConfigProp('setup.default')));
                        $this->overrideUC();
                        $U = 1;
                }
@@ -2317,8 +2321,8 @@ 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') . ')' : '');
-                       $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'));
+                       $subject = 'At "' . $GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename'] . '"' . ' from ' . GeneralUtility::getIndpEnv('REMOTE_ADDR') . (GeneralUtility::getIndpEnv('REMOTE_HOST') ? ' (' . GeneralUtility::getIndpEnv('REMOTE_HOST') . ')' : '');
+                       $msg = sprintf('User "%s" logged in from %s (%s) at "%s" (%s)', $this->user['username'], GeneralUtility::getIndpEnv('REMOTE_ADDR'), GeneralUtility::getIndpEnv('REMOTE_HOST'), $GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename'], GeneralUtility::getIndpEnv('HTTP_HOST'));
                        // Warning email address
                        if ($GLOBALS['TYPO3_CONF_VARS']['BE']['warning_email_addr']) {
                                $warn = 0;
@@ -2336,7 +2340,7 @@ This is a dump of the failures:
                                if ($warn) {
                                        $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 = 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->send();
                                }
@@ -2345,7 +2349,7 @@ This is a dump of the failures:
                        if ($this->uc['emailMeAtLogin'] && strstr($this->user['email'], '@')) {
                                $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 = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Mail\\MailMessage');
                                $mail->setTo($this->user['email'])->setFrom($from)->setSubject($subject)->setBody($msg);
                                $mail->send();
                        }
@@ -2373,7 +2377,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' . BackendUtility::BEenableFields('be_users');
                        if ($GLOBALS['TYPO3_DB']->exec_SELECTcountRows('uid', 'be_users', $whereAdmin) > 0) {
                                $isUserAllowedToLogin = TRUE;
                        }
index 2ff91fe..38ed998 100644 (file)
@@ -23,12 +23,9 @@ namespace TYPO3\CMS\Core\Charset;
  *
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
-/**
- * Class for conversion between charsets.
- *
- * @author Kasper Skårhøj <kasperYYYY@typo3.com>
- * @author Martin Kutschker <martin.t.kutschker@blackbox.net>
- */
+
+use TYPO3\CMS\Core\Utility\GeneralUtility;
+
 /**
  * Notes on UTF-8
  *
@@ -57,6 +54,7 @@ namespace TYPO3\CMS\Core\Charset;
  * - split/spliti
  * - ...
  */
+
 /**
  * Class for conversion between charsets
  *
@@ -620,7 +618,7 @@ class CharsetConverter {
         * Default constructor.
         */
        public function __construct() {
-               $this->locales = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Localization\\Locales');
+               $this->locales = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Localization\\Locales');
        }
 
        /**
@@ -1156,15 +1154,15 @@ class CharsetConverter {
                        // Conversion table filename:
                        $charsetConvTableFile = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('core') . 'Resources/Private/Charsets/csconvtbl/' . $charset . '.tbl';
                        // If the conversion table is found:
-                       if ($charset && \TYPO3\CMS\Core\Utility\GeneralUtility::validPathStr($charsetConvTableFile) && @is_file($charsetConvTableFile)) {
+                       if ($charset && 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 = GeneralUtility::getFileAbsFileName('typo3temp/cs/charset_' . $charset . '.tbl');
                                if ($cacheFile && @is_file($cacheFile)) {
-                                       $this->parsedCharsets[$charset] = unserialize(\TYPO3\CMS\Core\Utility\GeneralUtility::getUrl($cacheFile));
+                                       $this->parsedCharsets[$charset] = unserialize(GeneralUtility::getUrl($cacheFile));
                                } else {
                                        // Parse conversion table into lines:
-                                       $lines = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(LF, \TYPO3\CMS\Core\Utility\GeneralUtility::getUrl($charsetConvTableFile), 1);
+                                       $lines = GeneralUtility::trimExplode(LF, GeneralUtility::getUrl($charsetConvTableFile), 1);
                                        // Initialize the internal variable holding the conv. table:
                                        $this->parsedCharsets[$charset] = array('local' => array(), 'utf8' => array());
                                        // traverse the lines:
@@ -1194,7 +1192,7 @@ class CharsetConverter {
                                                }
                                        }
                                        if ($cacheFile) {
-                                               \TYPO3\CMS\Core\Utility\GeneralUtility::writeFileToTypo3tempDir($cacheFile, serialize($this->parsedCharsets[$charset]));
+                                               GeneralUtility::writeFileToTypo3tempDir($cacheFile, serialize($this->parsedCharsets[$charset]));
                                        }
                                }
                                return 2;
@@ -1218,8 +1216,8 @@ class CharsetConverter {
         */
        public function initUnicodeData($mode = NULL) {
                // Cache files
-               $cacheFileCase = \TYPO3\CMS\Core\Utility\GeneralUtility::getFileAbsFileName('typo3temp/cs/cscase_utf-8.tbl');
-               $cacheFileASCII = \TYPO3\CMS\Core\Utility\GeneralUtility::getFileAbsFileName('typo3temp/cs/csascii_utf-8.tbl');
+               $cacheFileCase = GeneralUtility::getFileAbsFileName('typo3temp/cs/cscase_utf-8.tbl');
+               $cacheFileASCII = GeneralUtility::getFileAbsFileName('typo3temp/cs/csascii_utf-8.tbl');
                // Only process if the tables are not yet loaded
                switch ($mode) {
                        case 'case':
@@ -1228,7 +1226,7 @@ class CharsetConverter {
                                }
                                // Use cached version if possible
                                if ($cacheFileCase && @is_file($cacheFileCase)) {
-                                       $this->caseFolding['utf-8'] = unserialize(\TYPO3\CMS\Core\Utility\GeneralUtility::getUrl($cacheFileCase));
+                                       $this->caseFolding['utf-8'] = unserialize(GeneralUtility::getUrl($cacheFileCase));
                                        return 2;
                                }
                                break;
@@ -1238,14 +1236,14 @@ class CharsetConverter {
                                }
                                // Use cached version if possible
                                if ($cacheFileASCII && @is_file($cacheFileASCII)) {
-                                       $this->toASCII['utf-8'] = unserialize(\TYPO3\CMS\Core\Utility\GeneralUtility::getUrl($cacheFileASCII));
+                                       $this->toASCII['utf-8'] = unserialize(GeneralUtility::getUrl($cacheFileASCII));
                                        return 2;
                                }
                                break;
                }
                // Process main Unicode data file
                $unicodeDataFile = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('core') . 'Resources/Private/Charsets/unidata/UnicodeData.txt';
-               if (!(\TYPO3\CMS\Core\Utility\GeneralUtility::validPathStr($unicodeDataFile) && @is_file($unicodeDataFile))) {
+               if (!(GeneralUtility::validPathStr($unicodeDataFile) && @is_file($unicodeDataFile))) {
                        return FALSE;
                }
                $fh = fopen($unicodeDataFile, 'rb');
@@ -1343,13 +1341,13 @@ class CharsetConverter {
                fclose($fh);
                // Process additional Unicode data for casing (allow folded characters to expand into a sequence)
                $specialCasingFile = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('core') . 'Resources/Private/Charsets/unidata/SpecialCasing.txt';
-               if (\TYPO3\CMS\Core\Utility\GeneralUtility::validPathStr($specialCasingFile) && @is_file($specialCasingFile)) {
+               if (GeneralUtility::validPathStr($specialCasingFile) && @is_file($specialCasingFile)) {
                        $fh = fopen($specialCasingFile, 'rb');
                        if ($fh) {
                                while (!feof($fh)) {
                                        $line = fgets($fh, 4096);
                                        if ($line[0] != '#' && trim($line) != '') {
-                                               list($char, $lower, $title, $upper, $cond) = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(';', $line);
+                                               list($char, $lower, $title, $upper, $cond) = GeneralUtility::trimExplode(';', $line);
                                                if ($cond == '' || $cond[0] == '#') {
                                                        $utf8_char = $this->UnumberToChar(hexdec($char));
                                                        if ($char != $lower) {
@@ -1381,13 +1379,13 @@ class CharsetConverter {
                }
                // Process custom decompositions
                $customTranslitFile = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('core') . 'Resources/Private/Charsets/unidata/Translit.txt';
-               if (\TYPO3\CMS\Core\Utility\GeneralUtility::validPathStr($customTranslitFile) && @is_file($customTranslitFile)) {
+               if (GeneralUtility::validPathStr($customTranslitFile) && @is_file($customTranslitFile)) {
                        $fh = fopen($customTranslitFile, 'rb');
                        if ($fh) {
                                while (!feof($fh)) {
                                        $line = fgets($fh, 4096);
                                        if ($line[0] != '#' && trim($line) != '') {
-                                               list($char, $translit) = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(';', $line);
+                                               list($char, $translit) = GeneralUtility::trimExplode(';', $line);
                                                if (!$translit) {
                                                        $omit['U+' . $char] = 1;
                                                }
@@ -1441,10 +1439,10 @@ class CharsetConverter {
                        }
                }
                if ($cacheFileCase) {
-                       \TYPO3\CMS\Core\Utility\GeneralUtility::writeFileToTypo3tempDir($cacheFileCase, serialize($utf8CaseFolding));
+                       GeneralUtility::writeFileToTypo3tempDir($cacheFileCase, serialize($utf8CaseFolding));
                }
                if ($cacheFileASCII) {
-                       \TYPO3\CMS\Core\Utility\GeneralUtility::writeFileToTypo3tempDir($cacheFileASCII, serialize($ascii));
+                       GeneralUtility::writeFileToTypo3tempDir($cacheFileASCII, serialize($ascii));
                }
                return 3;
        }
@@ -1464,9 +1462,9 @@ class CharsetConverter {
                        return 1;
                }
                // Use cached version if possible
-               $cacheFile = \TYPO3\CMS\Core\Utility\GeneralUtility::getFileAbsFileName('typo3temp/cs/cscase_' . $charset . '.tbl');
+               $cacheFile = GeneralUtility::getFileAbsFileName('typo3temp/cs/cscase_' . $charset . '.tbl');
                if ($cacheFile && @is_file($cacheFile)) {
-                       $this->caseFolding[$charset] = unserialize(\TYPO3\CMS\Core\Utility\GeneralUtility::getUrl($cacheFile));
+                       $this->caseFolding[$charset] = unserialize(GeneralUtility::getUrl($cacheFile));
                        return 2;
                }
                // init UTF-8 conversion for this charset
@@ -1506,7 +1504,7 @@ class CharsetConverter {
                        $this->caseFolding[$charset]['toLower'][chr($i)] = chr($i + 32);
                }
                if ($cacheFile) {
-                       \TYPO3\CMS\Core\Utility\GeneralUtility::writeFileToTypo3tempDir($cacheFile, serialize($this->caseFolding[$charset]));
+                       GeneralUtility::writeFileToTypo3tempDir($cacheFile, serialize($this->caseFolding[$charset]));
                }
                return 3;
        }
@@ -1526,9 +1524,9 @@ class CharsetConverter {
                        return 1;
                }
                // Use cached version if possible
-               $cacheFile = \TYPO3\CMS\Core\Utility\GeneralUtility::getFileAbsFileName('typo3temp/cs/csascii_' . $charset . '.tbl');
+               $cacheFile = GeneralUtility::getFileAbsFileName('typo3temp/cs/csascii_' . $charset . '.tbl');
                if ($cacheFile && @is_file($cacheFile)) {
-                       $this->toASCII[$charset] = unserialize(\TYPO3\CMS\Core\Utility\GeneralUtility::getUrl($cacheFile));
+                       $this->toASCII[$charset] = unserialize(GeneralUtility::getUrl($cacheFile));
                        return 2;
                }
                // Init UTF-8 conversion for this charset
@@ -1548,7 +1546,7 @@ class CharsetConverter {
                        }
                }
                if ($cacheFile) {
-                       \TYPO3\CMS\Core\Utility\GeneralUtility::writeFileToTypo3tempDir($cacheFile, serialize($this->toASCII[$charset]));
+                       GeneralUtility::writeFileToTypo3tempDir($cacheFile, serialize($this->toASCII[$charset]));
                }
                return 3;
        }
@@ -1838,7 +1836,7 @@ class CharsetConverter {
                }
                // Move the iso codes to the (because we're comparing the keys with "isset" later on)
                $allLanguageCodes = array_flip($allLanguageCodes);
-               $preferredLanguages = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $languageCodesList);
+               $preferredLanguages = GeneralUtility::trimExplode(',', $languageCodesList);
                // Order the preferred languages after they key
                $sortedPreferredLanguages = array();
                foreach ($preferredLanguages as $preferredLanguage) {
index b4da9ad..bbd4c7a 100644 (file)
@@ -26,6 +26,9 @@ namespace TYPO3\CMS\Core\Configuration\TypoScript\ConditionMatching;
  *
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
+
+use TYPO3\CMS\Core\Utility\GeneralUtility;
+
 /**
  * Matching TypoScript conditions
  *
@@ -204,13 +207,13 @@ abstract class AbstractConditionMatcher {
         * @return mixed Returns TRUE or FALSE based on the evaluation
         */
        protected function evaluateConditionCommon($key, $value) {
-               if (\TYPO3\CMS\Core\Utility\GeneralUtility::inList('browser,version,system,useragent', strtolower($key))) {
-                       $browserInfo = $this->getBrowserInfo(\TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('HTTP_USER_AGENT'));
+               if (GeneralUtility::inList('browser,version,system,useragent', strtolower($key))) {
+                       $browserInfo = $this->getBrowserInfo(GeneralUtility::getIndpEnv('HTTP_USER_AGENT'));
                }
-               $keyParts = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode('|', $key);
+               $keyParts = GeneralUtility::trimExplode('|', $key);
                switch ($keyParts[0]) {
                        case 'browser':
-                               $values = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $value, TRUE);
+                               $values = GeneralUtility::trimExplode(',', $value, TRUE);
                                // take all identified browsers into account, eg chrome deliver
                                // webkit=>532.5, chrome=>4.1, safari=>532.5
                                // so comparing string will be
@@ -226,7 +229,7 @@ abstract class AbstractConditionMatcher {
                                }
                                break;
                        case 'version':
-                               $values = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $value, TRUE);
+                               $values = GeneralUtility::trimExplode(',', $value, TRUE);
                                foreach ($values as $test) {
                                        if (strcspn($test, '=<>') == 0) {
                                                switch (substr($test, 0, 1)) {
@@ -252,7 +255,7 @@ abstract class AbstractConditionMatcher {
                                }
                                break;
                        case 'system':
-                               $values = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $value, TRUE);
+                               $values = GeneralUtility::trimExplode(',', $value, TRUE);
                                // Take all identified systems into account, e.g. mac for iOS, Linux
                                // for android and Windows NT for Windows XP
                                $allSystems .= ' ' . implode(' ', $browserInfo['all_systems']);
@@ -264,9 +267,9 @@ abstract class AbstractConditionMatcher {
                                break;
                        case 'device':
                                if (!isset($this->deviceInfo)) {
-                                       $this->deviceInfo = $this->getDeviceType(\TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('HTTP_USER_AGENT'));
+                                       $this->deviceInfo = $this->getDeviceType(GeneralUtility::getIndpEnv('HTTP_USER_AGENT'));
                                }
-                               $values = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $value, TRUE);
+                               $values = GeneralUtility::trimExplode(',', $value, TRUE);
                                foreach ($values as $test) {
                                        if ($this->deviceInfo == $test) {
                                                return TRUE;
@@ -280,25 +283,25 @@ abstract class AbstractConditionMatcher {
                                }
                                break;
                        case 'language':
-                               $values = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $value, TRUE);
+                               $values = GeneralUtility::trimExplode(',', $value, TRUE);
                                foreach ($values as $test) {
                                        if (preg_match('/^\\*.+\\*$/', $test)) {
-                                               $allLanguages = preg_split('/[,;]/', \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('HTTP_ACCEPT_LANGUAGE'));
+                                               $allLanguages = preg_split('/[,;]/', GeneralUtility::getIndpEnv('HTTP_ACCEPT_LANGUAGE'));
                                                if (in_array(substr($test, 1, -1), $allLanguages)) {
                                                        return TRUE;
                                                }
-                                       } elseif (\TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('HTTP_ACCEPT_LANGUAGE') == $test) {
+                                       } elseif (GeneralUtility::getIndpEnv('HTTP_ACCEPT_LANGUAGE') == $test) {
                                                return TRUE;
                                        }
                                }
                                break;
                        case 'IP':
-                               if (\TYPO3\CMS\Core\Utility\GeneralUtility::cmpIP(\TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('REMOTE_ADDR'), $value)) {
+                               if (GeneralUtility::cmpIP(GeneralUtility::getIndpEnv('REMOTE_ADDR'), $value)) {
                                        return TRUE;
                                }
                                break;
                        case 'hostname':
-                               if (\TYPO3\CMS\Core\Utility\GeneralUtility::cmpFQDN(\TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('REMOTE_ADDR'), $value)) {
+                               if (GeneralUtility::cmpFQDN(GeneralUtility::getIndpEnv('REMOTE_ADDR'), $value)) {
                                        return TRUE;
                                }
                                break;
@@ -342,7 +345,7 @@ abstract class AbstractConditionMatcher {
                                }
                                $theTestValue = intval($theTestValue);
                                // comp
-                               $values = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $value, TRUE);
+                               $values = GeneralUtility::trimExplode(',', $value, TRUE);
                                foreach ($values as $test) {
                                        if (\TYPO3\CMS\Core\Utility\MathUtility::canBeInterpretedAsInteger($test)) {
                                                $test = '=' . $test;
@@ -353,11 +356,11 @@ abstract class AbstractConditionMatcher {
                                }
                                break;
                        case 'compatVersion':
-                               return \TYPO3\CMS\Core\Utility\GeneralUtility::compat_version($value);
+                               return GeneralUtility::compat_version($value);
                                break;
                        case 'loginUser':
                                if ($this->isUserLoggedIn()) {
-                                       $values = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $value, TRUE);
+                                       $values = GeneralUtility::trimExplode(',', $value, TRUE);
                                        foreach ($values as $test) {
                                                if ($test == '*' || !strcmp($this->getUserId(), $test)) {
                                                        return TRUE;
@@ -379,7 +382,7 @@ abstract class AbstractConditionMatcher {
                                }
                                break;
                        case 'globalVar':
-                               $values = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $value, TRUE);
+                               $values = GeneralUtility::trimExplode(',', $value, TRUE);
                                foreach ($values as $test) {
                                        $point = strcspn($test, '!=<>');
                                        $theVarName = substr($test, 0, $point);
@@ -391,7 +394,7 @@ abstract class AbstractConditionMatcher {
                                }
                                break;
                        case 'globalString':
-                               $values = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $value, TRUE);
+                               $values = GeneralUtility::trimExplode(',', $value, TRUE);
                                foreach ($values as $test) {
                                        $point = strcspn($test, '=');
                                        $theVarName = substr($test, 0, $point);
@@ -405,7 +408,7 @@ abstract class AbstractConditionMatcher {
                        case 'userFunc':
                                $values = preg_split('/\\(|\\)/', $value);
                                $funcName = trim($values[0]);
-                               $funcValues = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $values[1]);
+                               $funcValues = GeneralUtility::trimExplode(',', $values[1]);
                                if (function_exists($funcName) && call_user_func_array($funcName, $funcValues)) {
                                        return TRUE;
                                }
@@ -430,13 +433,13 @@ abstract class AbstractConditionMatcher {
                        if ($k) {
                                switch ((string) trim($vars[0])) {
                                        case 'GP':
-                                               $value = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP($k);
+                                               $value = GeneralUtility::_GP($k);
                                                break;
                                        case 'ENV':
                                                $value = getenv($k);
                                                break;
                                        case 'IENV':
-                                               $value = \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv($k);
+                                               $value = GeneralUtility::getIndpEnv($k);
                                                break;
                                        case 'LIT':
                                                return trim($vars[1]);
@@ -479,7 +482,7 @@ abstract class AbstractConditionMatcher {
                                        // multiple values may be split with '|'
                                        // see if none matches ("not in list")
                                        $found = FALSE;
-                                       $rightValueParts = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode('|', $rightValue);
+                                       $rightValueParts = GeneralUtility::trimExplode('|', $rightValue);
                                        foreach ($rightValueParts as $rightValueSingle) {
                                                if ($leftValue == doubleval($rightValueSingle)) {
                                                        $found = TRUE;
@@ -499,7 +502,7 @@ abstract class AbstractConditionMatcher {
                                        // multiple values may be split with '|'
                                        // see if one matches ("in list")
                                        $found = FALSE;
-                                       $rightValueParts = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode('|', $rightValue);
+                                       $rightValueParts = GeneralUtility::trimExplode('|', $rightValue);
                                        foreach ($rightValueParts as $rightValueSingle) {
                                                if ($leftValue == $rightValueSingle) {
                                                        $found = TRUE;
index b246084..8c48cbd 100644 (file)
@@ -26,6 +26,9 @@ namespace TYPO3\CMS\Core\DataHandling;
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
 
+use TYPO3\CMS\Core\Utility\GeneralUtility;
+use TYPO3\CMS\Backend\Utility\BackendUtility;
+
 /**
  * Contains the TYPO3 Core Engine
  *
@@ -558,7 +561,7 @@ class DataHandler {
                                if (isset($this->datamap[$table])) {
                                        foreach ($uid_array as $id => $uidList) {
                                                if (isset($this->datamap[$table][$id])) {
-                                                       $theIdsInArray = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $uidList, 1);
+                                                       $theIdsInArray = GeneralUtility::trimExplode(',', $uidList, 1);
                                                        foreach ($theIdsInArray as $copyToUid) {
                                                                $this->datamap[$table][$copyToUid] = $this->datamap[$table][$id];
                                                        }
@@ -691,7 +694,7 @@ class DataHandler {
                        $this->checkModifyAccessListHookObjects = array();
                        if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['checkModifyAccessList'])) {
                                foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['checkModifyAccessList'] as $classData) {
-                                       $hookObject = \TYPO3\CMS\Core\Utility\GeneralUtility::getUserObj($classData);
+                                       $hookObject = GeneralUtility::getUserObj($classData);
                                        if (!$hookObject instanceof \TYPO3\CMS\Core\DataHandling\DataHandlerCheckModifyAccessListHookInterface) {
                                                throw new \UnexpectedValueException('$hookObject must implement interface \\TYPO3\\CMS\\Core\\DataHandling\\DataHandlerCheckModifyAccessListHookInterface', 1251892472);
                                        }
@@ -729,7 +732,7 @@ class DataHandler {
                $hookObjectsArr = array();
                if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processDatamapClass'])) {
                        foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processDatamapClass'] as $classRef) {
-                               $hookObject = \TYPO3\CMS\Core\Utility\GeneralUtility::getUserObj($classRef);
+                               $hookObject = GeneralUtility::getUserObj($classRef);
                                if (method_exists($hookObject, 'processDatamap_beforeStart')) {
                                        $hookObject->processDatamap_beforeStart($this);
                                }
@@ -768,7 +771,7 @@ class DataHandler {
                                                $dateTimeFormats = $GLOBALS['TYPO3_DB']->getDateTimeFormats($table);
                                                foreach ($GLOBALS['TCA'][$table]['columns'] as $column => $config) {
                                                        if (isset($incomingFieldArray[$column])) {
-                                                               if (isset($config['config']['dbType']) && \TYPO3\CMS\Core\Utility\GeneralUtility::inList('date,datetime', $config['config']['dbType'])) {
+                                                               if (isset($config['config']['dbType']) && GeneralUtility::inList('date,datetime', $config['config']['dbType'])) {
                                                                        $emptyValue = $dateTimeFormats[$config['config']['dbType']]['empty'];
                                                                        $format = $dateTimeFormats[$config['config']['dbType']]['format'];
                                                                        $incomingFieldArray[$column] = $incomingFieldArray[$column] ? date($format, $incomingFieldArray[$column]) : $emptyValue;
@@ -909,12 +912,12 @@ class DataHandler {
                                                                                $recordAccess = FALSE;
                                                                                // Versioning is required and it must be offline version!
                                                                                // Check if there already is a workspace version
-                                                                               $WSversion = \TYPO3\CMS\Backend\Utility\BackendUtility::getWorkspaceVersionOfRecord($this->BE_USER->workspace, $table, $id, 'uid,t3ver_oid');
+                                                                               $WSversion = BackendUtility::getWorkspaceVersionOfRecord($this->BE_USER->workspace, $table, $id, 'uid,t3ver_oid');
                                                                                if ($WSversion) {
                                                                                        $id = $WSversion['uid'];
                                                                                        $recordAccess = TRUE;
                                                                                } elseif ($this->BE_USER->workspaceAllowAutoCreation($table, $id, $theRealPid)) {
-                                                                                       $tce = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\DataHandling\\DataHandler');
+                                                                                       $tce = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\DataHandling\\DataHandler');
                                                                                        /** @var $tce \TYPO3\CMS\Core\DataHandling\DataHandler */
                                                                                        $tce->stripslashes_values = 0;
                                                                                        // Setting up command for creating a new version of the record:
@@ -936,7 +939,7 @@ class DataHandler {
                                                                                                                $this->autoVersionIdMap[$origTable][$origId] = $newId;
                                                                                                        }
                                                                                                }
-                                                                                               $this->RTEmagic_copyIndex = \TYPO3\CMS\Core\Utility\GeneralUtility::array_merge_recursive_overrule($this->RTEmagic_copyIndex, $tce->RTEmagic_copyIndex);
+                                                                                               $this->RTEmagic_copyIndex = GeneralUtility::array_merge_recursive_overrule($this->RTEmagic_copyIndex, $tce->RTEmagic_copyIndex);
                                                                                                // See where RTEmagic_copyIndex is used inside fillInFieldArray() for more information...
                                                                                                // Update registerDBList, that holds the copied relations to child records:
                                                                                                $registerDBList = array_merge($registerDBList, $tce->registerDBList);
@@ -962,7 +965,7 @@ class DataHandler {
                                                // If access was granted above, proceed to create or update record:
                                                if ($recordAccess) {
                                                        // 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']);
+                                                       list($tscPID) = 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.'])) {
                                                                $fieldArray = $this->setTSconfigPermissions($fieldArray, $TSConfig['permissions.']);
@@ -1085,9 +1088,9 @@ class DataHandler {
         * @todo Define visibility
         */
        public function placeholderShadowing($table, $id) {
-               if ($liveRec = \TYPO3\CMS\Backend\Utility\BackendUtility::getLiveVersionOfRecord($table, $id, '*')) {
+               if ($liveRec = BackendUtility::getLiveVersionOfRecord($table, $id, '*')) {
                        if ((int) $liveRec['t3ver_state'] > 0) {
-                               $justStoredRecord = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecord($table, $id);
+                               $justStoredRecord = BackendUtility::getRecord($table, $id);
                                $newRecord = array();
                                $shadowCols = $GLOBALS['TCA'][$table]['ctrl']['shadowColumnsForNewPlaceholders'];
                                $shadowCols .= ',' . $GLOBALS['TCA'][$table]['ctrl']['languageField'];
@@ -1134,18 +1137,18 @@ class DataHandler {
                        // IF $incomingFieldArray is an array, overlay it.
                        // The point is that when new records are created as copies with flex type fields there might be a field containing information about which DataStructure to use and without that information the flexforms cannot be correctly processed.... This should be OK since the $checkValueRecord is used by the flexform evaluation only anyways...
                        if (is_array($incomingFieldArray) && is_array($checkValueRecord)) {
-                               $checkValueRecord = \TYPO3\CMS\Core\Utility\GeneralUtility::array_merge_recursive_overrule($checkValueRecord, $incomingFieldArray);
+                               $checkValueRecord = GeneralUtility::array_merge_recursive_overrule($checkValueRecord, $incomingFieldArray);
                        }
                } else {
                        // We must use the current values as basis for this!
                        $currentRecord = ($checkValueRecord = $this->recordInfo($table, $id, '*'));
                        // 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);
+                       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) {
                                $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);
+                               BackendUtility::workspaceOL($lookUpTable, $originalLanguageRecord);
                                $originalLanguage_diffStorage = unserialize($currentRecord[$GLOBALS['TCA'][$table]['ctrl']['transOrigDiffSourceField']]);
                        }
                }
@@ -1255,8 +1258,8 @@ class DataHandler {
                        $fieldArray[$GLOBALS['TCA'][$table]['ctrl']['transOrigDiffSourceField']] = serialize($originalLanguage_diffStorage);
                }
                // Checking for RTE-transformations of fields:
-               $types_fieldConfig = \TYPO3\CMS\Backend\Utility\BackendUtility::getTCAtypes($table, $currentRecord);
-               $theTypeString = \TYPO3\CMS\Backend\Utility\BackendUtility::getTCAtypeValue($table, $currentRecord);
+               $types_fieldConfig = BackendUtility::getTCAtypes($table, $currentRecord);
+               $theTypeString = BackendUtility::getTCAtypeValue($table, $currentRecord);
                if (is_array($types_fieldConfig)) {
                        foreach ($types_fieldConfig as $vconf) {
                                // Write file configuration:
@@ -1268,12 +1271,12 @@ class DataHandler {
                                                // Look for transformation flag:
                                                switch ((string) $incomingFieldArray[('_TRANSFORM_' . $vconf['field'])]) {
                                                        case 'RTE':
-                                                               $RTEsetup = $this->BE_USER->getTSConfig('RTE', \TYPO3\CMS\Backend\Utility\BackendUtility::getPagesTSconfig($tscPID));
-                                                               $thisConfig = \TYPO3\CMS\Backend\Utility\BackendUtility::RTEsetup($RTEsetup['properties'], $table, $vconf['field'], $theTypeString);
+                                                               $RTEsetup = $this->BE_USER->getTSConfig('RTE', BackendUtility::getPagesTSconfig($tscPID));
+                                                               $thisConfig = BackendUtility::RTEsetup($RTEsetup['properties'], $table, $vconf['field'], $theTypeString);
                                                                // Set alternative relative path for RTE images/links:
                                                                $RTErelPath = is_array($eFile) ? dirname($eFile['relEditFile']) : '';
                                                                // Get RTE object, draw form and set flag:
-                                                               $RTEobj = \TYPO3\CMS\Backend\Utility\BackendUtility::RTEgetObj();
+                                                               $RTEobj = BackendUtility::RTEgetObj();
                                                                if (is_object($RTEobj)) {
                                                                        $fieldArray[$vconf['field']] = $RTEobj->transformContent('db', $fieldArray[$vconf['field']], $table, $vconf['field'], $currentRecord, $vconf['spec'], $thisConfig, $RTErelPath, $currentRecord['pid']);
                                                                } else {
@@ -1286,8 +1289,8 @@ class DataHandler {
                                // Write file configuration:
                                if (is_array($eFile)) {
                                        $mixedRec = array_merge($currentRecord, $fieldArray);
-                                       $SW_fileContent = \TYPO3\CMS\Core\Utility\GeneralUtility::getUrl($eFile['editFile']);
-                                       $parseHTML = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Html\\RteHtmlParser');
+                                       $SW_fileContent = GeneralUtility::getUrl($eFile['editFile']);
+                                       $parseHTML = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Html\\RteHtmlParser');
                                        /** @var $parseHTML \TYPO3\CMS\Core\Html\RteHtmlParser */
                                        $parseHTML->init('', '');
                                        $eFileMarker = $eFile['markerField'] && trim($mixedRec[$eFile['markerField']]) ? trim($mixedRec[$eFile['markerField']]) : '###TYPO3_STATICFILE_EDIT###';
@@ -1337,7 +1340,7 @@ class DataHandler {
                // 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
-                       if (!($this->admin || \TYPO3\CMS\Core\Utility\GeneralUtility::inList($this->BE_USER->groupData['pagetypes_select'], $value))) {
+                       if (!($this->admin || GeneralUtility::inList($this->BE_USER->groupData['pagetypes_select'], $value))) {
                                $propArr = $this->getRecordProperties($table, $id);
                                $this->log($table, $id, 5, 0, 1, 'You cannot change the \'doktype\' of page \'%s\' to the desired value.', 1, array($propArr['header']), $propArr['event_pid']);
                                return $res;
@@ -1387,7 +1390,7 @@ class DataHandler {
         */
        public function checkValue_SW($res, $value, $tcaFieldConf, $table, $id, $curValue, $status, $realPid, $recFID, $field, $uploadedFiles, $tscPID, array $additionalData = NULL) {
                // Convert to NULL value if defined in TCA
-               if ($value === NULL && !empty($tcaFieldConf['eval']) && \TYPO3\CMS\Core\Utility\GeneralUtility::inList($tcaFieldConf['eval'], 'null')) {
+               if ($value === NULL && !empty($tcaFieldConf['eval']) && GeneralUtility::inList($tcaFieldConf['eval'], 'null')) {
                        $res = array('value' => NULL);
                        return $res;
                }
@@ -1443,7 +1446,7 @@ class DataHandler {
         * @todo Define visibility
         */
        public function checkValue_text($res, $value, $tcaFieldConf, $PP, $field = '') {
-               $evalCodesArray = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $tcaFieldConf['eval'], 1);
+               $evalCodesArray = GeneralUtility::trimExplode(',', $tcaFieldConf['eval'], 1);
                $res = $this->checkValue_text_Eval($value, $evalCodesArray, $tcaFieldConf['is_in']);
                return $res;
        }
@@ -1463,7 +1466,7 @@ class DataHandler {
                list($table, $id, $curValue, $status, $realPid, $recFID) = $PP;
                // Handle native date/time fields
                $dateTimeFormats = $GLOBALS['TYPO3_DB']->getDateTimeFormats($table);
-               if (isset($tcaFieldConf['dbType']) && \TYPO3\CMS\Core\Utility\GeneralUtility::inList('date,datetime', $tcaFieldConf['dbType'])) {
+               if (isset($tcaFieldConf['dbType']) && GeneralUtility::inList('date,datetime', $tcaFieldConf['dbType'])) {
                        // Convert the date/time into a timestamp for the sake of the checks
                        $emptyValue = $dateTimeFormats[$tcaFieldConf['dbType']]['empty'];
                        $timeOffset = $tcaFieldConf['dbType'] === 'date' ? 3600 * $GLOBALS['TYPO3_CONF_VARS']['SYS']['serverTimeZone'] : 0;
@@ -1483,7 +1486,7 @@ class DataHandler {
                        }
                }
                // Process evaluation settings:
-               $evalCodesArray = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $tcaFieldConf['eval'], 1);
+               $evalCodesArray = GeneralUtility::trimExplode(',', $tcaFieldConf['eval'], 1);
                $res = $this->checkValue_input_Eval($value, $evalCodesArray, $tcaFieldConf['is_in']);
                // Process UNIQUE settings:
                // Field is NOT set for flexForms - which also means that uniqueInPid and unique is NOT available for flexForm fields! Also getUnique should not be done for versioning and if PID is -1 ($realPid<0) then versioning is happening...
@@ -1496,7 +1499,7 @@ class DataHandler {
                        }
                }
                // Handle native date/time fields
-               if (isset($tcaFieldConf['dbType']) && \TYPO3\CMS\Core\Utility\GeneralUtility::inList('date,datetime', $tcaFieldConf['dbType'])) {
+               if (isset($tcaFieldConf['dbType']) && GeneralUtility::inList('date,datetime', $tcaFieldConf['dbType'])) {
                        // Convert the timestamp back to a date/time
                        $emptyValue = $dateTimeFormats[$tcaFieldConf['dbType']]['empty'];
                        $format = $dateTimeFormats[$tcaFieldConf['dbType']]['format'];
@@ -1584,7 +1587,7 @@ class DataHandler {
                }
                // If an exclusive key is found, discard all others:
                if ($tcaFieldConf['type'] == 'select' && $tcaFieldConf['exclusiveKeys']) {
-                       $exclusiveKeys = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $tcaFieldConf['exclusiveKeys']);
+                       $exclusiveKeys = GeneralUtility::trimExplode(',', $tcaFieldConf['exclusiveKeys']);
                        foreach ($valueArray as $kk => $vv) {
                                // $vv is the item key!
                                if (in_array($vv, $exclusiveKeys)) {
@@ -1667,7 +1670,7 @@ class DataHandler {
                        $parameters = $filter['parameters'] ? $filter['parameters'] : array();
                        $parameters['values'] = $values;
                        $parameters['tcaFieldConfig'] = $tcaFieldConfiguration;
-                       $values = \TYPO3\CMS\Core\Utility\GeneralUtility::callUserFunction($filter['userFunc'], $parameters, $this);
+                       $values = GeneralUtility::callUserFunction($filter['userFunc'], $parameters, $this);
                        if (!is_array($values)) {
                                throw new \RuntimeException('Failed calling filter userFunc.', 1336051942);
                        }
@@ -1709,7 +1712,7 @@ class DataHandler {
                        }
                        // Creating fileFunc object.
                        if (!$this->fileFunc) {
-                               $this->fileFunc = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Utility\\File\\BasicFileUtility');
+                               $this->fileFunc = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Utility\\File\\BasicFileUtility');
                                $this->include_filefunctions = 1;
                        }
                        // Setting permitted extensions.
@@ -1750,7 +1753,7 @@ class DataHandler {
                                        $theFileValues = array();
                                        // If MM relations for the files also!
                                        if ($tcaFieldConf['MM']) {
-                                               $dbAnalysis = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Database\\RelationHandler');
+                                               $dbAnalysis = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Database\\RelationHandler');
                                                /** @var $dbAnalysis \TYPO3\CMS\Core\Database\RelationHandler */
                                                $dbAnalysis->start('', 'files', $tcaFieldConf['MM'], $id);
                                                foreach ($dbAnalysis->itemArray as $item) {
@@ -1759,7 +1762,7 @@ class DataHandler {
                                                        }
                                                }
                                        } else {
-                                               $theFileValues = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $curValue, 1);
+                                               $theFileValues = GeneralUtility::trimExplode(',', $curValue, 1);
                                        }
                                        $currentFilesForHistory = implode(',', $theFileValues);
                                        // DELETE files: If existing files were found, traverse those and register files for deletion which has been removed:
@@ -1767,7 +1770,7 @@ class DataHandler {
                                                // Traverse the input values and for all input values which match an EXISTING value, remove the existing from $theFileValues array (this will result in an array of all the existing files which should be deleted!)
                                                foreach ($valueArray as $key => $theFile) {
                                                        if ($theFile && !strstr(\TYPO3\CMS\Core\Utility\GeneralUtility::fixWindowsFilePath($theFile), '/')) {
-                                                               $theFileValues = \TYPO3\CMS\Core\Utility\GeneralUtility::removeArrayEntryByValue($theFileValues, $theFile);
+                                                               $theFileValues = GeneralUtility::removeArrayEntryByValue($theFileValues, $theFile);
                                                        }
                                                }
                                                // This array contains the filenames in the uploadfolder that should be deleted:
@@ -1809,7 +1812,7 @@ class DataHandler {
                                                        if (!$maxSize || $fileSize <= $maxSize * 1024) {
                                                                // Prepare filename:
                                                                $theEndFileName = isset($this->alternativeFileName[$theFile]) ? $this->alternativeFileName[$theFile] : $theFile;
-                                                               $fI = \TYPO3\CMS\Core\Utility\GeneralUtility::split_fileref($theEndFileName);
+                                                               $fI = GeneralUtility::split_fileref($theEndFileName);
                                                                // Check for allowed extension:
                                                                if ($this->fileFunc->checkIfAllowed($fI['fileext'], $dest, $theEndFileName)) {
                                                                        $theDestFile = $this->fileFunc->getUniqueName($this->fileFunc->cleanFileName($fI['file']), $dest);
@@ -1819,7 +1822,7 @@ class DataHandler {
                                                                                // Hook for post-processing the upload action
                                                                                if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processUpload'])) {
                                                                                        foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processUpload'] as $classRef) {
-                                                                                               $hookObject = \TYPO3\CMS\Core\Utility\GeneralUtility::getUserObj($classRef);
+                                                                                               $hookObject = GeneralUtility::getUserObj($classRef);
                                                                                                if (!$hookObject instanceof \TYPO3\CMS\Core\DataHandling\DataHandlerProcessUploadHookInterface) {
                                                                                                        throw new \UnexpectedValueException('$hookObject must implement interface TYPO3\\CMS\\Core\\DataHandling\\DataHandlerProcessUploadHookInterface', 1279962349);
                                                                                                }
@@ -1838,7 +1841,7 @@ class DataHandler {
                                                                        $this->log($table, $id, 5, 0, 1, 'File extension \'%s\' not allowed. (%s)', 12, array($fI['fileext'], $recFID), $propArr['event_pid']);
                                                                }
                                                        } else {
-                                                               $this->log($table, $id, 5, 0, 1, 'Filesize (%s) of file \'%s\' exceeds limit (%s). (%s)', 13, array(\TYPO3\CMS\Core\Utility\GeneralUtility::formatSize($fileSize), $theFile, \TYPO3\CMS\Core\Utility\GeneralUtility::formatSize($maxSize * 1024), $recFID), $propArr['event_pid']);
+                                                               $this->log($table, $id, 5, 0, 1, 'Filesize (%s) of file \'%s\' exceeds limit (%s). (%s)', 13, array(\TYPO3\CMS\Core\Utility\GeneralUtility::formatSize($fileSize), $theFile, GeneralUtility::formatSize($maxSize * 1024), $recFID), $propArr['event_pid']);
                                                        }
                                                } else {
                                                        $this->log($table, $id, 5, 0, 1, 'The destination (%s) or the source file (%s) does not exist. (%s)', 14, array($dest, $theFile, $recFID), $propArr['event_pid']);
@@ -1846,7 +1849,7 @@ class DataHandler {
                                                // If the destination file was created, we will set the new filename in
                                                // the value array, otherwise unset the entry in the value array!
                                                if (@is_file($theDestFile)) {
-                                                       $info = \TYPO3\CMS\Core\Utility\GeneralUtility::split_fileref($theDestFile);
+                                                       $info = GeneralUtility::split_fileref($theDestFile);
                                                        // The value is set to the new filename
                                                        $valueArray[$key] = $info['file'];
                                                } else {
@@ -1859,7 +1862,7 @@ class DataHandler {
                        // If MM relations for the files, we will set the relations as MM records and change the valuearray to contain a single entry with a count of the number of files!
                        if ($tcaFieldConf['MM']) {
                                /** @var $dbAnalysis \TYPO3\CMS\Core\Database\RelationHandler */
-                               $dbAnalysis = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Database\\RelationHandler');
+                               $dbAnalysis = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Database\\RelationHandler');
                                // Dummy
                                $dbAnalysis->tableArray['files'] = array();
                                foreach ($valueArray as $key => $theFile) {
@@ -1914,7 +1917,7 @@ class DataHandler {
                                                                if (!$maxSize || $fileSize <= $maxSize * 1024) {
                                                                        // Prepare filename:
                                                                        $theEndFileName = isset($this->alternativeFileName[$theFile]) ? $this->alternativeFileName[$theFile] : $theFile;
-                                                                       $fI = \TYPO3\CMS\Core\Utility\GeneralUtility::split_fileref($theEndFileName);
+                                                                       $fI = GeneralUtility::split_fileref($theEndFileName);
                                                                        // Check for allowed extension:
                                                                        if ($this->fileFunc->checkIfAllowed($fI['fileext'], $dest, $theEndFileName)) {
                                                                                $theDestFile = PATH_site . $this->alternativeFilePath[$theFile];
@@ -1933,7 +1936,7 @@ class DataHandler {
                                                                                $this->log($table, $id, 5, 0, 1, 'File extension \'%s\' not allowed. (%s)', 12, array($fI['fileext'], $recFID), $propArr['event_pid']);
                                                                        }
                                                                } else {
-                                                                       $this->log($table, $id, 5, 0, 1, 'Filesize (%s) of file \'%s\' exceeds limit (%s). (%s)', 13, array(\TYPO3\CMS\Core\Utility\GeneralUtility::formatSize($fileSize), $theFile, \TYPO3\CMS\Core\Utility\GeneralUtility::formatSize($maxSize * 1024), $recFID), $propArr['event_pid']);
+                                                                       $this->log($table, $id, 5, 0, 1, 'Filesize (%s) of file \'%s\' exceeds limit (%s). (%s)', 13, array(\TYPO3\CMS\Core\Utility\GeneralUtility::formatSize($fileSize), $theFile, GeneralUtility::formatSize($maxSize * 1024), $recFID), $propArr['event_pid']);
                                                                }
                                                                // If the destination file was created, we will set the new filename in the value array, otherwise unset the entry in the value array!
                                                                if (@is_file($theDestFile)) {
@@ -1945,7 +1948,7 @@ class DataHandler {
                                                                }
                                                        }
                                                }
-                                               $theFile = \TYPO3\CMS\Core\Utility\GeneralUtility::fixWindowsFilePath($theFile);
+                                               $theFile = GeneralUtility::fixWindowsFilePath($theFile);
                                                if (\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($theFile, PATH_site)) {
                                                        $theFile = substr($theFile, strlen(PATH_site));
                                                }
@@ -1977,8 +1980,8 @@ class DataHandler {
                        // The problem is, that when copying a page, flexfrom XML comes along in the array for the new record - but since $this->checkValue_currentRecord does not have a uid or pid for that sake, the \TYPO3\CMS\Backend\Utility\BackendUtility::getFlexFormDS() function returns no good DS. For new records we do know the expected PID so therefore we send that with this special parameter. Only active when larger than zero.
                        $newRecordPidValue = $status == 'new' ? $realPid : 0;
                        // Get current value array:
-                       $dataStructArray = \TYPO3\CMS\Backend\Utility\BackendUtility::getFlexFormDS($tcaFieldConf, $this->checkValue_currentRecord, $table, $field, TRUE, $newRecordPidValue);
-                       $currentValueArray = \TYPO3\CMS\Core\Utility\GeneralUtility::xml2array($curValue);
+                       $dataStructArray = BackendUtility::getFlexFormDS($tcaFieldConf, $this->checkValue_currentRecord, $table, $field, TRUE, $newRecordPidValue);
+                       $currentValueArray = GeneralUtility::xml2array($curValue);
                        if (!is_array($currentValueArray)) {
                                $currentValueArray = array();
                        }
@@ -1998,24 +2001,24 @@ class DataHandler {
                        // Merge them together IF they are both arrays:
                        // Here we convert the currently submitted values BACK to an array, then merge the two and then BACK to XML again. This is needed to ensure the charsets are the same (provided that the current value was already stored IN the charset that the new value is converted to).
                        if (is_array($currentValueArray)) {
-                               $arrValue = \TYPO3\CMS\Core\Utility\GeneralUtility::xml2array($xmlValue);
+                               $arrValue = GeneralUtility::xml2array($xmlValue);
 
                                if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['checkFlexFormValue'])) {
                                        foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['checkFlexFormValue'] as $classRef) {
-                                               $hookObject = \TYPO3\CMS\Core\Utility\GeneralUtility::getUserObj($classRef);
+                                               $hookObject = GeneralUtility::getUserObj($classRef);
                                                if (method_exists($hookObject, 'checkFlexFormValue_beforeMerge')) {
                                                        $hookObject->checkFlexFormValue_beforeMerge($this, $currentValueArray, $arrValue);
                                                }
                                        }
                                }
 
-                               $arrValue = \TYPO3\CMS\Core\Utility\GeneralUtility::array_merge_recursive_overrule($currentValueArray, $arrValue);
+                               $arrValue = GeneralUtility::array_merge_recursive_overrule($currentValueArray, $arrValue);
                                $xmlValue = $this->checkValue_flexArray2Xml($arrValue, TRUE);
                        }
                        // Action commands (sorting order and removals of elements)
-                       $actionCMDs = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('_ACTION_FLEX_FORMdata');
+                       $actionCMDs = GeneralUtility::_GP('_ACTION_FLEX_FORMdata');
                        if (is_array($actionCMDs[$table][$id][$field]['data'])) {
-                               $arrValue = \TYPO3\CMS\Core\Utility\GeneralUtility::xml2array($xmlValue);
+                               $arrValue = GeneralUtility::xml2array($xmlValue);
                                $this->_ACTION_FLEX_FORMdata($arrValue['data'], $actionCMDs[$table][$id][$field]['data']);
                                $xmlValue = $this->checkValue_flexArray2Xml($arrValue, TRUE);
                        }
@@ -2040,7 +2043,7 @@ class DataHandler {
         */
        public function checkValue_flexArray2Xml($array, $addPrologue = FALSE) {
                /** @var $flexObj \TYPO3\CMS\Core\Configuration\FlexForm\FlexFormTools */
-               $flexObj = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Configuration\\FlexForm\\FlexFormTools');
+               $flexObj = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Configuration\\FlexForm\\FlexFormTools');
                return $flexObj->flexArray2Xml($array, $addPrologue);
        }
 
@@ -2070,7 +2073,7 @@ class DataHandler {
                                                        }
                                                        unset($valueArray[$idx]);
                                                }
-                                               $valueArray = \TYPO3\CMS\Core\Utility\GeneralUtility::array_merge($newValueArray, $valueArray);
+                                               $valueArray = GeneralUtility::array_merge($newValueArray, $valueArray);
                                        }
                                } elseif (is_array($actionCMDs[$key]) && isset($valueArray[$key])) {
                                        $this->_ACTION_FLEX_FORMdata($valueArray[$key], $actionCMDs[$key]);
@@ -2099,7 +2102,7 @@ class DataHandler {
                        return FALSE;
                }
                // When values are sent they come as comma-separated values which are exploded by this function:
-               $valueArray = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $value);
+               $valueArray = GeneralUtility::trimExplode(',', $value);
                // Remove duplicates: (should not be needed)
                $valueArray = array_unique($valueArray);
                // Example for received data:
@@ -2222,7 +2225,7 @@ class DataHandler {
                                        }
                                        break;
                                default:
-                                       $evalObj = \TYPO3\CMS\Core\Utility\GeneralUtility::getUserObj($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tce']['formevals'][$func] . ':&' . $func);
+                                       $evalObj = 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);
                                        }
@@ -2338,7 +2341,7 @@ class DataHandler {
                                        }
                                        break;
                                default:
-                                       $evalObj = \TYPO3\CMS\Core\Utility\GeneralUtility::getUserObj($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tce']['formevals'][$func] . ':&' . $func);
+                                       $evalObj = 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);
                                        }
@@ -2368,13 +2371,13 @@ class DataHandler {
                $prep = $type == 'group' ? $tcaFieldConf['prepend_tname'] : $tcaFieldConf['neg_foreign_table'];
                $newRelations = implode(',', $valueArray);
                /** @var $dbAnalysis \TYPO3\CMS\Core\Database\RelationHandler */
-               $dbAnalysis = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Database\\RelationHandler');
+               $dbAnalysis = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Database\\RelationHandler');
                $dbAnalysis->registerNonTableValues = $tcaFieldConf['allowNonIdValues'] ? 1 : 0;
                $dbAnalysis->start($newRelations, $tables, '', 0, $currentTable, $tcaFieldConf);
                if ($tcaFieldConf['MM']) {
                        if ($status == 'update') {
                                /** @var $oldRelations_dbAnalysis \TYPO3\CMS\Core\Database\RelationHandler */
-                               $oldRelations_dbAnalysis = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Database\\RelationHandler');
+                               $oldRelations_dbAnalysis = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Database\\RelationHandler');
                                $oldRelations_dbAnalysis->registerNonTableValues = $tcaFieldConf['allowNonIdValues'] ? 1 : 0;
                                // Db analysis with $id will initialize with the existing relations
                                $oldRelations_dbAnalysis->start('', $tables, $tcaFieldConf['MM'], $id, $currentTable, $tcaFieldConf);
@@ -2409,7 +2412,7 @@ class DataHandler {
         * @todo Define visibility
         */
        public function checkValue_group_select_explodeSelectGroupValue($value) {
-               $valueArray = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $value, 1);
+               $valueArray = GeneralUtility::trimExplode(',', $value, 1);
                foreach ($valueArray as &$newVal) {
                        $temp = explode('|', $newVal, 2);
                        $newVal = str_replace(',', '', str_replace('|', '', rawurldecode($temp[0])));
@@ -2436,7 +2439,7 @@ class DataHandler {
        public function checkValue_flex_procInData($dataPart, $dataPart_current, $uploadedFiles, $dataStructArray, $pParams, $callBackFunc = '') {
                if (is_array($dataPart)) {
                        foreach ($dataPart as $sKey => $sheetDef) {
-                               list($dataStruct, $actualSheet) = \TYPO3\CMS\Core\Utility\GeneralUtility::resolveSheetDefInDS($dataStructArray, $sKey);
+                               list($dataStruct, $actualSheet) = GeneralUtility::resolveSheetDefInDS($dataStructArray, $sKey);
                                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 . '/');
@@ -2526,13 +2529,13 @@ class DataHandler {
                                                                        if (isset($res['value'])) {
                                                                                // Calculating/Retrieving some values here:
                                                                                list(, , $recFieldName) = explode(':', $CVrecFID);
-                                                                               $theTypeString = \TYPO3\CMS\Backend\Utility\BackendUtility::getTCAtypeValue($CVtable, $this->checkValue_currentRecord);
-                                                                               $specConf = \TYPO3\CMS\Backend\Utility\BackendUtility::getSpecConfParts('', $dsConf['TCEforms']['defaultExtras']);
+                                                                               $theTypeString = BackendUtility::getTCAtypeValue($CVtable, $this->checkValue_currentRecord);
+                                                                               $specConf = BackendUtility::getSpecConfParts('', $dsConf['TCEforms']['defaultExtras']);
                                                                                // Find, thisConfig:
-                                                                               $RTEsetup = $this->BE_USER->getTSConfig('RTE', \TYPO3\CMS\Backend\Utility\BackendUtility::getPagesTSconfig($CVtscPID));
-                                                                               $thisConfig = \TYPO3\CMS\Backend\Utility\BackendUtility::RTEsetup($RTEsetup['properties'], $CVtable, $recFieldName, $theTypeString);
+                                                                               $RTEsetup = $this->BE_USER->getTSConfig('RTE', BackendUtility::getPagesTSconfig($CVtscPID));
+                                                                               $thisConfig = BackendUtility::RTEsetup($RTEsetup['properties'], $CVtable, $recFieldName, $theTypeString);
                                                                                // Get RTE object, draw form and set flag:
-                                                                               $RTEobj = \TYPO3\CMS\Backend\Utility\BackendUtility::RTEgetObj();
+                                                                               $RTEobj = BackendUtility::RTEgetObj();
                                                                                if (is_object($RTEobj)) {
                                                                                        $res['value'] = $RTEobj->transformContent('db', $res['value'], $CVtable, $recFieldName, $this->checkValue_currentRecord, $specConf, $thisConfig, '', $CVrealPid);
                                                                                } else {
@@ -2587,13 +2590,13 @@ class DataHandler {
                $valueArray = $this->applyFiltersToValues($tcaFieldConf, $valueArray);
                // Fetch the related child records using \TYPO3\CMS\Core\Database\RelationHandler
                /** @var $dbAnalysis \TYPO3\CMS\Core\Database\RelationHandler */
-               $dbAnalysis = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Database\\RelationHandler');
+               $dbAnalysis = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Database\\RelationHandler');
                $dbAnalysis->start(implode(',', $valueArray), $foreignTable, '', 0, $table, $tcaFieldConf);
                // If the localizationMode is set to 'keep', the children for the localized parent are kept as in the original untranslated record:
-               $localizationMode = \TYPO3\CMS\Backend\Utility\BackendUtility::getInlineLocalizationMode($table, $tcaFieldConf);
+               $localizationMode = BackendUtility::getInlineLocalizationMode($table, $tcaFieldConf);
                if ($localizationMode == 'keep' && $status == 'update') {
                        // Fetch the current record and determine the original record:
-                       $row = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecordWSOL($table, $id);
+                       $row = BackendUtility::getRecordWSOL($table, $id);
                        if (is_array($row)) {
                                $language = intval($row[$GLOBALS['TCA'][$table]['ctrl']['languageField']]);
                                $transOrigPointer = intval($row[$GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField']]);
@@ -2654,7 +2657,7 @@ class DataHandler {
                $hookObjectsArr = array();
                if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processCmdmapClass'])) {
                        foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processCmdmapClass'] as $classRef) {
-                               $hookObj = \TYPO3\CMS\Core\Utility\GeneralUtility::getUserObj($classRef);
+                               $hookObj = GeneralUtility::getUserObj($classRef);
                                if (method_exists($hookObj, 'processCmdmap_beforeStart')) {
                                        $hookObj->processCmdmap_beforeStart($this);
                                }
@@ -2730,7 +2733,7 @@ class DataHandler {
                                                        }
                                                }
                                                // Merging the copy-array info together for remapping purposes.
-                                               $this->copyMappingArray_merged = \TYPO3\CMS\Core\Utility\GeneralUtility::array_merge_recursive_overrule($this->copyMappingArray_merged, $this->copyMappingArray);
+                                               $this->copyMappingArray_merged = GeneralUtility::array_merge_recursive_overrule($this->copyMappingArray_merged, $this->copyMappingArray);
                                        }
                                }
                        }
@@ -2779,7 +2782,7 @@ class DataHandler {
                                        $data = array();
                                        $nonFields = array_unique(\TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', 'uid,perms_userid,perms_groupid,perms_user,perms_group,perms_everybody,t3ver_oid,t3ver_wsid,t3ver_id,t3ver_label,t3ver_state,t3ver_count,t3ver_stage,t3ver_tstamp,' . $excludeFields, 1));
                                        // So it copies (and localized) content from workspace...
-                                       $row = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecordWSOL($table, $uid);
+                                       $row = BackendUtility::getRecordWSOL($table, $uid);
                                        if (is_array($row)) {
                                                // Initializing:
                                                $theNewID = uniqid('NEW');
@@ -2791,7 +2794,7 @@ class DataHandler {
                                                $copyAfterFields = $destPid < 0 ? $this->fixCopyAfterDuplFields($table, $uid, abs($destPid), 0) : array();
                                                // Page TSconfig related:
                                                // NOT using \TYPO3\CMS\Backend\Utility\BackendUtility::getTSCpid() because we need the real pid - not the ID of a page, if the input is a page...
-                                               $tscPID = \TYPO3\CMS\Backend\Utility\BackendUtility::getTSconfig_pidValue($table, $uid, $destPid);
+                                               $tscPID = BackendUtility::getTSconfig_pidValue($table, $uid, $destPid);
                                                $TSConfig = $this->getTCEMAIN_TSconfig($tscPID);
                                                $tE = $this->getTableEntries($table, $TSConfig);
                                                // Traverse ALL fields of the selected record:
@@ -2809,7 +2812,7 @@ class DataHandler {
                                                                } elseif (isset($copyAfterFields[$field])) {
                                                                        // Copy-after value if available:
                                                                        $value = $copyAfterFields[$field];
-                                                               } elseif ($GLOBALS['TCA'][$table]['ctrl']['setToDefaultOnCopy'] && \TYPO3\CMS\Core\Utility\GeneralUtility::inList($GLOBALS['TCA'][$table]['ctrl']['setToDefaultOnCopy'], $field)) {
+                                                               } elseif ($GLOBALS['TCA'][$table]['ctrl']['setToDefaultOnCopy'] && GeneralUtility::inList($GLOBALS['TCA'][$table]['ctrl']['setToDefaultOnCopy'], $field)) {
                                                                        $value = $defaultData[$field];
                                                                } else {
                                                                        // Hide at copy may override:
@@ -2837,7 +2840,7 @@ class DataHandler {
                                                }
                                                // Do the copy by simply submitting the array through TCEmain:
                                                /** @var $copyTCE \TYPO3\CMS\Core\DataHandling\DataHandler */
-                                               $copyTCE = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\DataHandling\\DataHandler');
+                                               $copyTCE = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\DataHandling\\DataHandler');
                                                $copyTCE->stripslashes_values = 0;
                                                $copyTCE->copyTree = $this->copyTree;
                                                // Copy forth the cached TSconfig
@@ -2849,7 +2852,7 @@ class DataHandler {
                                                // Getting the new UID:
                                                $theNewSQLID = $copyTCE->substNEWwithIDs[$theNewID];
                                                if ($theNewSQLID) {
-                                                       $this->copyRecord_fixRTEmagicImages($table, \TYPO3\CMS\Backend\Utility\BackendUtility::wsMapId($table, $theNewSQLID));
+                                                       $this->copyRecord_fixRTEmagicImages($table, BackendUtility::wsMapId($table, $theNewSQLID));
                                                        $this->copyMappingArray[$table][$origUid] = $theNewSQLID;
                                                        // Keep automatically versionized record information:
                                                        if (isset($copyTCE->autoVersionIdMap[$table][$theNewSQLID])) {
@@ -3015,7 +3018,7 @@ class DataHandler {
                                        if ($theNewSQLID) {
                                                $this->dbAnalysisStoreExec();
                                                $this->dbAnalysisStore = array();
-                                               $this->copyRecord_fixRTEmagicImages($table, \TYPO3\CMS\Backend\Utility\BackendUtility::wsMapId($table, $theNewSQLID));
+                                               $this->copyRecord_fixRTEmagicImages($table, BackendUtility::wsMapId($table, $theNewSQLID));
                                                return $this->copyMappingArray[$table][$uid] = $theNewSQLID;
                                        }
                                } else {
@@ -3094,23 +3097,23 @@ class DataHandler {
                $value = $this->copyRecord_procFilesRefs($conf, $uid, $value);
                $inlineSubType = $this->getInlineFieldType($conf);
                // Get the localization mode for the current (parent) record (keep|select):
-               $localizationMode = \TYPO3\CMS\Backend\Utility\BackendUtility::getInlineLocalizationMode($table, $field);
+               $localizationMode = 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'];
                        $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']);
+                       $localizeForeignTable = isset($conf['foreign_table']) && BackendUtility::isTableLocalizable($conf['foreign_table']);
                        $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 = 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')) {
                                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);
+                                       $recordLocalization = BackendUtility::getRecordLocalization($item['table'], $item['id'], $language);
                                        if ($recordLocalization) {
                                                $dbAnalysis->itemArray[$index]['id'] = $recordLocalization[0]['uid'];
                                        } elseif ($this->isNestedElementCallRegistered($item['table'], $item['id'], 'localize') === FALSE) {
@@ -3121,7 +3124,7 @@ class DataHandler {
                        } 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);
+                                       $recordLocalization = BackendUtility::getRecordLocalization($item['table'], $item['id'], $language);
                                        if ($recordLocalization) {
                                                $dbAnalysis->itemArray[$index]['id'] = $recordLocalization[0]['uid'];
                                        } elseif ($this->isNestedElementCallRegistered($item['table'], $item['id'], 'localize') === FALSE) {
@@ -3143,12 +3146,12 @@ class DataHandler {
                        } else {
                                // Fetch the related child records using \TYPO3\CMS\Core\Database\RelationHandler
                                /** @var $dbAnalysis \TYPO3\CMS\Core\Database\RelationHandler */
-                               $dbAnalysis = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Database\\RelationHandler');
+                               $dbAnalysis = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Database\\RelationHandler');
                                $dbAnalysis->start($value, $conf['foreign_table'], '', $uid, $table, $conf);
                                // 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 && 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']) {
                                                        $newId = $this->localize($v['table'], $v['id'], $language);
@@ -3156,8 +3159,8 @@ class DataHandler {
                                        } else {
                                                if (!\TYPO3\CMS\Core\Utility\MathUtility::canBeInterpretedAsInteger($realDestPid)) {
                                                        $newId = $this->copyRecord($v['table'], $v['id'], -$v['id']);
-                                               } elseif ($realDestPid == -1 && \TYPO3\CMS\Backend\Utility\BackendUtility::isTableWorkspaceEnabled($v['table'])) {
-                                                       $workspaceVersion = \TYPO3\CMS\Backend\Utility\BackendUtility::getWorkspaceVersionOfRecord($this->BE_USER->workspace, $v['table'], $v['id'], 'uid');
+                                               } elseif ($realDestPid == -1 && BackendUtility::isTableWorkspaceEnabled($v['table'])) {
+                                                       $workspaceVersion = BackendUtility::getWorkspaceVersionOfRecord($this->BE_USER->workspace, $v['table'], $v['id'], 'uid');
                                                        // If workspace version does not exist, create a new one:
                                                        if ($workspaceVersion === FALSE) {
                                                                $newId = $this->versionizeRecord($v['table'], $v['id'], isset($workspaceOptions['label']) ? $workspaceOptions['label'] : 'Auto-created for WS #' . $this->BE_USER->workspace, isset($workspaceOptions['delete']) ? $workspaceOptions['delete'] : FALSE);
@@ -3184,8 +3187,8 @@ class DataHandler {
                // For "flex" fieldtypes we need to traverse the structure for two reasons: If there are file references they have to be prepended with absolute paths and if there are database reference they MIGHT need to be remapped (still done in remapListedDBRecords())
                if ($conf['type'] == 'flex') {
                        // Get current value array:
-                       $dataStructArray = \TYPO3\CMS\Backend\Utility\BackendUtility::getFlexFormDS($conf, $row, $table);
-                       $currentValueArray = \TYPO3\CMS\Core\Utility\GeneralUtility::xml2array($value);
+                       $dataStructArray = BackendUtility::getFlexFormDS($conf, $row, $table);
+                       $currentValueArray = GeneralUtility::xml2array($value);
                        // Traversing the XML structure, processing files:
                        if (is_array($currentValueArray)) {
                                $currentValueArray['data'] = $this->checkValue_flex_procInData($currentValueArray['data'], array(), array(), $dataStructArray, array($table, $uid, $field, $realDestPid), 'copyRecord_flexFormCallBack');
@@ -3241,7 +3244,7 @@ class DataHandler {
                        if ($conf['MM']) {
                                $theFileValues = array();
                                /** @var $dbAnalysis \TYPO3\CMS\Core\Database\RelationHandler */
-                               $dbAnalysis = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Database\\RelationHandler');
+                               $dbAnalysis = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Database\\RelationHandler');
                                $dbAnalysis->start('', 'files', $conf['MM'], $uid);
                                foreach ($dbAnalysis->itemArray as $somekey => $someval) {
                                        if ($someval['id']) {
@@ -3249,7 +3252,7 @@ class DataHandler {
                                        }
                                }
                        } else {
-                               $theFileValues = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $value, 1);
+                               $theFileValues = GeneralUtility::trimExplode(',', $value, 1);
                        }
                        // Traverse this array of files:
                        $uploadFolder = $conf['internal_type'] == 'file' ? $conf['uploadfolder'] : '';
@@ -3283,7 +3286,7 @@ class DataHandler {
        public function copyRecord_fixRTEmagicImages($table, $theNewSQLID) {
                // Creating fileFunc object.
                if (!$this->fileFunc) {
-                       $this->fileFunc = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Utility\\File\\BasicFileUtility');
+                       $this->fileFunc = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Utility\\File\\BasicFileUtility');
                        $this->include_filefunctions = 1;
                }
                // Select all RTEmagic files in the reference table from the table/ID
@@ -3303,14 +3306,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 && 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)) {
+                                                       if (!@is_file($copyDestName) && !@is_file($origDestName) && $origDestName === GeneralUtility::getFileAbsFileName($origDestName) && $copyDestName === 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);
@@ -3319,7 +3322,7 @@ class DataHandler {
                                                                $this->RTEmagic_copyIndex[$rec['tablename']][$rec['recuid']][$rec['field']][$rec['ref_string']] = substr($copyDestName, strlen(PATH_site));
                                                                // Check and update the record using \TYPO3\CMS\Core\Database\ReferenceIndex
                                                                if (@is_file($copyDestName)) {
-                                                                       $sysRefObj = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Database\\ReferenceIndex');
+                                                                       $sysRefObj = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Database\\ReferenceIndex');
                                                                        $error = $sysRefObj->setReferenceValue($rec['hash'], substr($copyDestName, strlen(PATH_site)), FALSE, TRUE);
                                                                        if ($error) {
                                                                                echo $this->newlog('TYPO3\\CMS\\Core\\Database\\ReferenceIndex::setReferenceValue(): ' . $error, 1);
@@ -3355,7 +3358,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 (!BackendUtility::isTableLocalizable($table) || !empty($GLOBALS['TCA'][$table]['ctrl']['transForeignTable']) || !empty($GLOBALS['TCA'][$table]['ctrl']['transOrigPointerTable'])) {
                        return;
                }
                $where = '';
@@ -3363,15 +3366,15 @@ class DataHandler {
                        $where = ' AND t3ver_oid=0';
                }
                // If $destPid is < 0, get the pid of the record with uid equal to abs($destPid)
-               $tscPID = \TYPO3\CMS\Backend\Utility\BackendUtility::getTSconfig_pidValue($table, $uid, $destPid);
+               $tscPID = BackendUtility::getTSconfig_pidValue($table, $uid, $destPid);
                // Get the localized records to be copied
-               $l10nRecords = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecordsByField($table, $GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField'], $uid, $where);
+               $l10nRecords = BackendUtility::getRecordsByField($table, $GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField'], $uid, $where);
                if (is_array($l10nRecords)) {
                        // If $destPid < 0, then it is the uid of the original language record we are inserting after
                        if ($destPid < 0) {
                                $localizedDestPids = array();
                                // Get the localized records of the record we are inserting after
-                               $destL10nRecords = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecordsByField($table, $GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField'], abs($destPid), $where);
+                               $destL10nRecords = BackendUtility::getRecordsByField($table, $GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField'], abs($destPid), $where);
                                // Index the localized record uids by language
                                if (is_array($destL10nRecords)) {
                                        foreach ($destL10nRecords as $record) {
@@ -3412,7 +3415,7 @@ class DataHandler {
                        // happens for pages with "branch" versioning type)
                        // @deprecated note: as "branch" versioning is deprecated since TYPO3 4.2, this
                        // functionality will be removed in TYPO3 4.7 (note by benni: a hook could replace this)
-                       if ($lookForLiveVersion = \TYPO3\CMS\Backend\Utility\BackendUtility::getLiveVersionOfRecord($table, $uid, 'uid')) {
+                       if ($lookForLiveVersion = BackendUtility::getLiveVersionOfRecord($table, $uid, 'uid')) {
                                $uid = $lookForLiveVersion['uid'];
                        }
                        // Initialize:
@@ -3448,7 +3451,7 @@ class DataHandler {
                                                // Move the record via a hook, used e.g. for versioning
                                                if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['moveRecordClass'])) {
                                                        foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['moveRecordClass'] as $classRef) {
-                                                               $hookObj = \TYPO3\CMS\Core\Utility\GeneralUtility::getUserObj($classRef);
+                                                               $hookObj = GeneralUtility::getUserObj($classRef);
                                                                if (method_exists($hookObj, 'moveRecord')) {
                                                                        $hookObj->moveRecord($table, $uid, $destPid, $propArr, $moveRec, $resolvedPid, $recordWasMoved, $this);
                                                                }
@@ -3498,7 +3501,7 @@ class DataHandler {
                $hookObjectsArr = array();
                if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['moveRecordClass'])) {
                        foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['moveRecordClass'] as $classRef) {
-                               $hookObjectsArr[] = \TYPO3\CMS\Core\Utility\GeneralUtility::getUserObj($classRef);
+                               $hookObjectsArr[] = GeneralUtility::getUserObj($classRef);
                        }
                }
                // Timestamp field:
@@ -3627,7 +3630,7 @@ class DataHandler {
         */
        public function moveRecord_procFields($table, $uid, $destPid) {
                $conf = $GLOBALS['TCA'][$table]['columns'];
-               $row = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecordWSOL($table, $uid);
+               $row = BackendUtility::getRecordWSOL($table, $uid);
                if (is_array($row)) {
                        foreach ($row as $field => $value) {
                                $this->moveRecord_procBasedOnFieldType($table, $uid, $destPid, $field, $value, $conf[$field]['config']);
@@ -3662,7 +3665,7 @@ class DataHandler {
                                                // make sure they reside at that page and not at its parent
                                                $destPid = $uid;
                                        }
-                                       $dbAnalysis = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Database\\RelationHandler');
+                                       $dbAnalysis = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Database\\RelationHandler');
                                        $dbAnalysis->start($value, $conf['foreign_table'], '', $uid, $table, $conf);
                                }
                        }
@@ -3689,20 +3692,20 @@ 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 (!BackendUtility::isTableLocalizable($table) || !empty($GLOBALS['TCA'][$table]['ctrl']['transForeignTable']) || !empty($GLOBALS['TCA'][$table]['ctrl']['transOrigPointerTable'])) {
                        return;
                }
                $where = '';
                if (isset($GLOBALS['TCA'][$table]['ctrl']['versioningWS']) && $GLOBALS['TCA'][$table]['ctrl']['versioningWS']) {
                        $where = ' AND t3ver_oid=0';
                }
-               $l10nRecords = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecordsByField($table, $GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField'], $uid, $where);
+               $l10nRecords = BackendUtility::getRecordsByField($table, $GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField'], $uid, $where);
                if (is_array($l10nRecords)) {
                        // If $$originalRecordDestinationPid < 0, then it is the uid of the original language record we are inserting after
                        if ($originalRecordDestinationPid < 0) {
                                $localizedDestPids = array();
                                // Get the localized records of the record we are inserting after
-                               $destL10nRecords = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecordsByField($table, $GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField'], abs($originalRecordDestinationPid), $where);
+                               $destL10nRecords = BackendUtility::getRecordsByField($table, $GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField'], abs($originalRecordDestinationPid), $where);
                                // Index the localized record uids by language
                                if (is_array($destL10nRecords)) {
                                        foreach ($destL10nRecords as $record) {
@@ -3738,18 +3741,18 @@ class DataHandler {
                if ($GLOBALS['TCA'][$table] && $uid && $this->isNestedElementCallRegistered($table, $uid, 'localize') === FALSE) {
                        $this->registerNestedElementCall($table, $uid, 'localize');
                        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 ($langRec = 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
-                                               $row = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecordWSOL($table, $uid);
+                                               $row = BackendUtility::getRecordWSOL($table, $uid);
                                                if (is_array($row)) {
                                                        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' && !BackendUtility::getRecordsByField('pages_language_overlay', 'pid', $uid, (' AND ' . $GLOBALS['TCA']['pages_language_overlay']['ctrl']['languageField'] . '=' . intval($langRec['uid'])));
                                                                                $Ttable = 'pages_language_overlay';
                                                                        } else {
-                                                                               $pass = !\TYPO3\CMS\Backend\Utility\BackendUtility::getRecordLocalization($table, $uid, $langRec['uid'], ('AND pid=' . intval($row['pid'])));
+                                                                               $pass = !BackendUtility::getRecordLocalization($table, $uid, $langRec['uid'], ('AND pid=' . intval($row['pid'])));
                                                                                $Ttable = $table;
                                                                        }
                                                                        if ($pass) {
@@ -3768,7 +3771,7 @@ class DataHandler {
                                                                                        // Check if we are just prefixing:
                                                                                        if ($fCfg['l10n_mode'] == 'prefixLangTitle') {
                                                                                                if (($fCfg['config']['type'] == 'text' || $fCfg['config']['type'] == 'input') && strlen($row[$fN])) {
-                                                                                                       list($tscPID) = \TYPO3\CMS\Backend\Utility\BackendUtility::getTSCpid($table, $uid, '');
+                                                                                                       list($tscPID) = BackendUtility::getTSCpid($table, $uid, '');
                                                                                                        $TSConfig = $this->getTCEMAIN_TSconfig($tscPID);
                                                                                                        if (isset($TSConfig['translateToMessage']) && strlen($TSConfig['translateToMessage'])) {
                                                                                                                $translateToMsg = @sprintf($TSConfig['translateToMessage'], $langRec['title']);
@@ -3796,7 +3799,7 @@ class DataHandler {
                                                                                } else {
                                                                                        // Create new record:
                                                                                        /** @var $copyTCE \TYPO3\CMS\Core\DataHandling\DataHandler */
-                                                                                       $copyTCE = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\DataHandling\\DataHandler');
+                                                                                       $copyTCE = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\DataHandling\\DataHandler');
                                                                                        // Copy forth the cached TSconfig
                                                                                        $copyTCE->stripslashes_values = 0;
                                                                                        $copyTCE->cachedTSconfig = $this->cachedTSconfig;
@@ -3847,30 +3850,30 @@ class DataHandler {
         */
        protected function inlineLocalizeSynchronize($table, $id, $command) {
                // <field>, (localize | synchronize | <uid>):
-               $parts = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $command);
+               $parts = 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'])) {
                        $config = $GLOBALS['TCA'][$table]['columns'][$field]['config'];
                        $foreignTable = $config['foreign_table'];
-                       $localizationMode = \TYPO3\CMS\Backend\Utility\BackendUtility::getInlineLocalizationMode($table, $config);
+                       $localizationMode = BackendUtility::getInlineLocalizationMode($table, $config);
                        if ($localizationMode == 'select') {
-                               $parentRecord = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecordWSOL($table, $id);
+                               $parentRecord = BackendUtility::getRecordWSOL($table, $id);
                                $language = intval($parentRecord[$GLOBALS['TCA'][$table]['ctrl']['languageField']]);
                                $transOrigPointer = intval($parentRecord[$GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField']]);
-                               $transOrigTable = \TYPO3\CMS\Backend\Utility\BackendUtility::getOriginalTranslationTable($table);
+                               $transOrigTable = BackendUtility::getOriginalTranslationTable($table);
                                $childTransOrigPointerField = $GLOBALS['TCA'][$foreignTable]['ctrl']['transOrigPointerField'];
 
                                if ($parentRecord && is_array($parentRecord) && $language > 0 && $transOrigPointer) {
                                        $inlineSubType = $this->getInlineFieldType($config);
-                                       $transOrigRecord = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecordWSOL($transOrigTable, $transOrigPointer);
+                                       $transOrigRecord = BackendUtility::getRecordWSOL($transOrigTable, $transOrigPointer);
 
                                        if ($inlineSubType !== FALSE) {
                                                $removeArray = array();
                                                $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');
+                                               $dbAnalysisOriginal = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Database\\RelationHandler');
                                                $dbAnalysisOriginal->start($transOrigRecord[$field], $foreignTable, $mmTable, $transOrigRecord['uid'], $transOrigTable, $config);
                                                $elementsOriginal = array();
                                                foreach ($dbAnalysisOriginal->itemArray as $item) {
@@ -3879,12 +3882,12 @@ class DataHandler {
                                                unset($dbAnalysisOriginal);
                                                // Fetch children from current localized parent:
                                                /** @var $dbAnalysisCurrent \TYPO3\CMS\Core\Database\RelationHandler */
-                                               $dbAnalysisCurrent = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Database\\RelationHandler');
+                                               $dbAnalysisCurrent = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Database\\RelationHandler');
                                                $dbAnalysisCurrent->start($parentRecord[$field], $foreignTable, $mmTable, $id, $table, $config);
                                                // Perform synchronization: Possibly removal of already localized records:
                                                if ($type == 'synchronize') {
                                                        foreach ($dbAnalysisCurrent->itemArray as $index => $item) {
-                                                               $childRecord = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecordWSOL($item['table'], $item['id']);
+                                                               $childRecord = BackendUtility::getRecordWSOL($item['table'], $item['id']);
                                                                if (isset($childRecord[$childTransOrigPointerField]) && $childRecord[$childTransOrigPointerField] > 0) {
                                                                        $childTransOrigPointer = $childRecord[$childTransOrigPointerField];
                                                                        // If snychronization is requested, child record was translated once, but original record does not exist anymore, remove it:
@@ -3913,7 +3916,7 @@ class DataHandler {
                                                $this->registerDBList[$table][$id][$field] = $value;
                                                // Remove child records (if synchronization requested it):
                                                if (is_array($removeArray) && count($removeArray)) {
-                                                       $tce = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\DataHandling\\DataHandler');
+                                                       $tce = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\DataHandling\\DataHandler');
                                                        $tce->stripslashes_values = FALSE;
                                                        $tce->start(array(), $removeArray);
                                                        $tce->process_cmdmap();
@@ -3953,13 +3956,13 @@ class DataHandler {
         * @todo Define visibility
         */
        public function deleteAction($table, $id) {
-               $recordToDelete = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecord($table, $id);
+               $recordToDelete = BackendUtility::getRecord($table, $id);
                // Record asked to be deleted was found:
                if (is_array($recordToDelete)) {
                        $recordWasDeleted = FALSE;
                        if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processCmdmapClass'])) {
                                foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processCmdmapClass'] as $classRef) {
-                                       $hookObj = \TYPO3\CMS\Core\Utility\GeneralUtility::getUserObj($classRef);
+                                       $hookObj = GeneralUtility::getUserObj($classRef);
                                        if (method_exists($hookObj, 'processCmdmap_deleteAction')) {
                                                $hookObj->processCmdmap_deleteAction($table, $id, $recordToDelete, $recordWasDeleted, $this);
                                        }
@@ -4001,7 +4004,7 @@ class DataHandler {
         * @todo Define visibility
         */
        public function deleteVersionsForRecord($table, $uid, $forceHardDelete) {
-               $versions = \TYPO3\CMS\Backend\Utility\BackendUtility::selectVersionsOfRecord($table, $uid, 'uid,pid');
+               $versions = BackendUtility::selectVersionsOfRecord($table, $uid, 'uid,pid');
                if (is_array($versions)) {
                        foreach ($versions as $verRec) {
                                if (!$verRec['_CURRENT_VERSION']) {
@@ -4081,8 +4084,8 @@ class DataHandler {
                                                        $conf = $cfg['config'];
                                                        switch ($conf['type']) {
                                                                case 'flex':
-                                                                       $flexObj = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Configuration\\FlexForm\\FlexFormTools');
-                                                                       $flexObj->traverseFlexFormXMLData($table, $fieldName, \TYPO3\CMS\Backend\Utility\BackendUtility::getRecordRaw($table, 'uid=' . intval($uid)), $this, 'deleteRecord_flexFormCallBack');
+                                                                       $flexObj = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Configuration\\FlexForm\\FlexFormTools');
+                                                                       $flexObj->traverseFlexFormXMLData($table, $fieldName, BackendUtility::getRecordRaw($table, 'uid=' . intval($uid)), $this, 'deleteRecord_flexFormCallBack');
                                                                        break;
                                                        }
                                                }
@@ -4155,7 +4158,7 @@ class DataHandler {
         */
        public function deleteRecord_flexFormCallBack($dsArr, $dataValue, $PA, $structurePath, $pObj) {
                // Use reference index object to find files in fields:
-               $refIndexObj = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Database\\ReferenceIndex');
+               $refIndexObj = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Database\\ReferenceIndex');
                $files = $refIndexObj->getRelations_procFiles($dataValue, $dsArr['TCEforms']['config'], $PA['uid']);
                // Traverse files and delete them:
                if (is_array($files)) {
@@ -4183,7 +4186,7 @@ class DataHandler {
                if ($force) {
                        // Returns the branch WITHOUT permission checks (0 secures that)
                        $brExist = $this->doesBranchExist('', $uid, 0, 1);
-                       $res = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $brExist . $uid, 1);
+                       $res = GeneralUtility::trimExplode(',', $brExist . $uid, 1);
                } else {
                        $res = $this->canDeletePage($uid);
                }
@@ -4241,7 +4244,7 @@ class DataHandler {
                                // Checks if we had permissions
                                if ($brExist != -1) {
                                        if ($this->noRecordsFromUnallowedTables($brExist . $uid)) {
-                                               $pagesInBranch = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $brExist . $uid, 1);
+                                               $pagesInBranch = GeneralUtility::trimExplode(',', $brExist . $uid, 1);
                                                foreach ($pagesInBranch as $pageInBranch) {
                                                        if (!$this->BE_USER->recordEditAccessInternals('pages', $pageInBranch, FALSE, FALSE, TRUE)) {
                                                                return 'Attempt to delete page which has prohibited localizations.';
@@ -4303,9 +4306,9 @@ class DataHandler {
         */
        public function isRecordUndeletable($table, $uid) {
                $result = FALSE;
-               $record = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecord($table, $uid, 'pid', '', FALSE);
+               $record = BackendUtility::getRecord($table, $uid, 'pid', '', FALSE);
                if ($record['pid']) {
-                       $page = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecord('pages', $record['pid'], 'deleted, title, uid', '', FALSE);
+                       $page = BackendUtility::getRecord('pages', $record['pid'], 'deleted, title, uid', '', FALSE);
                        // The page containing the record is not deleted, thus the record can be undeleted:
                        if (!$page['deleted']) {
                                $result = TRUE;
@@ -4332,7 +4335,7 @@ class DataHandler {
         */
        public function deleteRecord_procFields($table, $uid, $undeleteRecord = FALSE) {
                $conf = $GLOBALS['TCA'][$table]['columns'];
-               $row = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecord($table, $uid, '*', '', FALSE);
+               $row = BackendUtility::getRecord($table, $uid, '*', '', FALSE);
                foreach ($row as $field => $value) {
                        $this->deleteRecord_procBasedOnFieldType($table, $uid, $field, $value, $conf[$field]['config'], $undeleteRecord);
                }
@@ -4358,7 +4361,7 @@ class DataHandler {
                        if ($foreign_table) {
                                $inlineType = $this->getInlineFieldType($conf);
                                if ($inlineType == 'list' || $inlineType == 'field') {
-                                       $dbAnalysis = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Database\\RelationHandler');
+                                       $dbAnalysis = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Database\\RelationHandler');
                                        $dbAnalysis->start($value, $conf['foreign_table'], '', $uid, $table, $conf);
                                        $dbAnalysis->undeleteRecord = TRUE;
                                        // Walk through the items and remove them
@@ -4374,7 +4377,7 @@ class DataHandler {
                } elseif ($this->isReferenceField($conf)) {
                        $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 = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Database\\RelationHandler');
                        $dbAnalysis->start($value, $allowedTables, $conf['MM'], $uid, $table, $conf);
                        foreach ($dbAnalysis->itemArray as $v) {
                                $this->updateRefIndexStack[$table][$uid][] = array($v['table'], $v['id']);
@@ -4392,14 +4395,14 @@ 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 (!BackendUtility::isTableLocalizable($table) || !empty($GLOBALS['TCA'][$table]['ctrl']['transForeignTable']) || !empty($GLOBALS['TCA'][$table]['ctrl']['transOrigPointerTable'])) {
                        return;
                }
                $where = '';
                if (isset($GLOBALS['TCA'][$table]['ctrl']['versioningWS']) && $GLOBALS['TCA'][$table]['ctrl']['versioningWS']) {
                        $where = ' AND t3ver_oid=0';
                }
-               $l10nRecords = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecordsByField($table, $GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField'], $uid, $where);
+               $l10nRecords = BackendUtility::getRecordsByField($table, $GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField'], $uid, $where);
                if (is_array($l10nRecords)) {
                        foreach ($l10nRecords as $record) {
                                $this->deleteAction($table, intval($record['t3ver_oid']) > 0 ? intval($record['t3ver_oid']) : intval($record['uid']));
@@ -4465,7 +4468,7 @@ class DataHandler {
                                                                $workspaceCheck = TRUE;
                                                                if ($this->BE_USER->workspace !== 0) {
                                                                        // Look for version already in workspace:
-                                                                       $workspaceCheck = \TYPO3\CMS\Backend\Utility\BackendUtility::getWorkspaceVersionOfRecord($this->BE_USER->workspace, $table, $id, 'uid') ? FALSE : TRUE;
+                                                                       $workspaceCheck = BackendUtility::getWorkspaceVersionOfRecord($this->BE_USER->workspace, $table, $id, 'uid') ? FALSE : TRUE;
                                                                }
                                                                if ($workspaceCheck) {
                                                                        // Create raw-copy and return result:
@@ -4514,8 +4517,8 @@ class DataHandler {
         */
        public function version_remapMMForVersionSwap($table, $id, $swapWith) {
                // Actually, selecting the records fully is only need if flexforms are found inside... This could be optimized ...
-               $currentRec = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecord($table, $id);
-               $swapRec = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecord($table, $swapWith);
+               $currentRec = BackendUtility::getRecord($table, $id);
+               $swapRec = BackendUtility::getRecord($table, $swapWith);
                $this->version_remapMMForVersionSwap_reg = array();
                foreach ($GLOBALS['TCA'][$table]['columns'] as $field => $fConf) {
                        $conf = $fConf['config'];
@@ -4524,13 +4527,13 @@ class DataHandler {
                                $prependName = $conf['type'] == 'group' ? $conf['prepend_tname'] : $conf['neg_foreign_table'];
                                if ($conf['MM']) {
                                        /** @var $dbAnalysis \TYPO3\CMS\Core\Database\RelationHandler */
-                                       $dbAnalysis = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Database\\RelationHandler');
+                                       $dbAnalysis = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Database\\RelationHandler');
                                        $dbAnalysis->start('', $allowedTables, $conf['MM'], $id, $table, $conf);
                                        if (count($dbAnalysis->getValueArray($prependName))) {
                                                $this->version_remapMMForVersionSwap_reg[$id][$field] = array($dbAnalysis, $conf['MM'], $prependName);
                                        }
                                        /** @var $dbAnalysis \TYPO3\CMS\Core\Database\RelationHandler */
-                                       $dbAnalysis = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Database\\RelationHandler');
+                                       $dbAnalysis = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Database\\RelationHandler');
                                        $dbAnalysis->start('', $allowedTables, $conf['MM'], $swapWith, $table, $conf);
                                        if (count($dbAnalysis->getValueArray($prependName))) {
                                                $this->version_remapMMForVersionSwap_reg[$swapWith][$field] = array($dbAnalysis, $conf['MM'], $prependName);
@@ -4538,14 +4541,14 @@ class DataHandler {
                                }
                        } elseif ($conf['type'] == 'flex') {
                                // Current record
-                               $dataStructArray = \TYPO3\CMS\Backend\Utility\BackendUtility::getFlexFormDS($conf, $currentRec, $table);
-                               $currentValueArray = \TYPO3\CMS\Core\Utility\GeneralUtility::xml2array($currentRec[$field]);
+                               $dataStructArray = BackendUtility::getFlexFormDS($conf, $currentRec, $table);
+                               $currentValueArray = GeneralUtility::xml2array($currentRec[$field]);
                                if (is_array($currentValueArray)) {
                                        $this->checkValue_flex_procInData($currentValueArray['data'], array(), array(), $dataStructArray, array($table, $id, $field), 'version_remapMMForVersionSwap_flexFormCallBack');
                                }
                                // Swap record
-                               $dataStructArray = \TYPO3\CMS\Backend\Utility\BackendUtility::getFlexFormDS($conf, $swapRec, $table);
-                               $currentValueArray = \TYPO3\CMS\Core\Utility\GeneralUtility::xml2array($swapRec[$field]);
+                               $dataStructArray = BackendUtility::getFlexFormDS($conf, $swapRec, $table);
+                               $currentValueArray = GeneralUtility::xml2array($swapRec[$field]);
                                if (is_array($currentValueArray)) {
                                        $this->checkValue_flex_procInData($currentValueArray['data'], array(), array(), $dataStructArray, array($table, $swapWith, $field), 'version_remapMMForVersionSwap_flexFormCallBack');
                                }
@@ -4576,7 +4579,7 @@ class DataHandler {
                        $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 = 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);
                        }
@@ -4629,7 +4632,7 @@ class DataHandler {
                                foreach ($records as $uid => $fields) {
                                        $newData = array();
                                        $theUidToUpdate = $this->copyMappingArray_merged[$table][$uid];
-                                       $theUidToUpdate_saveTo = \TYPO3\CMS\Backend\Utility\BackendUtility::wsMapId($table, $theUidToUpdate);
+                                       $theUidToUpdate_saveTo = BackendUtility::wsMapId($table, $theUidToUpdate);
                                        foreach ($fields as $fieldName => $value) {
                                                $conf = $GLOBALS['TCA'][$table]['columns'][$fieldName]['config'];
                                                switch ($conf['type']) {
@@ -4646,10 +4649,10 @@ class DataHandler {
                                                                        // This will fetch the new row for the element
                                                                        $origRecordRow = $this->recordInfo($table, $theUidToUpdate, '*');
                                                                        if (is_array($origRecordRow)) {
-                                                                               \TYPO3\CMS\Backend\Utility\BackendUtility::workspaceOL($table, $origRecordRow);
+                                                                               BackendUtility::workspaceOL($table, $origRecordRow);
                                                                                // Get current data structure and value array:
-                                                                               $dataStructArray = \TYPO3\CMS\Backend\Utility\BackendUtility::getFlexFormDS($conf, $origRecordRow, $table);
-                                                                               $currentValueArray = \TYPO3\CMS\Core\Utility\GeneralUtility::xml2array($origRecordRow[$fieldName]);
+                                                                               $dataStructArray = BackendUtility::getFlexFormDS($conf, $origRecordRow, $table);
+                                                                               $currentValueArray = GeneralUtility::xml2array($origRecordRow[$fieldName]);
                                                                                // Do recursive processing of the XML data:
                                                                                $currentValueArray['data'] = $this->checkValue_flex_procInData($currentValueArray['data'], array(), array(), $dataStructArray, array($table, $theUidToUpdate, $fieldName), 'remapListedDBRecords_flexFormCallBack');
                                                                                // The return value should be compiled back into XML, ready to insert directly in the field (as we call updateDB() directly later):
@@ -4721,9 +4724,9 @@ class DataHandler {
                // Table name to prepend the UID
                $prependName = $conf['type'] == 'group' ? $conf['prepend_tname'] : '';
                // Which tables that should possibly not be remapped
-               $dontRemapTables = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $conf['dontRemapTablesOnCopy'], 1);
+               $dontRemapTables = GeneralUtility::trimExplode(',', $conf['dontRemapTablesOnCopy'], 1);
                // Convert value to list of references:
-               $dbAnalysis = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Database\\RelationHandler');
+               $dbAnalysis = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Database\\RelationHandler');
                $dbAnalysis->registerNonTableValues = $conf['type'] == 'select' && $conf['allowNonIdValues'] ? 1 : 0;
                $dbAnalysis->start($value, $allowedTables, $conf['MM'], $MM_localUid, $table, $conf);
                // Traverse those references and map IDs:
@@ -4766,7 +4769,7 @@ class DataHandler {
                                $this->remapListedDBRecords_procDBRefs($conf, $value, $theUidToUpdate, $table);
                        } elseif ($inlineType !== FALSE) {
                                /** @var $dbAnalysis \TYPO3\CMS\Core\Database\RelationHandler */
-                               $dbAnalysis = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Database\\RelationHandler');
+                               $dbAnalysis = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Database\\RelationHandler');
                                $dbAnalysis->start($value, $conf['foreign_table'], '', 0, $table, $conf);
                                // Update child records if using pointer fields ('foreign_field'):
                                if ($inlineType == 'field') {
@@ -4783,7 +4786,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(BackendUtility::getLiveVersionIdOfRecord($v['table'], $v['id']))) {
                                                        $GLOBALS['TYPO3_DB']->exec_UPDATEquery($v['table'], 'uid=' . intval($v['id']), $updateValues);
                                                }
                                        }
@@ -4922,10 +4925,10 @@ class DataHandler {
                        return;
                }
 
-               \TYPO3\CMS\Backend\Utility\BackendUtility::workspaceOL($table, $record);
+               BackendUtility::workspaceOL($table, $record);
 
                // Get current data structure and value array:
-               $valueStructure = \TYPO3\CMS\Core\Utility\GeneralUtility::xml2array($record[$field]);
+               $valueStructure = GeneralUtility::xml2array($record[$field]);
 
                // Do recursive processing of the XML data:
                foreach ($modifications as $path => $value) {
@@ -5048,7 +5051,7 @@ class DataHandler {
         * @todo Define visibility
         */
        public function checkModifyAccessList($table) {
-               $res = $this->admin || !$this->tableAdminOnly($table) && \TYPO3\CMS\Core\Utility\GeneralUtility::inList($this->BE_USER->groupData['tables_modify'], $table);
+               $res = $this->admin || !$this->tableAdminOnly($table) && GeneralUtility::inList($this->BE_USER->groupData['tables_modify'], $table);
                // Hook 'checkModifyAccessList': Post-processing of the state of access
                foreach ($this->getCheckModifyAccessListHookObjects() as $hookObject) {
                        /** @var $hookObject \TYPO3\CMS\Core\DataHandling\DataHandlerCheckModifyAccessListHookInterface */
@@ -5185,7 +5188,7 @@ class DataHandler {
                        // Check non-root-level
                        $doktype = $this->pageInfo($page_uid, 'doktype');
                        $allowedTableList = isset($GLOBALS['PAGES_TYPES'][$doktype]['allowedTables']) ? $GLOBALS['PAGES_TYPES'][$doktype]['allowedTables'] : $GLOBALS['PAGES_TYPES']['default']['allowedTables'];
-                       $allowedArray = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $allowedTableList, 1);
+                       $allowedArray = GeneralUtility::trimExplode(',', $allowedTableList, 1);
                        // If all tables or the table is listed as a allowed type, return TRUE
                        if (strstr($allowedTableList, '*') || in_array($checkTable, $allowedArray)) {
                                return TRUE;
@@ -5204,7 +5207,7 @@ class DataHandler {
         */
        public function doesRecordExist($table, $id, $perms) {
                if ($this->bypassAccessCheckForRecords) {
-                       return is_array(\TYPO3\CMS\Backend\Utility\BackendUtility::getRecordRaw($table, 'uid=' . intval($id), 'uid'));
+                       return is_array(BackendUtility::getRecordRaw($table, 'uid=' . intval($id), 'uid'));
                }
                $res = 0;
                $id = intval($id);
@@ -5230,21 +5233,21 @@ class DataHandler {
                        throw new \RuntimeException('Internal ERROR: no permissions to check for non-admin user', 1270853920);
                }
                // For all tables: Check if record exists:
-               $isWebMountRestrictionIgnored = \TYPO3\CMS\Backend\Utility\BackendUtility::isWebMountRestrictionIgnored($table);
+               $isWebMountRestrictionIgnored = BackendUtility::isWebMountRestrictionIgnored($table);
                if (is_array($GLOBALS['TCA'][$table]) && $id > 0 && ($isWebMountRestrictionIgnored || $this->isRecordInWebMount($table, $id) || $this->admin)) {
                        if ($table != 'pages') {
                                // Find record without checking page:
                                $mres = $GLOBALS['TYPO3_DB']->exec_SELECTquery('uid,pid', $table, 'uid=' . intval($id) . $this->deleteClause($table));
                                // THIS SHOULD CHECK FOR editlock I think!
                                $output = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($mres);
-                               \TYPO3\CMS\Backend\Utility\BackendUtility::fixVersioningPid($table, $output, TRUE);
+                               BackendUtility::fixVersioningPid($table, $output, TRUE);
                                // If record found, check page as well:
                                if (is_array($output)) {
                                        // Looking up the page for record:
                                        $mres = $this->doesRecordExist_pageLookUp($output['pid'], $perms);
                                        $pageRec = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($mres);
                                        // Return TRUE if either a page was found OR if the PID is zero AND the user is ADMIN (in which case the record is at root-level):
-                                       $isRootLevelRestrictionIgnored = \TYPO3\CMS\Backend\Utility\BackendUtility::isRootLevelRestrictionIgnored($table);
+                                       $isRootLevelRestrictionIgnored = BackendUtility::isRootLevelRestrictionIgnored($table);
                                        if (is_array($pageRec) || !$output['pid'] && ($isRootLevelRestrictionIgnored || $this->admin)) {
                                                return TRUE;
                                        }
@@ -5355,7 +5358,7 @@ class DataHandler {
                        $loopCheck--;
                        $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('pid, uid, t3ver_oid,t3ver_wsid', 'pages', 'uid=' . intval($dest) . $this->deleteClause('pages'));
                        if ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
-                               \TYPO3\CMS\Backend\Utility\BackendUtility::fixVersioningPid('pages', $row);
+                               BackendUtility::fixVersioningPid('pages', $row);
                                if ($row['pid'] == $id) {
                                        return FALSE;
                                } else {
@@ -5405,7 +5408,7 @@ class DataHandler {
                        return FALSE;
                }
                $allowedTableList = isset($GLOBALS['PAGES_TYPES'][$doktype]['allowedTables']) ? $GLOBALS['PAGES_TYPES'][$doktype]['allowedTables'] : $GLOBALS['PAGES_TYPES']['default']['allowedTables'];
-               $allowedArray = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $allowedTableList, 1);
+               $allowedArray = GeneralUtility::trimExplode(',', $allowedTableList, 1);
                // If all tables is OK the return TRUE
                if (strstr($allowedTableList, '*')) {
                        // OK...
@@ -5485,7 +5488,7 @@ class DataHandler {
        public function getRecordProperties($table, $id, $noWSOL = FALSE) {
                $row = $table == 'pages' && !$id ? array('title' => '[root-level]', 'uid' => 0, 'pid' => 0) : $this->recordInfo($table, $id, '*');
                if (!$noWSOL) {
-                       \TYPO3\CMS\Backend\Utility\BackendUtility::workspaceOL($table, $row);
+                       BackendUtility::workspaceOL($table, $row);
                }
                return $this->getRecordPropertiesFromRow($table, $row);
        }
@@ -5500,9 +5503,9 @@ class DataHandler {
         */
        public function getRecordPropertiesFromRow($table, $row) {
                if ($GLOBALS['TCA'][$table]) {
-                       \TYPO3\CMS\Backend\Utility\BackendUtility::fixVersioningPid($table, $row);
+                       BackendUtility::fixVersioningPid($table, $row);
                        $out = array(
-                               'header' => \TYPO3\CMS\Backend\Utility\BackendUtility::getRecordTitle($table, $row),
+                               'header' => BackendUtility::getRecordTitle($table, $row),
                                'pid' => $row['pid'],
                                'event_pid' => $this->eventPid($table, isset($row['_ORIG_pid']) ? $row['t3ver_oid'] : $row['uid'], $row['pid']),
                                't3ver_state' => $GLOBALS['TCA'][$table]['ctrl']['versioningWS'] ? $row['t3ver_state'] : '',
@@ -5708,7 +5711,7 @@ class DataHandler {
         */
        public function updateRefIndex($table, $id) {
                /** @var $refIndexObj \TYPO3\CMS\Core\Database\ReferenceIndex */
-               $refIndexObj = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Database\\ReferenceIndex');
+               $refIndexObj = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Database\\ReferenceIndex');
                $result = $refIndexObj->updateRefIndexTable($table, $id);
        }
 
@@ -5761,7 +5764,7 @@ class DataHandler {
                                // There was a record
                                if ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
                                        // Look, if the record UID happens to be an offline record. If so, find its live version. Offline uids will be used when a page is versionized as "branch" so this is when we must correct - otherwise a pid of "-1" and a wrong sort-row number is returned which we don't want.
-                                       if ($lookForLiveVersion = \TYPO3\CMS\Backend\Utility\BackendUtility::getLiveVersionOfRecord($table, $row['uid'], $sortRow . ',pid,uid')) {
+                                       if ($lookForLiveVersion = BackendUtility::getLiveVersionOfRecord($table, $row['uid'], $sortRow . ',pid,uid')) {
                                                $row = $lookForLiveVersion;
                                        }
                                        // If the record should be inserted after itself, keep the current sorting information:
@@ -5859,7 +5862,7 @@ class DataHandler {
                                $select .= ',colPos';
                        }
                        // Get the sort value of the default language record
-                       $row = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecord($table, $uid, $select);
+                       $row = BackendUtility::getRecord($table, $uid, $select);
                        if (is_array($row)) {
                                // Find the previous record in default language on the same page
                                $where = 'pid=' . intval($pid) . ' AND ' . 'sys_language_uid=0' . ' AND ' . $sortRow . '<' . intval($row[$sortRow]);
@@ -5870,7 +5873,7 @@ class DataHandler {
                                $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery($select, $table, $where . $this->deleteClause($table), '', $sortRow . ' DESC', '1');
                                // If there is an element, find its localized record in specified localization language
                                if ($previousRow = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
-                                       $previousLocalizedRecord = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecordLocalization($table, $previousRow['uid'], $language);
+                                       $previousLocalizedRecord = BackendUtility::getRecordLocalization($table, $previousRow['uid'], $language);
                                        if (is_array($previousLocalizedRecord[0])) {
                                                $previousLocalizedRecordUid = $previousLocalizedRecord[0]['uid'];
                                        }
@@ -5952,7 +5955,7 @@ class DataHandler {
                if ($GLOBALS['TCA'][$table]['ctrl']['languageField']) {
                        if (!isset($incomingFieldArray[$GLOBALS['TCA'][$table]['ctrl']['languageField']])) {
                                // Language field must be found in input row - otherwise it does not make sense.
-                               $rows = array_merge(array(array('uid' => 0)), $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('uid', 'sys_language', 'pid=0' . \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause('sys_language')), array(array('uid' => -1)));
+                               $rows = array_merge(array(array('uid' => 0)), $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('uid', 'sys_language', 'pid=0' . BackendUtility::deleteClause('sys_language')), array(array('uid' => -1)));
                                foreach ($rows as $r) {
                                        if ($this->BE_USER->checkLanguageAccess($r['uid'])) {
                                                $incomingFieldArray[$GLOBALS['TCA'][$table]['ctrl']['languageField']] = $r['uid'];
@@ -6006,7 +6009,7 @@ class DataHandler {
                        // Unset the fields which are similar:
                        foreach ($fieldArray as $col => $val) {
                                $fieldConfiguration = $GLOBALS['TCA'][$table]['columns'][$col]['config'];
-                               $isNullField = (!empty($fieldConfiguration['eval']) && \TYPO3\CMS\Core\Utility\GeneralUtility::inList($fieldConfiguration['eval'], 'null'));
+                               $isNullField = (!empty($fieldConfiguration['eval']) && GeneralUtility::inList($fieldConfiguration['eval'], 'null'));
 
                                // Unset fields if stored and submitted values are equal - except the current field holds MM relations.
                                // In general this avoids to store superfluous data which also will be visualized in the editing history.
@@ -6077,7 +6080,7 @@ class DataHandler {
         * @todo Define visibility
         */
        public function assemblePermissions($string) {
-               $keyArr = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $string, 1);
+               $keyArr = GeneralUtility::trimExplode(',', $string, 1);
                $value = 0;
                foreach ($keyArr as $key) {
                        if ($key && isset($this->pMap[$key])) {
@@ -6167,7 +6170,7 @@ class DataHandler {
         */
        public function getTCEMAIN_TSconfig($tscPID) {
                if (!isset($this->cachedTSconfig[$tscPID])) {
-                       $this->cachedTSconfig[$tscPID] = $this->BE_USER->getTSConfig('TCEMAIN', \TYPO3\CMS\Backend\Utility\BackendUtility::getPagesTSconfig($tscPID));
+                       $this->cachedTSconfig[$tscPID] = $this->BE_USER->getTSConfig('TCEMAIN', BackendUtility::getPagesTSconfig($tscPID));
                }
                return $this->cachedTSconfig[$tscPID]['properties'];
        }
@@ -6184,7 +6187,7 @@ class DataHandler {
        public function getTableEntries($table, $TSconfig) {
                $tA = is_array($TSconfig['table.'][$table . '.']) ? $TSconfig['table.'][$table . '.'] : array();
                $dA = is_array($TSconfig['default.']) ? $TSconfig['default.'] : array();
-               return \TYPO3\CMS\Core\Utility\GeneralUtility::array_merge_recursive_overrule($dA, $tA);
+               return GeneralUtility::array_merge_recursive_overrule($dA, $tA);
        }
 
        /**
@@ -6211,7 +6214,7 @@ class DataHandler {
         */
        public function dbAnalysisStoreExec() {
                foreach ($this->dbAnalysisStore as $action) {
-                       $id = \TYPO3\CMS\Backend\Utility\BackendUtility::wsMapId($action[4], \TYPO3\CMS\Core\Utility\MathUtility::canBeInterpretedAsInteger($action[2]) ? $action[2] : $this->substNEWwithIDs[$action[2]]);
+                       $id = BackendUtility::wsMapId($action[4], \TYPO3\CMS\Core\Utility\MathUtility::canBeInterpretedAsInteger($action[2]) ? $action[2] : $this->substNEWwithIDs[$action[2]]);
                        if ($id) {
                                $action[0]->writeMM($action[1], $id, $action[3]);
                        }
@@ -6295,7 +6298,7 @@ class DataHandler {
                        $newData = array();
                        foreach ($GLOBALS['TCA'][$table]['columns'] as $field => $conf) {
                                if ($conf['config']['type'] == 'input') {
-                                       $evalCodesArray = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $conf['config']['eval'], 1);
+                                       $evalCodesArray = GeneralUtility::trimExplode(',', $conf['config']['eval'], 1);
                                        if (in_array('uniqueInPid', $evalCodesArray)) {
                                                $newV = $this->getUnique($table, $field, $curData[$field], $uid, $curData['pid']);
                                                if (strcmp($newV, $curData[$field])) {
@@ -6326,7 +6329,7 @@ class DataHandler {
        public function fixCopyAfterDuplFields($table, $uid, $prevUid, $update, $newData = array()) {
                if ($GLOBALS['TCA'][$table] && $GLOBALS['TCA'][$table]['ctrl']['copyAfterDuplFields']) {
                        $prevData = $this->recordInfo($table, $prevUid, '*');
-                       $theFields = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $GLOBALS['TCA'][$table]['ctrl']['copyAfterDuplFields'], 1);
+                       $theFields = GeneralUtility::trimExplode(',', $GLOBALS['TCA'][$table]['ctrl']['copyAfterDuplFields'], 1);
                        foreach ($theFields as $field) {
                                if ($GLOBALS['TCA'][$table]['columns'][$field] && ($update || !isset($newData[$field]))) {
                                        $newData[$field] = $prevData[$field];
@@ -6371,7 +6374,7 @@ class DataHandler {
                if ($GLOBALS['TCA'][$table]['columns']) {
                        foreach ($GLOBALS['TCA'][$table]['columns'] as $field => $configArr) {
                                if ($configArr['config']['type'] === 'input') {
-                                       $evalCodesArray = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $configArr['config']['eval'], 1);
+                                       $evalCodesArray = GeneralUtility::trimExplode(',', $configArr['config']['eval'], 1);
                                        if (in_array('uniqueInPid', $evalCodesArray) || in_array('unique', $evalCodesArray)) {
                                                $listArr[] = $field;
                                        }
@@ -6481,7 +6484,7 @@ class DataHandler {
                        // Offline uids will be used when a page is versionized as "branch" so this is when we
                        // must correct - otherwise a pid of "-1" and a wrong sort-row number
                        // is returned which we don't want.
-                       if ($lookForLiveVersion = \TYPO3\CMS\Backend\Utility\BackendUtility::getLiveVersionOfRecord($table, abs($pid), 'pid')) {
+                       if ($lookForLiveVersion = BackendUtility::getLiveVersionOfRecord($table, abs($pid), 'pid')) {
                                $row = $lookForLiveVersion;
                        }
                        $pid = intval($row['pid']);
@@ -6545,7 +6548,7 @@ class DataHandler {
                $inList = trim($this->rmComma(trim($inList)));
                if ($inList && !$this->admin) {
                        foreach (array_keys($GLOBALS['TCA']) as $table) {
-                               $count = $GLOBALS['TYPO3_DB']->exec_SELECTcountRows('uid', $table, 'pid IN (' . $inList . ')' . \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause($table));
+                               $count = $GLOBALS['TYPO3_DB']->exec_SELECTcountRows('uid', $table, 'pid IN (' . $inList . ')' . BackendUtility::deleteClause($table));
                                if ($count && ($this->tableReadOnly($table) || !$this->checkModifyAccessList($table))) {
                                        return FALSE;
                                }
@@ -6592,7 +6595,7 @@ class DataHandler {
                $pageUid = 0;
                if (is_array($GLOBALS['TCA'][$table]) && $uid > 0) {
                        // Get Page TSconfig relavant:
-                       list($tscPID) = \TYPO3\CMS\Backend\Utility\BackendUtility::getTSCpid($table, $uid, '');
+                       list($tscPID) = BackendUtility::getTSCpid($table, $uid, '');
                        $TSConfig = $this->getTCEMAIN_TSconfig($tscPID);
                        if (!$TSConfig['clearCache_disable']) {
                                // If table is "pages":
@@ -6656,7 +6659,7 @@ class DataHandler {
                        }
                        // Clear cache for pages entered in TSconfig:
                        if ($TSConfig['clearCacheCmd']) {
-                               $Commands = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $TSConfig['clearCacheCmd'], 1);
+                               $Commands = GeneralUtility::trimExplode(',', $TSConfig['clearCacheCmd'], 1);
                                $Commands = array_unique($Commands);
                                foreach ($Commands as $cmdPart) {
                                        $this->clear_cacheCmd($cmdPart);
@@ -6691,7 +6694,7 @@ class DataHandler {
         * Can call a list of post processing functions as defined in
         * $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['clearCachePostProc']
         * (numeric array with values being the function references, called by
-        * \TYPO3\CMS\Core\Utility\GeneralUtility::callUserFunction()).
+        * GeneralUtility::callUserFunction()).
         *
         * Note: The following cache_* are intentionally not cleared by
         * $cacheCmd='all':
@@ -6869,9 +6872,9 @@ class DataHandler {
                while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res_log)) {
                        $log_data = unserialize($row['log_data']);
                        $msg = $row['error'] . ': ' . sprintf($row['details'], $log_data[0], $log_data[1], $log_data[2], $log_data[3], $log_data[4]);
-                       $flashMessage = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessage', htmlspecialchars($msg), '', \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR, TRUE);
+                       $flashMessage = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessage', htmlspecialchars($msg), '', \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR, TRUE);
                        /** @var $flashMessageService \TYPO3\CMS\Core\Messaging\FlashMessageService */
-                       $flashMessageService = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessageService');
+                       $flashMessageService = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessageService');
                        /** @var $defaultFlashMessageQueue \TYPO3\CMS\Core\Messaging\FlashMessageQueue */
                        $defaultFlashMessageQueue = $flashMessageService->getMessageQueueByIdentifier();
                        $defaultFlashMessageQueue->enqueue($flashMessage);
@@ -7088,7 +7091,7 @@ class DataHandler {
         * @return array
         */
        protected function unsetElementsToBeDeleted(array $elements) {
-               $elements = \TYPO3\CMS\Core\Utility\GeneralUtility::arrayDiffAssocRecursive($elements, $this->getCommandMapElements('delete'));
+               $elements = GeneralUtility::arrayDiffAssocRecursive($elements, $this->getCommandMapElements('delete'));
                foreach ($elements as $key => $value) {
                        if (empty($value)) {
                                unset($elements[$key]);
index 16f9586..9c7801f 100644 (file)
@@ -26,6 +26,10 @@ namespace TYPO3\CMS\Core\Database;
  *
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
+
+use TYPO3\CMS\Core\Utility\GeneralUtility;
+use TYPO3\CMS\Backend\Utility\BackendUtility;
+
 /**
  * Class used in module tools/dbint (advanced search) and which may hold code specific for that module
  * However the class has a general principle in it which may be used in the web/export module.
@@ -185,12 +189,12 @@ class QueryView {
                        // Show query
                        if ($saveArr['queryTable']) {
                                /** @var \TYPO3\CMS\Core\Database\QueryGenerator */
-                               $qGen = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Database\\QueryGenerator');
+                               $qGen = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Database\\QueryGenerator');
                                $qGen->init('queryConfig', $saveArr['queryTable']);
                                $qGen->makeSelectorTable($saveArr);
                                $qGen->enablePrefix = 1;
                                $qString = $qGen->getQuery($qGen->queryConfig);
-                               $qCount = $GLOBALS['TYPO3_DB']->SELECTquery('count(*)', $qGen->table, $qString . \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause($qGen->table));
+                               $qCount = $GLOBALS['TYPO3_DB']->SELECTquery('count(*)', $qGen->table, $qString . BackendUtility::deleteClause($qGen->table));
                                $qSelect = $qGen->getSelectQuery($qString);
                                $res = @$GLOBALS['TYPO3_DB']->sql_query($qCount);
                                if (!$GLOBALS['TYPO3_DB']->sql_error()) {
@@ -238,7 +242,7 @@ class QueryView {
        public function procesStoreControl() {
                $storeArray = $this->initStoreArray();
                $storeQueryConfigs = unserialize($GLOBALS['SOBE']->MOD_SETTINGS['storeQueryConfigs']);
-               $storeControl = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('storeControl');
+               $storeControl = GeneralUtility::_GP('storeControl');
                $storeIndex = intval($storeControl['STORE']);
                $saveStoreArray = 0;
                $writeArray = array();
@@ -248,9 +252,9 @@ class QueryView {
                                if ($storeIndex > 0) {
                                        $writeArray = $this->loadStoreQueryConfigs($storeQueryConfigs, $storeIndex, $writeArray);
                                        $saveStoreArray = 1;
-                                       $flashMessage = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessage', sprintf($GLOBALS['LANG']->getLL('query_loaded'), htmlspecialchars($storeArray[$storeIndex])));
+                                       $flashMessage = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessage', sprintf($GLOBALS['LANG']->getLL('query_loaded'), htmlspecialchars($storeArray[$storeIndex])));
                                } elseif ($storeIndex < 0 && \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('sys_action')) {
-                                       $actionRecord = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecord('sys_action', abs($storeIndex));
+                                       $actionRecord = BackendUtility::getRecord('sys_action', abs($storeIndex));
                                        if (is_array($actionRecord)) {
                                                $dA = unserialize($actionRecord['t2_data']);
                                                $dbSC = array();
@@ -259,16 +263,16 @@ class QueryView {
                                                }
                                                $writeArray = $this->loadStoreQueryConfigs($dbSC, '0', $writeArray);
                                                $saveStoreArray = 1;
-                                               $flashMessage = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessage', sprintf($GLOBALS['LANG']->getLL('query_from_action_loaded'), htmlspecialchars($actionRecord['title'])));
+                                               $flashMessage = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessage', sprintf($GLOBALS['LANG']->getLL('query_from_action_loaded'), htmlspecialchars($actionRecord['title'])));
                                        }
                                }
                        } elseif ($storeControl['SAVE']) {
                                if ($storeIndex < 0) {
                                        $qOK = $this->saveQueryInAction(abs($storeIndex));
                                        if ($qOK) {
-                                               $flashMessage = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessage', $GLOBALS['LANG']->getLL('query_saved'));
+                                               $flashMessage = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessage', $GLOBALS['LANG']->getLL('query_saved'));
                                        } else {
-                                               $flashMessage = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessage', $GLOBALS['LANG']->getLL('query_notsaved'), '', \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR);
+                                               $flashMessage = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessage', $GLOBALS['LANG']->getLL('query_notsaved'), '', \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR);
                                        }
                                } else {
                                        if (trim($storeControl['title'])) {
@@ -281,12 +285,12 @@ class QueryView {
                                                }
                                                $storeQueryConfigs = $this->addToStoreQueryConfigs($storeQueryConfigs, $storeIndex);
                                                $saveStoreArray = 1;
-                                               $flashMessage = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessage', $GLOBALS['LANG']->getLL('query_saved'));
+                                               $flashMessage = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessage', $GLOBALS['LANG']->getLL('query_saved'));
                                        }
                                }
                        } elseif ($storeControl['REMOVE']) {
                                if ($storeIndex > 0) {
-                                       $flashMessage = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessage', sprintf($GLOBALS['LANG']->getLL('query_removed'), htmlspecialchars($storeArray[$storeControl['STORE']])));
+                                       $flashMessage = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessage', sprintf($GLOBALS['LANG']->getLL('query_removed'), htmlspecialchars($storeArray[$storeControl['STORE']])));
                                        // Removing
                                        unset($storeArray[$storeControl['STORE']]);
                                        $saveStoreArray = 1;
@@ -301,7 +305,7 @@ class QueryView {
                        unset($storeArray[0]);
                        $writeArray['storeArray'] = serialize($storeArray);
                        $writeArray['storeQueryConfigs'] = serialize($this->cleanStoreQueryConfigs($storeQueryConfigs, $storeArray));
-                       $GLOBALS['SOBE']->MOD_SETTINGS = \TYPO3\CMS\Backend\Utility\BackendUtility::getModuleData($GLOBALS['SOBE']->MOD_MENU, $writeArray, $GLOBALS['SOBE']->MCONF['name'], 'ses');
+                       $GLOBALS['SOBE']->MOD_SETTINGS = BackendUtility::getModuleData($GLOBALS['SOBE']->MOD_MENU, $writeArray, $GLOBALS['SOBE']->MCONF['name'], 'ses');
                }
                return $msg;
        }
@@ -326,7 +330,7 @@ class QueryView {
                        $output .= $GLOBALS['SOBE']->doc->spacer(20);
                }
                // Query Maker:
-               $qGen = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Database\\QueryGenerator');
+               $qGen = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Database\\QueryGenerator');
                $qGen->init('queryConfig', $GLOBALS['SOBE']->MOD_SETTINGS['queryTable']);
                if ($this->formName) {
                        $qGen->setFormName($this->formName);
@@ -342,7 +346,7 @@ class QueryView {
                                $qString = $qGen->getQuery($qGen->queryConfig);
                                switch ($mQ) {
                                        case 'count':
-                                               $qExplain = $GLOBALS['TYPO3_DB']->SELECTquery('count(*)', $qGen->table, $qString . \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause($qGen->table));
+                                               $qExplain = $GLOBALS['TYPO3_DB']->SELECTquery('count(*)', $qGen->table, $qString . BackendUtility::deleteClause($qGen->table));
                                                break;
                                        default:
                                                $qExplain = $qGen->getSelectQuery($qString);
@@ -393,7 +397,7 @@ class QueryView {
                                }
                                if (is_array($this->hookArray['beforeResultTable'])) {
                                        foreach ($this->hookArray['beforeResultTable'] as $_funcRef) {
-                                               $out .= \TYPO3\CMS\Core\Utility\GeneralUtility::callUserFunction($_funcRef, $GLOBALS['SOBE']->MOD_SETTINGS, $this);
+                                               $out .= GeneralUtility::callUserFunction($_funcRef, $GLOBALS['SOBE']->MOD_SETTINGS, $this);
                                        }
                                }
                                if (count($rowArr)) {
@@ -416,12 +420,12 @@ class QueryView {
                                        $rowArr[] = $this->csvValues($row, ',', '"', $GLOBALS['TCA'][$table], $table);
                                }
                                if (count($rowArr)) {
-                                       $out .= '<textarea name="whatever" rows="20" wrap="off"' . $GLOBALS['SOBE']->doc->formWidthText($this->formW, '', 'off') . ' class="fixed-font">' . \TYPO3\CMS\Core\Utility\GeneralUtility::formatForTextarea(implode(LF, $rowArr)) . '</textarea>';
+                                       $out .= '<textarea name="whatever" rows="20" wrap="off"' . $GLOBALS['SOBE']->doc->formWidthText($this->formW, '', 'off') . ' class="fixed-font">' . GeneralUtility::formatForTextarea(implode(LF, $rowArr)) . '</textarea>';
                                        if (!$this->noDownloadB) {
                                                $out .= '<BR><input type="submit" name="download_file" value="Click to download file" onClick="window.location.href=\'' . $this->downloadScript . '\';">';
                                        }
                                        // Downloads file:
-                                       if (\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('download_file')) {
+                                       if (GeneralUtility::_GP('download_file')) {
                                                $filename = 'TYPO3_' . $table . '_export_' . date('dmy-Hi') . '.csv';
                                                $mimeType = 'application/octet-stream';
                                                header('Content-Type: ' . $mimeType);
@@ -466,7 +470,7 @@ class QueryView {
                                $valueArray[$key] = $this->getProcessedValueExtra($table, $key, $val, $conf, ';');
                        }
                }
-               return \TYPO3\CMS\Core\Utility\GeneralUtility::csvValues($valueArray, $delim, $quote);
+               return GeneralUtility::csvValues($valueArray, $delim, $quote);
        }
 
        /**
@@ -504,7 +508,7 @@ class QueryView {
                                // Get query
                                $qp = $GLOBALS['TYPO3_DB']->searchQuery(array($swords), $list, $table);
                                // Count:
-                               $count = $GLOBALS['TYPO3_DB']->exec_SELECTcountRows('*', $table, $qp . \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause($table));
+                               $count = $GLOBALS['TYPO3_DB']->exec_SELECTcountRows('*', $table, $qp . BackendUtility::deleteClause($table));
                                if ($count || $showAlways) {
                                        // Output header:
                                        $out .= '<strong>TABLE:</strong> ' . $GLOBALS['LANG']->sL($conf['ctrl']['title']) . '<BR>';
@@ -512,7 +516,7 @@ class QueryView {
                                        // Show to limit
                                        if ($count) {
                                                $rowArr = array();
-                                               $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('uid,' . $conf['ctrl']['label'], $table, $qp . \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause($table), '', '', $limit);
+                                               $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('uid,' . $conf['ctrl']['label'], $table, $qp . BackendUtility::deleteClause($table), '', '', $limit);
                                                while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
                                                        $rowArr[] = $this->resultRowDisplay($row, $conf, $table);
                                                        $lrow = $row;
@@ -538,12 +542,12 @@ class QueryView {
         */
        public function resultRowDisplay($row, $conf, $table) {
                static $even = FALSE;
-               $tce = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\DataHandling\\DataHandler');
+               $tce = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\DataHandling\\DataHandler');
                $SET = $GLOBALS['SOBE']->MOD_SETTINGS;
                $out = '<tr class="bgColor' . ($even ? '6' : '4') . '">';
                $even = !$even;
                foreach ($row as $fN => $fV) {
-                       if (\TYPO3\CMS\Core\Utility\GeneralUtility::inList($SET['queryFields'], $fN) || !$SET['queryFields'] && $fN != 'pid' && $fN != 'deleted') {
+                       if (GeneralUtility::inList($SET['queryFields'], $fN) || !$SET['queryFields'] && $fN != 'pid' && $fN != 'deleted') {
                                if ($SET['search_result_labels']) {
                                        $fVnew = $this->getProcessedValueExtra($table, $fN, $fV, $conf, '<br />');
                                } else {
@@ -556,26 +560,26 @@ class QueryView {
                $out .= '<td nowrap>';
                if (!$row['deleted']) {
                        $out .= '<a href="#" onClick="top.launchView(\'' . $table . '\',' . $row['uid'] . ',\'' . $GLOBALS['BACK_PATH'] . '\');return false;">' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('status-dialog-information') . '</a>';
-                       $out .= '<a href="#" onClick="' . \TYPO3\CMS\Backend\Utility\BackendUtility::editOnClick($params, $GLOBALS['BACK_PATH'], (\TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('REQUEST_URI') . \TYPO3\CMS\Core\Utility\GeneralUtility::implodeArrayForUrl('SET', (array) \TYPO3\CMS\Core\Utility\GeneralUtility::_POST('SET')))) . '">' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-document-open') . '</a>';
+                       $out .= '<a href="#" onClick="' . BackendUtility::editOnClick($params, $GLOBALS['BACK_PATH'], (GeneralUtility::getIndpEnv('REQUEST_URI') . GeneralUtility::implodeArrayForUrl('SET', (array) GeneralUtility::_POST('SET')))) . '">' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-document-open') . '</a>';
                } else {
-                       $out .= '<a href="' . \TYPO3\CMS\Core\Utility\GeneralUtility::linkThisUrl(($GLOBALS['BACK_PATH'] . 'tce_db.php'), array(
+                       $out .= '<a href="' . GeneralUtility::linkThisUrl(($GLOBALS['BACK_PATH'] . 'tce_db.php'), array(
                                ('cmd[' . $table . '][' . $row['uid'] . '][undelete]') => '1',
-                               'redirect' => \TYPO3\CMS\Core\Utility\GeneralUtility::linkThisScript(array())
-                       )) . \TYPO3\CMS\Backend\Utility\BackendUtility::getUrlToken('tceAction') . '">';
+                               'redirect' => GeneralUtility::linkThisScript(array())
+                       )) . BackendUtility::getUrlToken('tceAction') . '">';
                        $out .= \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-edit-restore', array('title' => 'undelete only')) . '</a>';
-                       $out .= '<a href="' . \TYPO3\CMS\Core\Utility\GeneralUtility::linkThisUrl(($GLOBALS['BACK_PATH'] . 'tce_db.php'), array(
+                       $out .= '<a href="' . GeneralUtility::linkThisUrl(($GLOBALS['BACK_PATH'] . 'tce_db.php'), array(
                                ('cmd[' . $table . '][' . $row['uid'] . '][undelete]') => '1',
-                               'redirect' => \TYPO3\CMS\Core\Utility\GeneralUtility::linkThisUrl('alt_doc.php', array(
+                               'redirect' => GeneralUtility::linkThisUrl('alt_doc.php', array(
                                        ('edit[' . $table . '][' . $row['uid'] . ']') => 'edit',
-                                       'returnUrl' => \TYPO3\CMS\Core\Utility\GeneralUtility::linkThisScript(array())
+                                       'returnUrl' => GeneralUtility::linkThisScript(array())
                                ))
-                       )) . \TYPO3\CMS\Backend\Utility\BackendUtility::getUrlToken('tceAction') . '">';
+                       )) . BackendUtility::getUrlToken('tceAction') . '">';
                        $out .= \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-edit-restore-edit', array('title' => 'undelete and edit')) . '</a>';
                }
                $_params = array($table => $row);
                if (is_array($this->hookArray['additionalButtons'])) {
                        foreach ($this->hookArray['additionalButtons'] as $_funcRef) {
-                               $out .= \TYPO3\CMS\Core\Utility\GeneralUtility::callUserFunction($_funcRef, $_params, $this);
+                               $out .= GeneralUtility::callUserFunction($_funcRef, $_params, $this);
                        }
                }
                $out .= '</td>
@@ -727,7 +731,7 @@ class QueryView {
                        $theList = '';
                }
                if ($id && $depth > 0) {
-                       $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('uid', 'pages', 'pid=' . $id . ' ' . \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause('pages') . ' AND ' . $perms_clause);
+                       $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('uid', 'pages', 'pid=' . $id . ' ' . BackendUtility::deleteClause('pages') . ' AND ' . $perms_clause);
                        while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
                                if ($begin <= 0) {
                                        $theList .= ',' . $row['uid'];
@@ -766,7 +770,7 @@ class QueryView {
                        $d->close();
                        natcasesort($fileArray);
                        while (list(, $fileName) = each($fileArray)) {
-                               if (\TYPO3\CMS\Core\Utility\GeneralUtility::inList($fV, $fileName) || $fV == $fileName) {
+                               if (GeneralUtility::inList($fV, $fileName) || $fV == $fileName) {
                                        if (!$out) {
                                                $out = htmlspecialchars($fileName);
                                        } else {
@@ -782,7 +786,7 @@ class QueryView {
                                } else {
                                        $value = $val[0];
                                }
-                               if (\TYPO3\CMS\Core\Utility\GeneralUtility::inList($fV, $val[1]) || $fV == $val[1]) {
+                               if (GeneralUtility::inList($fV, $val[1]) || $fV == $val[1]) {
                                        if (!$out) {
                                                $out = htmlspecialchars($value);
                                        } else {
@@ -813,7 +817,7 @@ class QueryView {
                                        } else {
                                                $value = $val[0];
                                        }
-                                       if (\TYPO3\CMS\Core\Utility\GeneralUtility::inList($fV, $value) || $fV == $value) {
+                                       if (GeneralUtility::inList($fV, $value) || $fV == $value) {
                                                if (!$out) {
                                                        $out = htmlspecialchars($value);
                                                } else {
@@ -826,7 +830,7 @@ class QueryView {
                                $from_table_Arr = explode(',', $fieldSetup['allowed']);
                                $useTablePrefix = 1;
                                if (!$fieldSetup['prepend_tname']) {
-                                       $checkres = $GLOBALS['TYPO3_DB']->exec_SELECTquery($fN, $table, 'uid ' . \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause($table), ($groupBy = ''), ($orderBy = ''), ($limit = ''));
+                                       $checkres = $GLOBALS['TYPO3_DB']->exec_SELECTquery($fN, $table, 'uid ' . BackendUtility::deleteClause($table), ($groupBy = ''), ($orderBy = ''), ($limit = ''));
                                        if ($checkres) {
                                                while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($checkres)) {
                                                        if (stristr($row[$fN], ',')) {
@@ -897,12 +901,12 @@ class QueryView {
                                                        $webMountPageTree .= $webMountPageTreePrefix . $this->getTreeList($val, 999, ($begin = 0), $perms_clause);
                                                }
                                                if ($from_table == 'pages') {