[CLEANUP] Remove unnecessary fully qualified names 88/33588/3
authorFrank Nägler <typo3@naegler.net>
Mon, 27 Oct 2014 21:15:21 +0000 (22:15 +0100)
committerMarkus Klein <klein.t3@reelworx.at>
Tue, 28 Oct 2014 15:40:10 +0000 (16:40 +0100)
Remove unnecessary fully qualified names from Utility classes.

Resolves: #62505
Releases: master
Change-Id: I3d4af98670911b3b49bd8043136c92422925cd2a
Reviewed-on: http://review.typo3.org/33588
Reviewed-by: Stefan Froemken <froemken@gmail.com>
Tested-by: Stefan Froemken <froemken@gmail.com>
Reviewed-by: Markus Klein <klein.t3@reelworx.at>
Tested-by: Markus Klein <klein.t3@reelworx.at>
14 files changed:
typo3/sysext/core/Classes/Utility/ArrayUtility.php
typo3/sysext/core/Classes/Utility/ClientUtility.php
typo3/sysext/core/Classes/Utility/CommandUtility.php
typo3/sysext/core/Classes/Utility/DebugUtility.php
typo3/sysext/core/Classes/Utility/DiffUtility.php
typo3/sysext/core/Classes/Utility/ExtensionManagementUtility.php
typo3/sysext/core/Classes/Utility/File/ExtendedFileUtility.php
typo3/sysext/core/Classes/Utility/File/ExtendedFileUtilityProcessDataHookInterface.php
typo3/sysext/core/Classes/Utility/GeneralUtility.php
typo3/sysext/core/Classes/Utility/HttpUtility.php
typo3/sysext/core/Classes/Utility/MonitorUtility.php
typo3/sysext/core/Classes/Utility/PathUtility.php
typo3/sysext/core/Classes/Utility/RootlineUtility.php
typo3/sysext/core/Classes/Utility/VersionNumberUtility.php

index a523309..b809ea1 100644 (file)
@@ -62,7 +62,7 @@ class ArrayUtility {
                        if ($value === $needle) {
                                ($resultArray[$key] = $value);
                        } elseif (is_array($value)) {
-                               ($subArrayMatches = \TYPO3\CMS\Core\Utility\ArrayUtility::filterByValueRecursive($needle, $value));
+                               ($subArrayMatches = static::filterByValueRecursive($needle, $value));
                                if (count($subArrayMatches) > 0) {
                                        ($resultArray[$key] = $subArrayMatches);
                                }
index 06ecd7b..fbe98fb 100644 (file)
@@ -39,7 +39,7 @@ class ClientUtility {
                                // need reference for third parameter in \TYPO3\CMS\Core\Utility\GeneralUtility::callUserFunction,
                                // so create a reference to NULL
                                $null = NULL;
-                               $hookResult = \TYPO3\CMS\Core\Utility\GeneralUtility::callUserFunction($hookFunction, $hookParameters, $null);
+                               $hookResult = GeneralUtility::callUserFunction($hookFunction, $hookParameters, $null);
                                if ($returnResult && is_array($hookResult) && count($hookResult)) {
                                        return $hookResult;
                                }
index 6fedc18..c8dcbb1 100644 (file)
@@ -101,7 +101,7 @@ class CommandUtility {
                if (!$path) {
                        $path = $gfxConf['im_path'];
                }
-               $path = \TYPO3\CMS\Core\Utility\GeneralUtility::fixWindowsFilePath($path);
+               $path = GeneralUtility::fixWindowsFilePath($path);
                $im_version = strtolower($gfxConf['im_version_5']);
                // This is only used internally, has no effect outside
                if ($command === 'combine') {
@@ -132,7 +132,7 @@ class CommandUtility {
                // Because of some weird incompatibilities between ImageMagick 4 and 6 (plus GraphicsMagick),
                // it is needed to change the parameters order under some preconditions
                if ($command == 'composite' && $switchCompositeParameters) {
-                       $paramsArr = \TYPO3\CMS\Core\Utility\GeneralUtility::unQuoteFilenames($parameters);
+                       $paramsArr = GeneralUtility::unQuoteFilenames($parameters);
                        // The mask image has been specified => swap the parameters
                        if (count($paramsArr) > 5) {
                                $tmp = $paramsArr[count($paramsArr) - 3];
index 8b7214d..7cef61f 100644 (file)
@@ -89,7 +89,7 @@ class DebugUtility {
                                        });
                                })();
                        ';
-                       echo \TYPO3\CMS\Core\Utility\GeneralUtility::wrapJS($script);
+                       echo GeneralUtility::wrapJS($script);
                } else {
                        echo $debug;
                }
@@ -161,7 +161,7 @@ class DebugUtility {
                                }
                        })();
                ';
-               echo \TYPO3\CMS\Core\Utility\GeneralUtility::wrapJS($script);
+               echo GeneralUtility::wrapJS($script);
        }
 
        /**
@@ -178,7 +178,7 @@ class DebugUtility {
                        $pathFragment = $dat['class'] . $dat['type'] . $dat['function'];
                        // add the path of the included file
                        if (in_array($dat['function'], array('require', 'include', 'require_once', 'include_once'))) {
-                               $pathFragment .= '(' . \TYPO3\CMS\Core\Utility\PathUtility::stripPathSitePrefix($dat['args'][0]) . '),' . \TYPO3\CMS\Core\Utility\PathUtility::stripPathSitePrefix($dat['file']);
+                               $pathFragment .= '(' . PathUtility::stripPathSitePrefix($dat['args'][0]) . '),' . PathUtility::stripPathSitePrefix($dat['file']);
                        }
                        $path[] = $pathFragment . '#' . $dat['line'];
                }
index 3d73f5a..893f22d 100644 (file)
@@ -130,15 +130,15 @@ class DiffUtility {
         */
        public function getDiff($str1, $str2) {
                // Create file 1 and write string
-               $file1 = \TYPO3\CMS\Core\Utility\GeneralUtility::tempnam('diff1_');
-               \TYPO3\CMS\Core\Utility\GeneralUtility::writeFile($file1, $str1);
+               $file1 = GeneralUtility::tempnam('diff1_');
+               GeneralUtility::writeFile($file1, $str1);
                // Create file 2 and write string
-               $file2 = \TYPO3\CMS\Core\Utility\GeneralUtility::tempnam('diff2_');
-               \TYPO3\CMS\Core\Utility\GeneralUtility::writeFile($file2, $str2);
+               $file2 = GeneralUtility::tempnam('diff2_');
+               GeneralUtility::writeFile($file2, $str2);
                // Perform diff.
                $cmd = $GLOBALS['TYPO3_CONF_VARS']['BE']['diff_path'] . ' ' . $this->diffOptions . ' ' . $file1 . ' ' . $file2;
                $res = array();
-               \TYPO3\CMS\Core\Utility\CommandUtility::exec($cmd, $res);
+               CommandUtility::exec($cmd, $res);
                unlink($file1);
                unlink($file2);
                return $res;
@@ -154,7 +154,7 @@ class DiffUtility {
         */
        public function addClearBuffer($clearBuffer, $last = 0) {
                if (strlen($clearBuffer) > 200) {
-                       $clearBuffer = ($this->clearBufferIdx ? \TYPO3\CMS\Core\Utility\GeneralUtility::fixed_lgd_cs($clearBuffer, 70) : '') . '[' . strlen($clearBuffer) . ']' . (!$last ? \TYPO3\CMS\Core\Utility\GeneralUtility::fixed_lgd_cs($clearBuffer, -70) : '');
+                       $clearBuffer = ($this->clearBufferIdx ? GeneralUtility::fixed_lgd_cs($clearBuffer, 70) : '') . '[' . strlen($clearBuffer) . ']' . (!$last ? GeneralUtility::fixed_lgd_cs($clearBuffer, -70) : '');
                }
                $this->clearBufferIdx++;
                return $clearBuffer;
@@ -169,10 +169,10 @@ class DiffUtility {
         * @access private
         */
        public function explodeStringIntoWords($str) {
-               $strArr = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(LF, $str);
+               $strArr = GeneralUtility::trimExplode(LF, $str);
                $outArray = array();
                foreach ($strArr as $lineOfWords) {
-                       $allWords = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(' ', $lineOfWords, TRUE);
+                       $allWords = GeneralUtility::trimExplode(' ', $lineOfWords, TRUE);
                        $outArray[] = $allWords;
                        $outArray[] = array('');
                        $outArray[] = array('');
index 0693c1a..a497df9 100644 (file)
@@ -13,6 +13,8 @@ namespace TYPO3\CMS\Core\Utility;
  *
  * The TYPO3 project - inspiring people to share!
  */
+use TYPO3\CMS\Core\Category\CategoryRegistry;
+use TYPO3\CMS\Core\Package\PackageManager;
 
 /**
  * Extension Management functions
@@ -50,7 +52,7 @@ class ExtensionManagementUtility {
         * @param \TYPO3\CMS\Core\Package\PackageManager $packageManager
         * @internal
         */
-       static public function setPackageManager(\TYPO3\CMS\Core\Package\PackageManager $packageManager) {
+       static public function setPackageManager(PackageManager $packageManager) {
                static::$packageManager = $packageManager;
        }
 
@@ -156,7 +158,7 @@ class ExtensionManagementUtility {
         * @return string
         */
        static public function siteRelPath($key) {
-               return \TYPO3\CMS\Core\Utility\PathUtility::stripPathSitePrefix(self::extPath($key));
+               return PathUtility::stripPathSitePrefix(self::extPath($key));
        }
 
        /**
@@ -460,7 +462,7 @@ class ExtensionManagementUtility {
                $GLOBALS['TCA'][$table]['columns'][$field]['config']['items'] = array_values($GLOBALS['TCA'][$table]['columns'][$field]['config']['items']);
                if (strlen($relativePosition) > 0) {
                        // Insert at specified position
-                       $matchedPosition = \TYPO3\CMS\Core\Utility\ArrayUtility::filterByValueRecursive($relativeToField, $GLOBALS['TCA'][$table]['columns'][$field]['config']['items']);
+                       $matchedPosition = ArrayUtility::filterByValueRecursive($relativeToField, $GLOBALS['TCA'][$table]['columns'][$field]['config']['items']);
                        if (count($matchedPosition) > 0) {
                                $relativeItemKey = key($matchedPosition);
                                if ($relativePosition === 'replace') {
@@ -549,7 +551,7 @@ class ExtensionManagementUtility {
                                'localizeChildrenAtParentLocalization' => TRUE,
                        ),
                );
-               \TYPO3\CMS\Core\Utility\ArrayUtility::mergeRecursiveWithOverrule($fileFieldTCAConfig, $customSettingOverride);
+               ArrayUtility::mergeRecursiveWithOverrule($fileFieldTCAConfig, $customSettingOverride);
                return $fileFieldTCAConfig;
        }
 
@@ -783,7 +785,7 @@ class ExtensionManagementUtility {
                if ($mainModuleName === 'web') {
                        $defaultModuleConfiguration['navigationComponentId'] = 'typo3-pagetree';
                }
-               \TYPO3\CMS\Core\Utility\ArrayUtility::mergeRecursiveWithOverrule($defaultModuleConfiguration, $moduleConfiguration);
+               ArrayUtility::mergeRecursiveWithOverrule($defaultModuleConfiguration, $moduleConfiguration);
                $moduleConfiguration = $defaultModuleConfiguration;
                if (strlen($subModuleName) > 0) {
                        $moduleSignature = $mainModuleName . '_' . $subModuleName;
@@ -1203,7 +1205,7 @@ class ExtensionManagementUtility {
                        $executables = GeneralUtility::trimExplode(',', $serviceDetails['exec'], TRUE);
                        foreach ($executables as $executable) {
                                // If at least one executable file is not available, exit early returning FALSE
-                               if (!\TYPO3\CMS\Core\Utility\CommandUtility::checkCommand($executable)) {
+                               if (!CommandUtility::checkCommand($executable)) {
                                        self::deactivateService($serviceType, $serviceKey);
                                        return FALSE;
                                }
@@ -1648,7 +1650,7 @@ tt_content.' . $key . $prefix . ' {
                }
 
                // Apply category stuff
-               \TYPO3\CMS\Core\Category\CategoryRegistry::getInstance()->applyTcaForPreRegisteredTables();
+               CategoryRegistry::getInstance()->applyTcaForPreRegisteredTables();
 
                // Execute override files from Configuration/TCA/Overrides
                foreach ($activePackages as $package) {
@@ -1953,7 +1955,7 @@ tt_content.' . $key . $prefix . ' {
         */
        static public function makeCategorizable($extensionKey, $tableName, $fieldName = 'categories', array $options = array()) {
                // Update the category registry
-               $result = \TYPO3\CMS\Core\Category\CategoryRegistry::getInstance()->add($extensionKey, $tableName, $fieldName, $options);
+               $result = CategoryRegistry::getInstance()->add($extensionKey, $tableName, $fieldName, $options);
                if ($result === FALSE) {
                        $message = '\TYPO3\CMS\Core\Category\CategoryRegistry: no category registered for table "%s". Key was already registered.';
                        /** @var $logger \TYPO3\CMS\Core\Log\Logger */
index add97d6..dbcfc54 100644 (file)
@@ -15,8 +15,15 @@ namespace TYPO3\CMS\Core\Utility\File;
  */
 
 use TYPO3\CMS\Backend\Utility\BackendUtility;
+use TYPO3\CMS\Backend\Utility\IconUtility;
+use TYPO3\CMS\Core\Messaging\FlashMessage;
 use TYPO3\CMS\Core\Resource\File;
+use TYPO3\CMS\Core\Resource\Folder;
+use TYPO3\CMS\Core\Resource\ResourceFactory;
+use TYPO3\CMS\Core\Resource\ResourceStorage;
+use TYPO3\CMS\Core\Utility\CommandUtility;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
+use TYPO3\CMS\Core\Utility\PathUtility;
 
 /**
  * Contains functions for performing file operations like copying, pasting, uploading, moving,
@@ -46,7 +53,7 @@ use TYPO3\CMS\Core\Utility\GeneralUtility;
  *
  * @author Kasper Skårhøj <kasperYYYY@typo3.com>
  */
-class ExtendedFileUtility extends \TYPO3\CMS\Core\Utility\File\BasicFileUtility {
+class ExtendedFileUtility extends BasicFileUtility {
 
        // External static variables:
        // Notice; some of these are overridden in the start() method with values from $GLOBALS['TYPO3_CONF_VARS']['BE']
@@ -142,7 +149,7 @@ class ExtendedFileUtility extends \TYPO3\CMS\Core\Utility\File\BasicFileUtility
                }
                $this->unzipPath = $unzipPath;
                // Initialize Object Factory
-               $this->fileFactory = \TYPO3\CMS\Core\Resource\ResourceFactory::getInstance();
+               $this->fileFactory = ResourceFactory::getInstance();
                // Initializing file processing commands:
                $this->fileCmdMap = $fileCmds;
        }
@@ -255,7 +262,7 @@ class ExtendedFileUtility extends \TYPO3\CMS\Core\Utility\File\BasicFileUtility
                                                if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_extfilefunc.php']['processData'])) {
                                                        foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_extfilefunc.php']['processData'] as $classRef) {
                                                                $hookObject = GeneralUtility::getUserObj($classRef);
-                                                               if (!$hookObject instanceof \TYPO3\CMS\Core\Utility\File\ExtendedFileUtilityProcessDataHookInterface) {
+                                                               if (!$hookObject instanceof ExtendedFileUtilityProcessDataHookInterface) {
                                                                        throw new \UnexpectedValueException('$hookObject must implement interface TYPO3\\CMS\\Core\\Utility\\File\\ExtendedFileUtilityProcessDataHookInterface', 1279719168);
                                                                }
                                                                $hookObject->processData_postProcessAction($action, $cmdArr, $result[$action], $this);
@@ -291,7 +298,7 @@ class ExtendedFileUtility extends \TYPO3\CMS\Core\Utility\File\BasicFileUtility
                                'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
                                $msg,
                                '',
-                               \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR,
+                               FlashMessage::ERROR,
                                TRUE
                        );
                        $this->addFlashMessage($flashMessage);
@@ -319,7 +326,7 @@ class ExtendedFileUtility extends \TYPO3\CMS\Core\Utility\File\BasicFileUtility
        public function findRecycler($theFile) {
                GeneralUtility::logDeprecatedFunction();
                if (GeneralUtility::validPathStr($theFile)) {
-                       $theFile = \TYPO3\CMS\Core\Utility\PathUtility::getCanonicalPath($theFile);
+                       $theFile = PathUtility::getCanonicalPath($theFile);
                        $fI = GeneralUtility::split_fileref($theFile);
                        $c = 0;
                        // !!! Method has been put in the storage, can be saftely removed
@@ -329,7 +336,7 @@ class ExtendedFileUtility extends \TYPO3\CMS\Core\Utility\File\BasicFileUtility
                                        return $rDir;
                                }
                                $theFile = $fI['path'];
-                               $theFile = \TYPO3\CMS\Core\Utility\PathUtility::getCanonicalPath($theFile);
+                               $theFile = PathUtility::getCanonicalPath($theFile);
                                $fI = GeneralUtility::split_fileref($theFile);
                                $c++;
                        }
@@ -396,7 +403,7 @@ class ExtendedFileUtility extends \TYPO3\CMS\Core\Utility\File\BasicFileUtility
                                                $row = $this->transformFileReferenceToRecordReference($fileReferenceRow);
                                        }
                                        $shortcutRecord = BackendUtility::getRecord($row['tablename'], $row['recuid']);
-                                       $icon = \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIconForRecord($row['tablename'], $shortcutRecord);
+                                       $icon = IconUtility::getSpriteIconForRecord($row['tablename'], $shortcutRecord);
                                        $onClick = 'Clickmenu.show("' . $row['tablename'] . '", "' . $row['recuid'] . '", "1", "+info,history,edit", "|", "");return false;';
                                        $shortcutContent[] = '<a href="#" oncontextmenu="this.click();return false;" onclick="' . htmlspecialchars($onClick) . '">' . $icon . '</a>' . htmlspecialchars((BackendUtility::getRecordTitle($row['tablename'], $shortcutRecord) . '  [' . BackendUtility::getRecordPath($shortcutRecord['pid'], '', 80) . ']'));
                                }
@@ -406,7 +413,7 @@ class ExtendedFileUtility extends \TYPO3\CMS\Core\Utility\File\BasicFileUtility
                                        '\\TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
                                        sprintf($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:message.description.fileNotDeletedHasReferences'), $fileObject->getName()) . '<br />' . implode('<br />', $shortcutContent),
                                        $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:message.header.fileNotDeletedHasReferences'),
-                                       \TYPO3\CMS\Core\Messaging\FlashMessage::WARNING,
+                                       FlashMessage::WARNING,
                                        TRUE
                                );
                                $this->addFlashMessage($flashMessage);
@@ -419,7 +426,7 @@ class ExtendedFileUtility extends \TYPO3\CMS\Core\Utility\File\BasicFileUtility
                                                '\\TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
                                                sprintf($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:message.description.fileDeleted'), $fileObject->getName()),
                                                $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:message.header.fileDeleted'),
-                                               \TYPO3\CMS\Core\Messaging\FlashMessage::OK,
+                                               FlashMessage::OK,
                                                TRUE
                                        );
                                        $this->addFlashMessage($flashMessage);
@@ -442,7 +449,7 @@ class ExtendedFileUtility extends \TYPO3\CMS\Core\Utility\File\BasicFileUtility
                                                '\\TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
                                                sprintf($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:message.description.folderNotDeletedHasFiles'), $fileObject->getName()),
                                                $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:message.header.folderNotDeletedHasFiles'),
-                                               \TYPO3\CMS\Core\Messaging\FlashMessage::WARNING,
+                                               FlashMessage::WARNING,
                                                TRUE
                                        );
                                        $this->addFlashMessage($flashMessage);
@@ -454,7 +461,7 @@ class ExtendedFileUtility extends \TYPO3\CMS\Core\Utility\File\BasicFileUtility
                                                '\\TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
                                                sprintf($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:message.description.folderDeleted'), $fileObject->getName()),
                                                $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:message.header.folderDeleted'),
-                                               \TYPO3\CMS\Core\Messaging\FlashMessage::OK,
+                                               FlashMessage::OK,
                                                TRUE
                                        );
                                        $this->addFlashMessage($flashMessage);
@@ -535,7 +542,7 @@ class ExtendedFileUtility extends \TYPO3\CMS\Core\Utility\File\BasicFileUtility
                /** @var $targetFolderObject \TYPO3\CMS\Core\Resource\Folder */
                $targetFolderObject = $this->getFileObject($cmds['target']);
                // Basic check
-               if (!$targetFolderObject instanceof \TYPO3\CMS\Core\Resource\Folder) {
+               if (!$targetFolderObject instanceof Folder) {
                        $this->writelog(2, 2, 100, 'Destination "%s" was not a directory', array($cmds['target']));
                        return FALSE;
                }
@@ -611,7 +618,7 @@ class ExtendedFileUtility extends \TYPO3\CMS\Core\Utility\File\BasicFileUtility
                $sourceFileObject = $this->getFileObject($cmds['data']);
                $targetFolderObject = $this->getFileObject($cmds['target']);
                // Basic check
-               if (!$targetFolderObject instanceof \TYPO3\CMS\Core\Resource\Folder) {
+               if (!$targetFolderObject instanceof Folder) {
                        $this->writelog(3, 2, 100, 'Destination "%s" was not a directory', array($cmds['target']));
                        return FALSE;
                }
@@ -740,7 +747,7 @@ class ExtendedFileUtility extends \TYPO3\CMS\Core\Utility\File\BasicFileUtility
                        return FALSE;
                }
                $targetFolderObject = $this->getFileObject($cmds['target']);
-               if (!$targetFolderObject instanceof \TYPO3\CMS\Core\Resource\Folder) {
+               if (!$targetFolderObject instanceof Folder) {
                        $this->writelog(6, 2, 104, 'Destination "%s" was not a directory', array($cmds['target']));
                        return FALSE;
                }
@@ -775,7 +782,7 @@ class ExtendedFileUtility extends \TYPO3\CMS\Core\Utility\File\BasicFileUtility
                        return FALSE;
                }
                $targetFolderObject = $this->getFileObject($cmds['target']);
-               if (!$targetFolderObject instanceof \TYPO3\CMS\Core\Resource\Folder) {
+               if (!$targetFolderObject instanceof Folder) {
                        $this->writelog(8, 2, 104, 'Destination "%s" was not a directory', array($cmds['target']));
                        return FALSE;
                }
@@ -910,7 +917,7 @@ class ExtendedFileUtility extends \TYPO3\CMS\Core\Utility\File\BasicFileUtility
                                }
                                /** @var $fileObject File */
                                $fileObject = $targetFolderObject->addUploadedFile($fileInfo, $conflictMode);
-                               $fileObject = \TYPO3\CMS\Core\Resource\ResourceFactory::getInstance()->getFileObjectByStorageAndIdentifier($targetFolderObject->getStorage()->getUid(), $fileObject->getIdentifier());
+                               $fileObject = ResourceFactory::getInstance()->getFileObjectByStorageAndIdentifier($targetFolderObject->getStorage()->getUid(), $fileObject->getIdentifier());
                                if ($conflictMode === 'replace') {
                                        $this->getIndexer($fileObject->getStorage())->updateIndexEntry($fileObject);
                                }
@@ -980,7 +987,7 @@ class ExtendedFileUtility extends \TYPO3\CMS\Core\Utility\File\BasicFileUtility
                if ($this->checkPathAgainstMounts($theFile) && $this->checkPathAgainstMounts($theDest . '/')) {
                        // No way to do this under windows.
                        $cmd = $this->unzipPath . 'unzip -qq ' . escapeshellarg($theFile) . ' -d ' . escapeshellarg($theDest);
-                       \TYPO3\CMS\Core\Utility\CommandUtility::exec($cmd);
+                       CommandUtility::exec($cmd);
                        $this->writelog(7, 0, 1, 'Unzipping file "%s" in "%s"', array($theFile, $theDest));
                        return TRUE;
                } else {
@@ -995,7 +1002,7 @@ class ExtendedFileUtility extends \TYPO3\CMS\Core\Utility\File\BasicFileUtility
         * @param \TYPO3\CMS\Core\Messaging\FlashMessage $flashMessage
         * @return void
         */
-       protected function addFlashMessage(\TYPO3\CMS\Core\Messaging\FlashMessage $flashMessage) {
+       protected function addFlashMessage(FlashMessage $flashMessage) {
                /** @var $flashMessageService \TYPO3\CMS\Core\Messaging\FlashMessageService */
                $flashMessageService = GeneralUtility::makeInstance(
                        'TYPO3\\CMS\\Core\\Messaging\\FlashMessageService'
@@ -1011,7 +1018,7 @@ class ExtendedFileUtility extends \TYPO3\CMS\Core\Utility\File\BasicFileUtility
         * @param \TYPO3\CMS\Core\Resource\ResourceStorage $storage
         * @return \TYPO3\CMS\Core\Resource\Index\Indexer
         */
-       protected function getIndexer(\TYPO3\CMS\Core\Resource\ResourceStorage $storage) {
+       protected function getIndexer(ResourceStorage $storage) {
                return GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Resource\\Index\\Indexer', $storage);
        }
 
index c391a79..698b5f6 100644 (file)
@@ -28,6 +28,6 @@ interface ExtendedFileUtilityProcessDataHookInterface {
         * @param \TYPO3\CMS\Core\Utility\File\ExtendedFileUtility $parentObject Parent object
         * @return void
         */
-       public function processData_postProcessAction($action, array $cmdArr, array $result, \TYPO3\CMS\Core\Utility\File\ExtendedFileUtility $parentObject);
+       public function processData_postProcessAction($action, array $cmdArr, array $result, ExtendedFileUtility $parentObject);
 
 }
index f7b5991..330fceb 100644 (file)
@@ -13,6 +13,10 @@ namespace TYPO3\CMS\Core\Utility;
  *
  * The TYPO3 project - inspiring people to share!
  */
+use TYPO3\CMS\Core\Core\ApplicationContext;
+use TYPO3\CMS\Core\Core\ClassLoader;
+use TYPO3\CMS\Core\SingletonInterface;
+use TYPO3\CMS\Frontend\Page\PageRepository;
 
 /**
  * The legendary "t3lib_div" class - Miscellaneous functions for general purpose.
@@ -285,7 +289,7 @@ class GeneralUtility {
                                // Rename could fail, if a simultaneous thread is currently working on the same thing
                                if (@rename($theFile, $temporaryName)) {
                                        $cmd = self::imageMagickCommand('convert', '"' . $temporaryName . '" "' . $theFile . '"', $gfxConf['im_path_lzw']);
-                                       \TYPO3\CMS\Core\Utility\CommandUtility::exec($cmd);
+                                       CommandUtility::exec($cmd);
                                        unlink($temporaryName);
                                }
                                $returnCode = 'IM';
@@ -318,7 +322,7 @@ class GeneralUtility {
                        // IM
                        $newFile = substr($theFile, 0, -4) . '.gif';
                        $cmd = self::imageMagickCommand('convert', '"' . $theFile . '" "' . $newFile . '"', $GLOBALS['TYPO3_CONF_VARS']['GFX']['im_path_lzw']);
-                       \TYPO3\CMS\Core\Utility\CommandUtility::exec($cmd);
+                       CommandUtility::exec($cmd);
                        $theFile = $newFile;
                        if (@is_file($newFile)) {
                                self::fixPermissions($newFile);
@@ -343,7 +347,7 @@ class GeneralUtility {
                        } else {
                                $newFile = PATH_site . 'typo3temp/readPG_' . md5(($theFile . '|' . filemtime($theFile))) . ($output_png ? '.png' : '.gif');
                                $cmd = self::imageMagickCommand('convert', '"' . $theFile . '" "' . $newFile . '"', $GLOBALS['TYPO3_CONF_VARS']['GFX']['im_path']);
-                               \TYPO3\CMS\Core\Utility\CommandUtility::exec($cmd);
+                               CommandUtility::exec($cmd);
                                if (@is_file($newFile)) {
                                        self::fixPermissions($newFile);
                                        return $newFile;
@@ -776,7 +780,7 @@ class GeneralUtility {
         */
        static public function compat_version($verNumberStr) {
                $currVersionStr = $GLOBALS['TYPO3_CONF_VARS']['SYS']['compat_version'] ? $GLOBALS['TYPO3_CONF_VARS']['SYS']['compat_version'] : TYPO3_branch;
-               if (\TYPO3\CMS\Core\Utility\VersionNumberUtility::convertVersionNumberToInteger($currVersionStr) < \TYPO3\CMS\Core\Utility\VersionNumberUtility::convertVersionNumberToInteger($verNumberStr)) {
+               if (VersionNumberUtility::convertVersionNumberToInteger($currVersionStr) < VersionNumberUtility::convertVersionNumberToInteger($verNumberStr)) {
                        return FALSE;
                } else {
                        return TRUE;
@@ -913,9 +917,9 @@ class GeneralUtility {
         */
        static public function modifyHTMLColor($color, $R, $G, $B) {
                // This takes a hex-color (# included!) and adds $R, $G and $B to the HTML-color (format: #xxxxxx) and returns the new color
-               $nR = \TYPO3\CMS\Core\Utility\MathUtility::forceIntegerInRange(hexdec(substr($color, 1, 2)) + $R, 0, 255);
-               $nG = \TYPO3\CMS\Core\Utility\MathUtility::forceIntegerInRange(hexdec(substr($color, 3, 2)) + $G, 0, 255);
-               $nB = \TYPO3\CMS\Core\Utility\MathUtility::forceIntegerInRange(hexdec(substr($color, 5, 2)) + $B, 0, 255);
+               $nR = MathUtility::forceIntegerInRange(hexdec(substr($color, 1, 2)) + $R, 0, 255);
+               $nG = MathUtility::forceIntegerInRange(hexdec(substr($color, 3, 2)) + $G, 0, 255);
+               $nB = MathUtility::forceIntegerInRange(hexdec(substr($color, 5, 2)) + $B, 0, 255);
                return '#' . substr(('0' . dechex($nR)), -2) . substr(('0' . dechex($nG)), -2) . substr(('0' . dechex($nB)), -2);
        }
 
@@ -2111,7 +2115,7 @@ class GeneralUtility {
                        if (isset($options['grandParentTagMap'][$stackData['grandParentTagName'] . '/' . $stackData['parentTagName']])) {
                                $attr .= ' index="' . htmlspecialchars($tagName) . '"';
                                $tagName = (string) $options['grandParentTagMap'][($stackData['grandParentTagName'] . '/' . $stackData['parentTagName'])];
-                       } elseif (isset($options['parentTagMap'][$stackData['parentTagName'] . ':_IS_NUM']) && \TYPO3\CMS\Core\Utility\MathUtility::canBeInterpretedAsInteger($tagName)) {
+                       } elseif (isset($options['parentTagMap'][$stackData['parentTagName'] . ':_IS_NUM']) && MathUtility::canBeInterpretedAsInteger($tagName)) {
                                // Use tag based on parent tag name + if current tag is numeric
                                $attr .= ' index="' . htmlspecialchars($tagName) . '"';
                                $tagName = (string) $options['parentTagMap'][($stackData['parentTagName'] . ':_IS_NUM')];
@@ -2214,10 +2218,10 @@ class GeneralUtility {
                        $array = $firstLevelCache[$identifier];
                } else {
                        // Look up in second level cache
-                       $array = \TYPO3\CMS\Frontend\Page\PageRepository::getHash($identifier, 0);
+                       $array = PageRepository::getHash($identifier, 0);
                        if (!is_array($array)) {
                                $array = self::xml2arrayProcess($string, $NSprefix, $reportDocTag);
-                               \TYPO3\CMS\Frontend\Page\PageRepository::storeHash($identifier, $array, 'ident_xml2array');
+                               PageRepository::storeHash($identifier, $array, 'ident_xml2array');
                        }
                        // Store content in first level cache
                        $firstLevelCache[$identifier] = $array;
@@ -3467,7 +3471,7 @@ Connection: close
                                break;
                        case 'TYPO3_SITE_URL':
                                if (defined('PATH_thisScript') && defined('PATH_site')) {
-                                       $lPath = \TYPO3\CMS\Core\Utility\PathUtility::stripPathSitePrefix(dirname(PATH_thisScript)) . '/';
+                                       $lPath = PathUtility::stripPathSitePrefix(dirname(PATH_thisScript)) . '/';
                                        $url = self::getIndpEnv('TYPO3_REQUEST_DIR');
                                        $siteUrl = substr($url, 0, -strlen($lPath));
                                        if (substr($siteUrl, -1) != '/') {
@@ -3724,8 +3728,8 @@ Connection: close
                if (strpos($filename, 'EXT:') === 0) {
                        list($extKey, $local) = explode('/', substr($filename, 4), 2);
                        $filename = '';
-                       if ((string)$extKey !== '' && \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded($extKey) && (string)$local !== '') {
-                               $filename = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($extKey) . $local;
+                       if ((string)$extKey !== '' && ExtensionManagementUtility::isLoaded($extKey) && (string)$local !== '') {
+                               $filename = ExtensionManagementUtility::extPath($extKey) . $local;
                        }
                } elseif (!self::isAbsPath($filename)) {
                        // relative. Prepended with $relPathPrefix
@@ -4319,7 +4323,7 @@ Connection: close
                // Create new instance and call constructor with parameters
                $instance = static::instantiateClass($finalClassName, func_get_args());
                // Register new singleton instance
-               if ($instance instanceof \TYPO3\CMS\Core\SingletonInterface) {
+               if ($instance instanceof SingletonInterface) {
                        self::$singletonInstances[$finalClassName] = $instance;
                }
                return $instance;
@@ -4386,7 +4390,7 @@ Connection: close
                                $className = static::getImplementationForClass($className);
                        }
                }
-               return \TYPO3\CMS\Core\Core\ClassLoader::getClassNameForAlias($className);
+               return ClassLoader::getClassNameForAlias($className);
        }
 
        /**
@@ -4434,7 +4438,7 @@ Connection: close
         * @return void
         * @internal
         */
-       static public function setSingletonInstance($className, \TYPO3\CMS\Core\SingletonInterface $instance) {
+       static public function setSingletonInstance($className, SingletonInterface $instance) {
                self::checkInstanceClassName($className, $instance);
                self::$singletonInstances[$className] = $instance;
        }
@@ -4455,7 +4459,7 @@ Connection: close
         * @return void
         * @internal
         */
-       static public function removeSingletonInstance($className, \TYPO3\CMS\Core\SingletonInterface $instance) {
+       static public function removeSingletonInstance($className, SingletonInterface $instance) {
                self::checkInstanceClassName($className, $instance);
                if (!isset(self::$singletonInstances[$className])) {
                        throw new \InvalidArgumentException('No Instance registered for ' . $className . '.', 1394099179);
@@ -4520,7 +4524,7 @@ Connection: close
         */
        static public function addInstance($className, $instance) {
                self::checkInstanceClassName($className, $instance);
-               if ($instance instanceof \TYPO3\CMS\Core\SingletonInterface) {
+               if ($instance instanceof SingletonInterface) {
                        throw new \InvalidArgumentException('$instance must not be an instance of TYPO3\\CMS\\Core\\SingletonInterface. ' . 'For setting singletons, please use setSingletonInstance.', 1288969325);
                }
                if (!isset(self::$nonSingletonInstances[$className])) {
@@ -4582,7 +4586,7 @@ Connection: close
                        'requestedServiceSubType' => $serviceSubType,
                        'requestedExcludeServiceKeys' => $excludeServiceKeys
                );
-               while ($info = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::findService($serviceType, $serviceSubType, $excludeServiceKeys)) {
+               while ($info = ExtensionManagementUtility::findService($serviceType, $serviceSubType, $excludeServiceKeys)) {
                        // provide information about requested service to service object
                        $info = array_merge($info, $requestInfo);
                        // Check persistent object and if found, call directly and exit.
@@ -4597,7 +4601,7 @@ Connection: close
                                if (is_object($obj)) {
                                        if (!@is_callable(array($obj, 'init'))) {
                                                // use silent logging??? I don't think so.
-                                               die('Broken service:' . \TYPO3\CMS\Core\Utility\DebugUtility::viewArray($info));
+                                               die('Broken service:' . DebugUtility::viewArray($info));
                                        }
                                        $obj->info = $info;
                                        // service available?
@@ -4611,7 +4615,7 @@ Connection: close
                                }
                        }
                        // deactivate the service
-                       \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::deactivateService($info['serviceType'], $info['serviceKey']);
+                       ExtensionManagementUtility::deactivateService($info['serviceType'], $info['serviceKey']);
                }
                return $error;
        }
@@ -4865,7 +4869,7 @@ Connection: close
                                openlog($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_div.php']['systemLogHost'], LOG_ODELAY, $facility);
                        }
                }
-               $GLOBALS['TYPO3_CONF_VARS']['SYS']['systemLogLevel'] = \TYPO3\CMS\Core\Utility\MathUtility::forceIntegerInRange($GLOBALS['TYPO3_CONF_VARS']['SYS']['systemLogLevel'], 0, 4);
+               $GLOBALS['TYPO3_CONF_VARS']['SYS']['systemLogLevel'] = MathUtility::forceIntegerInRange($GLOBALS['TYPO3_CONF_VARS']['SYS']['systemLogLevel'], 0, 4);
                $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_div.php']['systemLogInit'] = TRUE;
        }
 
@@ -4881,7 +4885,7 @@ Connection: close
         * @return void
         */
        static public function sysLog($msg, $extKey, $severity = 0) {
-               $severity = \TYPO3\CMS\Core\Utility\MathUtility::forceIntegerInRange($severity, 0, 4);
+               $severity = MathUtility::forceIntegerInRange($severity, 0, 4);
                // Is message worth logging?
                if ((int)$GLOBALS['TYPO3_CONF_VARS']['SYS']['systemLogLevel'] > $severity) {
                        return;
@@ -4923,7 +4927,7 @@ Connection: close
                        } elseif ($type == 'mail') {
                                list($to, $from) = explode('/', $destination);
                                if (!self::validEmail($from)) {
-                                       $from = \TYPO3\CMS\Core\Utility\MailUtility::getSystemFrom();
+                                       $from = MailUtility::getSystemFrom();
                                }
                                /** @var $mail \TYPO3\CMS\Core\Mail\MailMessage */
                                $mail = self::makeInstance('TYPO3\\CMS\\Core\\Mail\\MailMessage');
@@ -5000,7 +5004,7 @@ Connection: close
                }
                // Do not use console in login screen
                if (in_array('console', $log) !== FALSE && isset($GLOBALS['BE_USER']->user['uid'])) {
-                       \TYPO3\CMS\Core\Utility\DebugUtility::debug($msg, $date, 'Deprecation Log');
+                       DebugUtility::debug($msg, $date, 'Deprecation Log');
                }
        }
 
@@ -5042,8 +5046,8 @@ Connection: close
                }
                        // Write a longer message to the deprecation log: <function> <annotion> - <trace> (<source>)
                $logMsg = $trail[1]['class'] . $trail[1]['type'] . $trail[1]['function'];
-               $logMsg .= '() - ' . $msg . ' - ' . \TYPO3\CMS\Core\Utility\DebugUtility::debugTrail();
-               $logMsg .= ' (' . \TYPO3\CMS\Core\Utility\PathUtility::stripPathSitePrefix($function->getFileName()) . '#' . $function->getStartLine() . ')';
+               $logMsg .= '() - ' . $msg . ' - ' . DebugUtility::debugTrail();
+               $logMsg .= ' (' . PathUtility::stripPathSitePrefix($function->getFileName()) . '#' . $function->getStartLine() . ')';
                self::deprecationLog($logMsg);
        }
 
@@ -5079,7 +5083,7 @@ Connection: close
         * @return string Compiled command that deals with IM6 & GraphicsMagick
         */
        static public function imageMagickCommand($command, $parameters, $path = '') {
-               return \TYPO3\CMS\Core\Utility\CommandUtility::imageMagickCommand($command, $parameters, $path);
+               return CommandUtility::imageMagickCommand($command, $parameters, $path);
        }
 
        /**
@@ -5187,7 +5191,7 @@ Connection: close
         * @throws \RuntimeException if applicationContext is overriden
         * @internal This is not a public API method, do not use in own extensions
         */
-       static public function presetApplicationContext(\TYPO3\CMS\Core\Core\ApplicationContext $applicationContext) {
+       static public function presetApplicationContext(ApplicationContext $applicationContext) {
                if (is_null(static::$applicationContext)) {
                        static::$applicationContext = $applicationContext;
                } else {
index d79c9cf..90afb63 100644 (file)
@@ -75,7 +75,7 @@ class HttpUtility {
         */
        static public function redirect($url, $httpStatus = self::HTTP_STATUS_303) {
                self::setResponseCode($httpStatus);
-               header('Location: ' . \TYPO3\CMS\Core\Utility\GeneralUtility::locationHeaderUrl($url));
+               header('Location: ' . GeneralUtility::locationHeaderUrl($url));
                die;
        }
 
index d0d9614..3521eac 100644 (file)
@@ -27,15 +27,15 @@ class MonitorUtility {
         */
        static public function peakMemoryUsage() {
                $peakUsage = memory_get_peak_usage(TRUE);
-               $memoryLimit = \TYPO3\CMS\Core\Utility\GeneralUtility::getBytesFromSizeMeasurement(ini_get('memory_limit'));
+               $memoryLimit = GeneralUtility::getBytesFromSizeMeasurement(ini_get('memory_limit'));
                if (is_double($memoryLimit) && $memoryLimit != 0) {
                        if ($peakUsage / $memoryLimit >= 0.9) {
                                /** @var $registry \TYPO3\CMS\Core\Registry */
-                               $registry = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Registry');
+                               $registry = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Registry');
                                $data = array(
                                        'used' => $peakUsage,
                                        'tstamp' => $GLOBALS['EXEC_TIME'],
-                                       'url' => \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_REQUEST_URL')
+                                       'url' => GeneralUtility::getIndpEnv('TYPO3_REQUEST_URL')
                                );
                                $registry->set('core', 'reports-peakMemoryUsage', $data);
                        }
index 9bc9c7c..1ece2a1 100644 (file)
@@ -45,7 +45,7 @@ class PathUtility {
                $targetPath = rtrim(GeneralUtility::fixWindowsFilePath($targetPath), '/');
                if ($sourcePath !== $targetPath) {
                        $commonPrefix = self::getCommonPrefix(array($sourcePath, $targetPath));
-                       if ($commonPrefix !== NULL && \TYPO3\CMS\Core\Utility\GeneralUtility::isAllowedAbsPath($commonPrefix)) {
+                       if ($commonPrefix !== NULL && GeneralUtility::isAllowedAbsPath($commonPrefix)) {
                                $commonPrefixLength = strlen($commonPrefix);
                                $resolvedSourcePath = '';
                                $resolvedTargetPath = '';
index 7dca772..5b3dee1 100644 (file)
@@ -13,6 +13,8 @@ namespace TYPO3\CMS\Core\Utility;
  *
  * The TYPO3 project - inspiring people to share!
  */
+use TYPO3\CMS\Frontend\Page\PageRepository;
+
 /**
  * A utility resolving and Caching the Rootline generation
  *
@@ -119,14 +121,14 @@ class RootlineUtility {
         * @param \TYPO3\CMS\Frontend\Page\PageRepository $context
         * @throws \RuntimeException
         */
-       public function __construct($uid, $mountPointParameter = '', \TYPO3\CMS\Frontend\Page\PageRepository $context = NULL) {
+       public function __construct($uid, $mountPointParameter = '', PageRepository $context = NULL) {
                $this->pageUid = (int)$uid;
                $this->mountPointParameter = trim($mountPointParameter);
                if ($context === NULL) {
                        if (isset($GLOBALS['TSFE']) && is_object($GLOBALS['TSFE']) && is_object($GLOBALS['TSFE']->sys_page)) {
                                $this->pageContext = $GLOBALS['TSFE']->sys_page;
                        } else {
-                               $this->pageContext = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Frontend\\Page\\PageRepository');
+                               $this->pageContext = GeneralUtility::makeInstance('TYPO3\\CMS\\Frontend\\Page\\PageRepository');
                        }
                } else {
                        $this->pageContext = $context;
@@ -152,9 +154,9 @@ class RootlineUtility {
                        }
                }
                if (self::$cache === NULL) {
-                       self::$cache = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Cache\\CacheManager')->getCache('cache_rootline');
+                       self::$cache = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Cache\\CacheManager')->getCache('cache_rootline');
                }
-               self::$rootlineFields = array_merge(self::$rootlineFields, \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $GLOBALS['TYPO3_CONF_VARS']['FE']['addRootLineFields'], TRUE));
+               self::$rootlineFields = array_merge(self::$rootlineFields, GeneralUtility::trimExplode(',', $GLOBALS['TYPO3_CONF_VARS']['FE']['addRootLineFields'], TRUE));
                self::$rootlineFields = array_unique(self::$rootlineFields);
                $this->databaseConnection = $GLOBALS['TYPO3_DB'];
 
@@ -238,7 +240,7 @@ class RootlineUtility {
        protected function getRecordArray($uid) {
                $currentCacheIdentifier = $this->getCacheIdentifier($uid);
                if (!isset(self::$pageRecordCache[$currentCacheIdentifier])) {
-                       $row = $this->databaseConnection->exec_SELECTgetSingleRow(implode(',', self::$rootlineFields), 'pages', 'uid = ' . (int)$uid . ' AND pages.deleted = 0 AND pages.doktype <> ' . \TYPO3\CMS\Frontend\Page\PageRepository::DOKTYPE_RECYCLER);
+                       $row = $this->databaseConnection->exec_SELECTgetSingleRow(implode(',', self::$rootlineFields), 'pages', 'uid = ' . (int)$uid . ' AND pages.deleted = 0 AND pages.doktype <> ' . PageRepository::DOKTYPE_RECYCLER);
                        if (empty($row)) {
                                throw new \RuntimeException('Could not fetch page data for uid ' . $uid . '.', 1343589451);
                        }
@@ -267,13 +269,13 @@ class RootlineUtility {
         * @return array $pageRecord with additional relations
         */
        protected function enrichWithRelationFields($uid, array $pageRecord) {
-               $pageOverlayFields = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $GLOBALS['TYPO3_CONF_VARS']['FE']['pageOverlayFields']);
+               $pageOverlayFields = GeneralUtility::trimExplode(',', $GLOBALS['TYPO3_CONF_VARS']['FE']['pageOverlayFields']);
                foreach ($GLOBALS['TCA']['pages']['columns'] as $column => $configuration) {
                        if ($this->columnHasRelationToResolve($configuration)) {
                                $configuration = $configuration['config'];
                                if ($configuration['MM']) {
                                        /** @var $loadDBGroup \TYPO3\CMS\Core\Database\RelationHandler */
-                                       $loadDBGroup = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Database\\RelationHandler');
+                                       $loadDBGroup = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Database\\RelationHandler');
                                        $loadDBGroup->start(
                                                $pageRecord[$column],
                                                isset($configuration['allowed']) ? $configuration['allowed'] : $configuration['foreign_table'],
@@ -364,7 +366,7 @@ class RootlineUtility {
                        // Get rootline of (and including) parent page
                        $mountPointParameter = count($this->parsedMountPointParameters) > 0 ? $this->mountPointParameter : '';
                        /** @var $rootline \TYPO3\CMS\Core\Utility\RootlineUtility */
-                       $rootline = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Utility\\RootlineUtility', $parentUid, $mountPointParameter, $this->pageContext);
+                       $rootline = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Utility\\RootlineUtility', $parentUid, $mountPointParameter, $this->pageContext);
                        $rootline = $rootline->get();
                        // retrieve cache tags of parent rootline
                        foreach ($rootline as $entry) {
@@ -429,9 +431,9 @@ class RootlineUtility {
         * @return void
         */
        protected function parseMountPointParameter() {
-               $mountPoints = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $this->mountPointParameter);
+               $mountPoints = GeneralUtility::trimExplode(',', $this->mountPointParameter);
                foreach ($mountPoints as $mP) {
-                       list($mountedPageUid, $mountPageUid) = \TYPO3\CMS\Core\Utility\GeneralUtility::intExplode('-', $mP);
+                       list($mountedPageUid, $mountPageUid) = GeneralUtility::intExplode('-', $mP);
                        $this->parsedMountPointParameters[$mountedPageUid] = $mountPageUid;
                }
        }
index ddab19b..b8bc971 100644 (file)
@@ -87,10 +87,10 @@ class VersionNumberUtility {
        static public function getNumericTypo3Version() {
                $t3version = static::getCurrentTypo3Version();
                $t3version = preg_replace('/-?(dev|alpha|beta|RC).*$/', '', $t3version);
-               $parts = \TYPO3\CMS\Core\Utility\GeneralUtility::intExplode('.', $t3version . '..');
-               $t3version = \TYPO3\CMS\Core\Utility\MathUtility::forceIntegerInRange($parts[0], 0, 999) . '.' .
-                       \TYPO3\CMS\Core\Utility\MathUtility::forceIntegerInRange($parts[1], 0, 999) . '.' .
-                       \TYPO3\CMS\Core\Utility\MathUtility::forceIntegerInRange($parts[2], 0, 999);
+               $parts = GeneralUtility::intExplode('.', $t3version . '..');
+               $t3version = MathUtility::forceIntegerInRange($parts[0], 0, 999) . '.' .
+                       MathUtility::forceIntegerInRange($parts[1], 0, 999) . '.' .
+                       MathUtility::forceIntegerInRange($parts[2], 0, 999);
                return $t3version;
        }
 
@@ -113,13 +113,13 @@ class VersionNumberUtility {
         * @return array
         */
        static public function convertVersionsStringToVersionNumbers($versionsString) {
-               $versions = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode('-', $versionsString);
+               $versions = GeneralUtility::trimExplode('-', $versionsString);
                $versionsCount = count($versions);
                for ($i = 0; $i < $versionsCount; $i++) {
-                       $cleanedVersion = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode('.', $versions[$i]);
+                       $cleanedVersion = GeneralUtility::trimExplode('.', $versions[$i]);
                        $cleanedVersionCount = count($cleanedVersion);
                        for ($j = 0; $j < $cleanedVersionCount; $j++) {
-                               $cleanedVersion[$j] = \TYPO3\CMS\Core\Utility\MathUtility::forceIntegerInRange($cleanedVersion[$j], 0, 999);
+                               $cleanedVersion[$j] = MathUtility::forceIntegerInRange($cleanedVersion[$j], 0, 999);
                        }
                        $cleanedVersionString = implode('.', $cleanedVersion);
                        if (static::convertVersionNumberToInteger($cleanedVersionString) === 0) {
@@ -138,10 +138,10 @@ class VersionNumberUtility {
         * @return array
         */
        static public function convertVersionStringToArray($version) {
-               $parts = \TYPO3\CMS\Core\Utility\GeneralUtility::intExplode('.', $version . '..');
-               $parts[0] = \TYPO3\CMS\Core\Utility\MathUtility::forceIntegerInRange($parts[0], 0, 999);
-               $parts[1] = \TYPO3\CMS\Core\Utility\MathUtility::forceIntegerInRange($parts[1], 0, 999);
-               $parts[2] = \TYPO3\CMS\Core\Utility\MathUtility::forceIntegerInRange($parts[2], 0, 999);
+               $parts = GeneralUtility::intExplode('.', $version . '..');
+               $parts[0] = MathUtility::forceIntegerInRange($parts[0], 0, 999);
+               $parts[1] = MathUtility::forceIntegerInRange($parts[1], 0, 999);
+               $parts[2] = MathUtility::forceIntegerInRange($parts[2], 0, 999);
                $result = array();
                $result['version'] = $parts[0] . '.' . $parts[1] . '.' . $parts[2];
                $result['version_int'] = (int)($parts[0] * 1000000 + $parts[1] * 1000 + $parts[2]);
@@ -163,10 +163,10 @@ class VersionNumberUtility {
                if (!in_array($raise, array('main', 'sub', 'dev'))) {
                        throw new \TYPO3\CMS\Core\Exception('RaiseVersionNumber expects one of "main", "sub" or "dev".', 1342639555);
                }
-               $parts = \TYPO3\CMS\Core\Utility\GeneralUtility::intExplode('.', $version . '..');
-               $parts[0] = \TYPO3\CMS\Core\Utility\MathUtility::forceIntegerInRange($parts[0], 0, 999);
-               $parts[1] = \TYPO3\CMS\Core\Utility\MathUtility::forceIntegerInRange($parts[1], 0, 999);
-               $parts[2] = \TYPO3\CMS\Core\Utility\MathUtility::forceIntegerInRange($parts[2], 0, 999);
+               $parts = GeneralUtility::intExplode('.', $version . '..');
+               $parts[0] = MathUtility::forceIntegerInRange($parts[0], 0, 999);
+               $parts[1] = MathUtility::forceIntegerInRange($parts[1], 0, 999);
+               $parts[2] = MathUtility::forceIntegerInRange($parts[2], 0, 999);
                switch ((string) $raise) {
                        case 'main':
                                $parts[0]++;