[TASK] Cleanup ext:backend 79/20479/10
authorNicole Cordes <typo3@cordes.co>
Sat, 4 May 2013 22:24:40 +0000 (00:24 +0200)
committerAnja Leichsenring <aleichsenring@ab-softlab.de>
Sun, 5 May 2013 11:23:37 +0000 (13:23 +0200)
Cleanup ext:backend with the following code changes:
* Make use of the "use" statement for GeneralUtility
* Make use of the "use" statement for BackendUtility
* Case in switch statements are tabbed with one more tab

Change-Id: I6549316dddc9575cab4e661b7c111ec947757cb8
Fixes: #47900
Releases: 6.2
Reviewed-on: https://review.typo3.org/20479
Reviewed-by: Anja Leichsenring
Tested-by: Anja Leichsenring
94 files changed:
typo3/sysext/backend/Classes/ClickMenu/ClickMenu.php
typo3/sysext/backend/Classes/Clipboard/Clipboard.php
typo3/sysext/backend/Classes/Configuration/TranslationConfigurationProvider.php
typo3/sysext/backend/Classes/Configuration/TsConfigParser.php
typo3/sysext/backend/Classes/Configuration/TypoScript/ConditionMatching/ConditionMatcher.php
typo3/sysext/backend/Classes/ContextMenu/AbstractContextMenu.php
typo3/sysext/backend/Classes/ContextMenu/AbstractContextMenuDataProvider.php
typo3/sysext/backend/Classes/ContextMenu/ContextMenuAction.php
typo3/sysext/backend/Classes/ContextMenu/ContextMenuActionCollection.php
typo3/sysext/backend/Classes/ContextMenu/Extdirect/AbstractExtdirectContextMenu.php
typo3/sysext/backend/Classes/ContextMenu/Pagetree/ContextMenuDataProvider.php
typo3/sysext/backend/Classes/ContextMenu/Pagetree/Extdirect/ContextMenuConfiguration.php
typo3/sysext/backend/Classes/ContextMenu/Renderer/AbstractContextMenuRenderer.php
typo3/sysext/backend/Classes/Controller/BackendController.php
typo3/sysext/backend/Classes/Controller/BackendLayoutWizardController.php
typo3/sysext/backend/Classes/Controller/ClickMenuController.php
typo3/sysext/backend/Classes/Controller/ContentElement/ElementHistoryController.php
typo3/sysext/backend/Classes/Controller/ContentElement/ElementInformationController.php
typo3/sysext/backend/Classes/Controller/ContentElement/MoveElementController.php
typo3/sysext/backend/Classes/Controller/ContentElement/NewContentElementController.php
typo3/sysext/backend/Classes/Controller/DummyController.php
typo3/sysext/backend/Classes/Controller/EditDocumentController.php
typo3/sysext/backend/Classes/Controller/File/CreateFolderController.php
typo3/sysext/backend/Classes/Controller/File/EditFileController.php
typo3/sysext/backend/Classes/Controller/File/FileController.php
typo3/sysext/backend/Classes/Controller/File/FileUploadController.php
typo3/sysext/backend/Classes/Controller/File/RenameFileController.php
typo3/sysext/backend/Classes/Controller/FileSystemNavigationFrameController.php
typo3/sysext/backend/Classes/Controller/ListFrameLoaderController.php
typo3/sysext/backend/Classes/Controller/LoginController.php
typo3/sysext/backend/Classes/Controller/LoginFramesetController.php
typo3/sysext/backend/Classes/Controller/LogoutController.php
typo3/sysext/backend/Classes/Controller/NewRecordController.php
typo3/sysext/backend/Classes/Controller/NoDocumentsOpenController.php
typo3/sysext/backend/Classes/Controller/PageLayoutController.php
typo3/sysext/backend/Classes/Controller/PageTreeNavigationController.php
typo3/sysext/backend/Classes/Controller/ShortcutFrameController.php
typo3/sysext/backend/Classes/Controller/SimpleDataHandlerController.php
typo3/sysext/backend/Classes/Controller/Wizard/AddController.php
typo3/sysext/backend/Classes/Controller/Wizard/ColorpickerController.php
typo3/sysext/backend/Classes/Controller/Wizard/EditController.php
typo3/sysext/backend/Classes/Controller/Wizard/FormsController.php
typo3/sysext/backend/Classes/Controller/Wizard/ListController.php
typo3/sysext/backend/Classes/Controller/Wizard/RteController.php
typo3/sysext/backend/Classes/Controller/Wizard/TableController.php
typo3/sysext/backend/Classes/Domain/Model/Module/BackendModule.php
typo3/sysext/backend/Classes/Domain/Repository/Module/BackendModuleRepository.php
typo3/sysext/backend/Classes/Form/DataPreprocessor.php
typo3/sysext/backend/Classes/Form/Element/InlineElement.php
typo3/sysext/backend/Classes/Form/Element/SuggestDefaultReceiver.php
typo3/sysext/backend/Classes/Form/Element/SuggestElement.php
typo3/sysext/backend/Classes/Form/Element/TreeElement.php
typo3/sysext/backend/Classes/Form/Element/ValueSlider.php
typo3/sysext/backend/Classes/Form/ElementConditionMatcher.php
typo3/sysext/backend/Classes/Form/FlexFormsHelper.php
typo3/sysext/backend/Classes/Form/FormEngine.php
typo3/sysext/backend/Classes/Form/FrontendFormEngine.php
typo3/sysext/backend/Classes/FrontendBackendUserAuthentication.php
typo3/sysext/backend/Classes/History/RecordHistory.php
typo3/sysext/backend/Classes/Module/AbstractFunctionModule.php
typo3/sysext/backend/Classes/Module/BaseScriptClass.php
typo3/sysext/backend/Classes/Module/ModuleLoader.php
typo3/sysext/backend/Classes/Module/ModuleSettings.php
typo3/sysext/backend/Classes/RecordList/AbstractRecordList.php
typo3/sysext/backend/Classes/RecordList/ElementBrowserRecordList.php
typo3/sysext/backend/Classes/Rte/AbstractRte.php
typo3/sysext/backend/Classes/Search/LiveSearch/LiveSearch.php
typo3/sysext/backend/Classes/Sprite/AbstractSpriteHandler.php
typo3/sysext/backend/Classes/Sprite/SpriteBuildingHandler.php
typo3/sysext/backend/Classes/Sprite/SpriteGenerator.php
typo3/sysext/backend/Classes/Sprite/SpriteManager.php
typo3/sysext/backend/Classes/Template/DocumentTemplate.php
typo3/sysext/backend/Classes/Toolbar/ClearCacheToolbarItem.php
typo3/sysext/backend/Classes/Toolbar/ShortcutToolbarItem.php
typo3/sysext/backend/Classes/Tree/Pagetree/Commands.php
typo3/sysext/backend/Classes/Tree/Pagetree/DataProvider.php
typo3/sysext/backend/Classes/Tree/Pagetree/ExtdirectTreeCommands.php
typo3/sysext/backend/Classes/Tree/Pagetree/ExtdirectTreeDataProvider.php
typo3/sysext/backend/Classes/Tree/TreeNode.php
typo3/sysext/backend/Classes/Tree/View/AbstractTreeView.php
typo3/sysext/backend/Classes/Tree/View/BrowseTreeView.php
typo3/sysext/backend/Classes/Tree/View/FolderTreeView.php
typo3/sysext/backend/Classes/Tree/View/PagePositionMap.php
typo3/sysext/backend/Classes/User/ExtDirect/BackendUserSettingsDataProvider.php
typo3/sysext/backend/Classes/Utility/BackendUtility.php
typo3/sysext/backend/Classes/Utility/IconUtility.php
typo3/sysext/backend/Classes/View/BackendLayoutView.php
typo3/sysext/backend/Classes/View/ModuleMenuView.php
typo3/sysext/backend/Classes/View/PageLayout/Extdirect/ExtdirectPageCommands.php
typo3/sysext/backend/Classes/View/PageLayoutView.php
typo3/sysext/backend/Classes/View/PageTreeView.php
typo3/sysext/backend/Classes/View/ThumbnailView.php
typo3/sysext/backend/Classes/Wizard/TsconfigWizard.php
typo3/sysext/backend/Tests/Unit/Sprite/SpriteManagerTest.php

index 330ec61..b00ac3c 100644 (file)
@@ -28,6 +28,9 @@ namespace TYPO3\CMS\Backend\ClickMenu;
  ***************************************************************/
 
 use TYPO3\CMS\Backend\Utility\BackendUtility;
+use TYPO3\CMS\Backend\Utility\IconUtility;
+use TYPO3\CMS\Core\Resource\ResourceFactory;
+use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 
 /**
@@ -203,7 +206,7 @@ class ClickMenu {
         * @deprecated since TYPO3 6.0, will be removed in 6.2 as there is no click menu in the topframe anymore (no topframe at all actually)
         */
        public function doDisplayTopFrameCM() {
-               \TYPO3\CMS\Core\Utility\GeneralUtility::logDeprecatedFunction();
+               GeneralUtility::logDeprecatedFunction();
                return FALSE;
        }
 
@@ -222,7 +225,7 @@ class ClickMenu {
         */
        public function printDBClickMenu($table, $uid) {
                // Get record:
-               $this->rec = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecordWSOL($table, $uid);
+               $this->rec = BackendUtility::getRecordWSOL($table, $uid);
                $menuItems = array();
                $root = 0;
                $DBmount = FALSE;
@@ -237,20 +240,20 @@ class ClickMenu {
                // Used to hide cut,copy icons for l10n-records
                $l10nOverlay = FALSE;
                // Should only be performed for overlay-records within the same table
-               if (\TYPO3\CMS\Backend\Utility\BackendUtility::isTableLocalizable($table) && !isset($GLOBALS['TCA'][$table]['ctrl']['transOrigPointerTable'])) {
+               if (BackendUtility::isTableLocalizable($table) && !isset($GLOBALS['TCA'][$table]['ctrl']['transOrigPointerTable'])) {
                        $l10nOverlay = intval($this->rec[$GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField']]) != 0;
                }
                // If record found (or root), go ahead and fill the $menuItems array which will contain data for the elements to render.
                if (is_array($this->rec) || $root) {
                        // Get permissions
-                       $lCP = $GLOBALS['BE_USER']->calcPerms(\TYPO3\CMS\Backend\Utility\BackendUtility::getRecord('pages', $table == 'pages' ? $this->rec['uid'] : $this->rec['pid']));
+                       $lCP = $GLOBALS['BE_USER']->calcPerms(BackendUtility::getRecord('pages', $table == 'pages' ? $this->rec['uid'] : $this->rec['pid']));
                        // View
                        if (!in_array('view', $this->disabledItems)) {
                                if ($table == 'pages') {
                                        $menuItems['view'] = $this->DB_view($uid);
                                }
                                if ($table == $GLOBALS['TYPO3_CONF_VARS']['SYS']['contentTable']) {
-                                       $ws_rec = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecordWSOL($table, $this->rec['uid']);
+                                       $ws_rec = BackendUtility::getRecordWSOL($table, $this->rec['uid']);
                                        $menuItems['view'] = $this->DB_view($ws_rec['pid']);
                                }
                        }
@@ -284,7 +287,7 @@ class ClickMenu {
                                $selItem = $this->clipObj->getSelectedRecord();
                                $elInfo = array(
                                        GeneralUtility::fixed_lgd_cs($selItem['_RECORD_TITLE'], $GLOBALS['BE_USER']->uc['titleLen']),
-                                       $root ? $GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename'] : GeneralUtility::fixed_lgd_cs(\TYPO3\CMS\Backend\Utility\BackendUtility::getRecordTitle($table, $this->rec), $GLOBALS['BE_USER']->uc['titleLen']),
+                                       $root ? $GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename'] : GeneralUtility::fixed_lgd_cs(BackendUtility::getRecordTitle($table, $this->rec), $GLOBALS['BE_USER']->uc['titleLen']),
                                        $this->clipObj->currentMode()
                                );
                                if ($table == 'pages' && $lCP & 8) {
@@ -298,7 +301,7 @@ class ClickMenu {
                                }
                        }
                        // Delete:
-                       $elInfo = array(GeneralUtility::fixed_lgd_cs(\TYPO3\CMS\Backend\Utility\BackendUtility::getRecordTitle($table, $this->rec), $GLOBALS['BE_USER']->uc['titleLen']));
+                       $elInfo = array(GeneralUtility::fixed_lgd_cs(BackendUtility::getRecordTitle($table, $this->rec), $GLOBALS['BE_USER']->uc['titleLen']));
                        if (!in_array('delete', $this->disabledItems) && !$root && !$DBmount && $GLOBALS['BE_USER']->isPSet($lCP, $table, 'delete')) {
                                $menuItems['spacer2'] = 'spacer';
                                $menuItems['delete'] = $this->DB_delete($table, $uid, $elInfo);
@@ -315,7 +318,7 @@ class ClickMenu {
                        $this->rec = array();
                }
                // Return the printed elements:
-               return $this->printItems($menuItems, $root ? \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('apps-pagetree-root') . htmlspecialchars($GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename']) : \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIconForRecord($table, $this->rec, array('title' => htmlspecialchars(\TYPO3\CMS\Backend\Utility\BackendUtility::getRecordIconAltText($this->rec, $table)))) . \TYPO3\CMS\Backend\Utility\BackendUtility::getRecordTitle($table, $this->rec, TRUE));
+               return $this->printItems($menuItems, $root ? IconUtility::getSpriteIcon('apps-pagetree-root') . htmlspecialchars($GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename']) : IconUtility::getSpriteIconForRecord($table, $this->rec, array('title' => htmlspecialchars(BackendUtility::getRecordIconAltText($this->rec, $table)))) . BackendUtility::getRecordTitle($table, $this->rec, TRUE));
        }
 
        /**
@@ -328,7 +331,7 @@ class ClickMenu {
         */
        public function printNewDBLevel($table, $uid) {
                // Setting internal record to the table/uid :
-               $this->rec = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecordWSOL($table, $uid);
+               $this->rec = BackendUtility::getRecordWSOL($table, $uid);
                $menuItems = array();
                $root = 0;
                // Rootlevel
@@ -337,7 +340,7 @@ class ClickMenu {
                }
                // If record was found, check permissions and get menu items.
                if (is_array($this->rec) || $root) {
-                       $lCP = $GLOBALS['BE_USER']->calcPerms(\TYPO3\CMS\Backend\Utility\BackendUtility::getRecord('pages', $table == 'pages' ? $this->rec['uid'] : $this->rec['pid']));
+                       $lCP = $GLOBALS['BE_USER']->calcPerms(BackendUtility::getRecord('pages', $table == 'pages' ? $this->rec['uid'] : $this->rec['pid']));
                        // Edit:
                        if (!$root && ($GLOBALS['BE_USER']->isPSet($lCP, $table, 'edit') || $GLOBALS['BE_USER']->isPSet($lCP, $table, 'editcontent'))) {
                                $this->editOK = 1;
@@ -348,7 +351,7 @@ class ClickMenu {
                if (!is_array($menuItems)) {
                        $menuItems = array();
                }
-               return $this->printItems($menuItems, $root ? \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('apps-pagetree-root') . htmlspecialchars($GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename']) : \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIconForRecord($table, $this->rec, array('title' => htmlspecialchars(\TYPO3\CMS\Backend\Utility\BackendUtility::getRecordIconAltText($this->rec, $table)))) . \TYPO3\CMS\Backend\Utility\BackendUtility::getRecordTitle($table, $this->rec, TRUE));
+               return $this->printItems($menuItems, $root ? IconUtility::getSpriteIcon('apps-pagetree-root') . htmlspecialchars($GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename']) : IconUtility::getSpriteIconForRecord($table, $this->rec, array('title' => htmlspecialchars(BackendUtility::getRecordIconAltText($this->rec, $table)))) . BackendUtility::getRecordTitle($table, $this->rec, TRUE));
        }
 
        /**
@@ -415,7 +418,7 @@ class ClickMenu {
                if ($this->listFrame) {
                        $addParam['reloadListFrame'] = $this->alwaysContentFrame ? 2 : 1;
                }
-               return $this->linkItem($this->label($type), $this->excludeIcon(\TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-edit-' . $type . ($isSel === $type ? '-release' : ''))), 'top.loadTopMenu(\'' . $this->clipObj->selUrlDB($table, $uid, ($type == 'copy' ? 1 : 0), ($isSel == $type), $addParam) . '\');return false;');
+               return $this->linkItem($this->label($type), $this->excludeIcon(IconUtility::getSpriteIcon('actions-edit-' . $type . ($isSel === $type ? '-release' : ''))), 'top.loadTopMenu(\'' . $this->clipObj->selUrlDB($table, $uid, ($type == 'copy' ? 1 : 0), ($isSel == $type), $addParam) . '\');return false;');
        }
 
        /**
@@ -440,7 +443,7 @@ class ClickMenu {
                        $conf = $loc;
                }
                $editOnClick = 'if(' . $conf . '){' . $loc . '.location.href=top.TS.PATH_typo3+\'' . $this->clipObj->pasteUrl($table, $uid, 0) . '&redirect=\'+top.rawurlencode(' . $this->frameLocation(($loc . '.document')) . '.pathname+' . $this->frameLocation(($loc . '.document')) . '.search); hideCM();}';
-               return $this->linkItem($this->label('paste' . $type), $this->excludeIcon(\TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-document-paste-' . $type)), $editOnClick . 'return false;');
+               return $this->linkItem($this->label('paste' . $type), $this->excludeIcon(IconUtility::getSpriteIcon('actions-document-paste-' . $type)), $editOnClick . 'return false;');
        }
 
        /**
@@ -453,7 +456,7 @@ class ClickMenu {
         * @todo Define visibility
         */
        public function DB_info($table, $uid) {
-               return $this->linkItem($this->label('info'), $this->excludeIcon(\TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-document-info')), 'top.launchView(\'' . $table . '\', \'' . $uid . '\'); return hideCM();');
+               return $this->linkItem($this->label('info'), $this->excludeIcon(IconUtility::getSpriteIcon('actions-document-info')), 'top.launchView(\'' . $table . '\', \'' . $uid . '\'); return hideCM();');
        }
 
        /**
@@ -467,7 +470,7 @@ class ClickMenu {
         */
        public function DB_history($table, $uid) {
                $url = 'show_rechis.php?element=' . rawurlencode(($table . ':' . $uid));
-               return $this->linkItem($GLOBALS['LANG']->makeEntities($GLOBALS['LANG']->getLL('CM_history')), $this->excludeIcon(\TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-document-history-open')), $this->urlRefForCM($url, 'returnUrl'), 0);
+               return $this->linkItem($GLOBALS['LANG']->makeEntities($GLOBALS['LANG']->getLL('CM_history')), $this->excludeIcon(IconUtility::getSpriteIcon('actions-document-history-open')), $this->urlRefForCM($url, 'returnUrl'), 0);
        }
 
        /**
@@ -481,11 +484,11 @@ class ClickMenu {
         * @todo Define visibility
         */
        public function DB_perms($table, $uid, $rec) {
-               if (!\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('perm')) {
+               if (!ExtensionManagementUtility::isLoaded('perm')) {
                        return '';
                }
-               $url = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('perm') . 'mod1/index.php?id=' . $uid . ($rec['perms_userid'] == $GLOBALS['BE_USER']->user['uid'] || $GLOBALS['BE_USER']->isAdmin() ? '&return_id=' . $uid . '&edit=1' : '');
-               return $this->linkItem($GLOBALS['LANG']->makeEntities($GLOBALS['LANG']->getLL('CM_perms')), $this->excludeIcon(\TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('status-status-locked')), $this->urlRefForCM($url), 0);
+               $url = ExtensionManagementUtility::extRelPath('perm') . 'mod1/index.php?id=' . $uid . ($rec['perms_userid'] == $GLOBALS['BE_USER']->user['uid'] || $GLOBALS['BE_USER']->isAdmin() ? '&return_id=' . $uid . '&edit=1' : '');
+               return $this->linkItem($GLOBALS['LANG']->makeEntities($GLOBALS['LANG']->getLL('CM_perms')), $this->excludeIcon(IconUtility::getSpriteIcon('status-status-locked')), $this->urlRefForCM($url), 0);
        }
 
        /**
@@ -502,8 +505,8 @@ class ClickMenu {
                $urlParams = array();
                $urlParams['id'] = $table == 'pages' ? $uid : $rec['pid'];
                $urlParams['table'] = $table == 'pages' ? '' : $table;
-               $url = \TYPO3\CMS\Backend\Utility\BackendUtility::getModuleUrl('web_list', $urlParams, '', TRUE);
-               return $this->linkItem($GLOBALS['LANG']->makeEntities($GLOBALS['LANG']->getLL('CM_db_list')), $this->excludeIcon(\TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-system-list-open')), 'top.nextLoadModuleUrl=\'' . $url . '\';top.goToModule(\'web_list\', 1);', 0);
+               $url = BackendUtility::getModuleUrl('web_list', $urlParams, '', TRUE);
+               return $this->linkItem($GLOBALS['LANG']->makeEntities($GLOBALS['LANG']->getLL('CM_db_list')), $this->excludeIcon(IconUtility::getSpriteIcon('actions-system-list-open')), 'top.nextLoadModuleUrl=\'' . $url . '\';top.goToModule(\'web_list\', 1);', 0);
        }
 
        /**
@@ -519,7 +522,7 @@ class ClickMenu {
        public function DB_moveWizard($table, $uid, $rec) {
                // Hardcoded field for tt_content elements.
                $url = 'move_el.php?table=' . $table . '&uid=' . $uid . ($table == 'tt_content' ? '&sys_language_uid=' . intval($rec['sys_language_uid']) : '');
-               return $this->linkItem($GLOBALS['LANG']->makeEntities($GLOBALS['LANG']->getLL('CM_moveWizard' . ($table == 'pages' ? '_page' : ''))), $this->excludeIcon(\TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-' . ($table === 'pages' ? 'page' : 'document') . '-move')), $this->urlRefForCM($url, 'returnUrl'), 0);
+               return $this->linkItem($GLOBALS['LANG']->makeEntities($GLOBALS['LANG']->getLL('CM_moveWizard' . ($table == 'pages' ? '_page' : ''))), $this->excludeIcon(IconUtility::getSpriteIcon('actions-' . ($table === 'pages' ? 'page' : 'document') . '-move')), $this->urlRefForCM($url, 'returnUrl'), 0);
        }
 
        /**
@@ -534,11 +537,11 @@ class ClickMenu {
         */
        public function DB_newWizard($table, $uid, $rec) {
                //  If mod.web_list.newContentWiz.overrideWithExtension is set, use that extension's create new content wizard instead:
-               $tmpTSc = \TYPO3\CMS\Backend\Utility\BackendUtility::getModTSconfig($this->pageinfo['uid'], 'mod.web_list');
+               $tmpTSc = BackendUtility::getModTSconfig($this->pageinfo['uid'], 'mod.web_list');
                $tmpTSc = $tmpTSc['properties']['newContentWiz.']['overrideWithExtension'];
-               $newContentWizScriptPath = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded($tmpTSc) ? \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath($tmpTSc) . 'mod1/db_new_content_el.php' : 'sysext/cms/layout/db_new_content_el.php';
-               $url = $table == 'pages' || !\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('cms') ? 'db_new.php?id=' . $uid . '&pagesOnly=1' : $newContentWizScriptPath . '?id=' . $rec['pid'] . '&sys_language_uid=' . intval($rec['sys_language_uid']);
-               return $this->linkItem($GLOBALS['LANG']->makeEntities($GLOBALS['LANG']->getLL('CM_newWizard')), $this->excludeIcon(\TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-' . ($table === 'pages' ? 'page' : 'document') . '-new')), $this->urlRefForCM($url, 'returnUrl'), 0);
+               $newContentWizScriptPath = ExtensionManagementUtility::isLoaded($tmpTSc) ? ExtensionManagementUtility::extRelPath($tmpTSc) . 'mod1/db_new_content_el.php' : 'sysext/cms/layout/db_new_content_el.php';
+               $url = $table == 'pages' || !ExtensionManagementUtility::isLoaded('cms') ? 'db_new.php?id=' . $uid . '&pagesOnly=1' : $newContentWizScriptPath . '?id=' . $rec['pid'] . '&sys_language_uid=' . intval($rec['sys_language_uid']);
+               return $this->linkItem($GLOBALS['LANG']->makeEntities($GLOBALS['LANG']->getLL('CM_newWizard')), $this->excludeIcon(IconUtility::getSpriteIcon('actions-' . ($table === 'pages' ? 'page' : 'document') . '-new')), $this->urlRefForCM($url, 'returnUrl'), 0);
        }
 
        /**
@@ -553,7 +556,7 @@ class ClickMenu {
        public function DB_editAccess($table, $uid) {
                $addParam = '&columnsOnly=' . rawurlencode((implode(',', $GLOBALS['TCA'][$table]['ctrl']['enablecolumns']) . ($table == 'pages' ? ',extendToSubpages' : '')));
                $url = 'alt_doc.php?edit[' . $table . '][' . $uid . ']=edit' . $addParam;
-               return $this->linkItem($GLOBALS['LANG']->makeEntities($GLOBALS['LANG']->getLL('CM_editAccess')), $this->excludeIcon(\TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-document-edit-access')), $this->urlRefForCM($url, 'returnUrl'), 1);
+               return $this->linkItem($GLOBALS['LANG']->makeEntities($GLOBALS['LANG']->getLL('CM_editAccess')), $this->excludeIcon(IconUtility::getSpriteIcon('actions-document-edit-access')), $this->urlRefForCM($url, 'returnUrl'), 1);
        }
 
        /**
@@ -566,7 +569,7 @@ class ClickMenu {
         */
        public function DB_editPageProperties($uid) {
                $url = 'alt_doc.php?edit[pages][' . $uid . ']=edit';
-               return $this->linkItem($GLOBALS['LANG']->makeEntities($GLOBALS['LANG']->getLL('CM_editPageProperties')), $this->excludeIcon(\TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-page-open')), $this->urlRefForCM($url, 'returnUrl'), 1);
+               return $this->linkItem($GLOBALS['LANG']->makeEntities($GLOBALS['LANG']->getLL('CM_editPageProperties')), $this->excludeIcon(IconUtility::getSpriteIcon('actions-page-open')), $this->urlRefForCM($url, 'returnUrl'), 1);
        }
 
        /**
@@ -581,7 +584,7 @@ class ClickMenu {
        public function DB_edit($table, $uid) {
                // If another module was specified, replace the default Page module with the new one
                $newPageModule = trim($GLOBALS['BE_USER']->getTSConfigVal('options.overridePageModule'));
-               $pageModule = \TYPO3\CMS\Backend\Utility\BackendUtility::isModuleSetInTBE_MODULES($newPageModule) ? $newPageModule : 'web_layout';
+               $pageModule = BackendUtility::isModuleSetInTBE_MODULES($newPageModule) ? $newPageModule : 'web_layout';
                $editOnClick = '';
                $loc = 'top.content.list_frame';
                $addParam = '';
@@ -589,7 +592,7 @@ class ClickMenu {
                if ($this->iParts[0] == 'pages' && $this->iParts[1] && $GLOBALS['BE_USER']->check('modules', $pageModule)) {
                        $theIcon = 'actions-page-open';
                        $this->editPageIconSet = 1;
-                       if ($GLOBALS['BE_USER']->uc['classicPageEditMode'] || !\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('cms')) {
+                       if ($GLOBALS['BE_USER']->uc['classicPageEditMode'] || !ExtensionManagementUtility::isLoaded('cms')) {
                                $addParam = '&editRegularContentFromId=' . intval($this->iParts[1]);
                        } else {
                                $editOnClick = 'if(' . $loc . '){' . $loc . '.location.href=top.TS.PATH_typo3+\'alt_doc.php?returnUrl=\'+top.rawurlencode(' . $this->frameLocation(($loc . '.document')) . '.pathname+' . $this->frameLocation(($loc . '.document')) . '.search)+\'&edit[' . $table . '][' . $uid . ']=edit' . $addParam . '\';}';
@@ -598,7 +601,7 @@ class ClickMenu {
                if (!$editOnClick) {
                        $editOnClick = 'if(' . $loc . '){' . $loc . '.location.href=top.TS.PATH_typo3+\'alt_doc.php?returnUrl=\'+top.rawurlencode(' . $this->frameLocation(($loc . '.document')) . '.pathname+' . $this->frameLocation(($loc . '.document')) . '.search)+\'&edit[' . $table . '][' . $uid . ']=edit' . $addParam . '\';}';
                }
-               return $this->linkItem($this->label('edit'), $this->excludeIcon(\TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon($theIcon)), $editOnClick . 'return hideCM();');
+               return $this->linkItem($this->label('edit'), $this->excludeIcon(IconUtility::getSpriteIcon($theIcon)), $editOnClick . 'return hideCM();');
        }
 
        /**
@@ -614,7 +617,7 @@ class ClickMenu {
                $editOnClick = '';
                $loc = 'top.content.list_frame';
                $editOnClick = 'if(' . $loc . '){' . $loc . '.location.href=top.TS.PATH_typo3+\'' . ($this->listFrame ? 'alt_doc.php?returnUrl=\'+top.rawurlencode(' . $this->frameLocation(($loc . '.document')) . '.pathname+' . $this->frameLocation(($loc . '.document')) . '.search)+\'&edit[' . $table . '][-' . $uid . ']=new\'' : 'db_new.php?id=' . intval($uid) . '\'') . ';}';
-               return $this->linkItem($this->label('new'), $this->excludeIcon(\TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-' . ($table === 'pages' ? 'page' : 'document') . '-new')), $editOnClick . 'return hideCM();');
+               return $this->linkItem($this->label('new'), $this->excludeIcon(IconUtility::getSpriteIcon('actions-' . ($table === 'pages' ? 'page' : 'document') . '-new')), $editOnClick . 'return hideCM();');
        }
 
        /**
@@ -631,12 +634,12 @@ class ClickMenu {
                $editOnClick = '';
                $loc = 'top.content.list_frame';
                if ($GLOBALS['BE_USER']->jsConfirmation(4)) {
-                       $conf = 'confirm(' . $GLOBALS['LANG']->JScharCode((sprintf($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:mess.delete'), $elInfo[0]) . \TYPO3\CMS\Backend\Utility\BackendUtility::referenceCount($table, $uid, ' (There are %s reference(s) to this record!)') . \TYPO3\CMS\Backend\Utility\BackendUtility::translationCount($table, $uid, (' ' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:labels.translationsOfRecord'))))) . ')';
+                       $conf = 'confirm(' . $GLOBALS['LANG']->JScharCode((sprintf($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:mess.delete'), $elInfo[0]) . BackendUtility::referenceCount($table, $uid, ' (There are %s reference(s) to this record!)') . BackendUtility::translationCount($table, $uid, (' ' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:labels.translationsOfRecord'))))) . ')';
                } else {
                        $conf = '1==1';
                }
-               $editOnClick = 'if(' . $loc . ' && ' . $conf . ' ){' . $loc . '.location.href=top.TS.PATH_typo3+\'tce_db.php?redirect=\'+top.rawurlencode(' . $this->frameLocation(($loc . '.document')) . '.pathname+' . $this->frameLocation(($loc . '.document')) . '.search)+\'' . '&cmd[' . $table . '][' . $uid . '][delete]=1&prErr=1&vC=' . $GLOBALS['BE_USER']->veriCode() . \TYPO3\CMS\Backend\Utility\BackendUtility::getUrlToken('tceAction') . '\';}hideCM();top.nav.refresh.defer(500, top.nav);';
-               return $this->linkItem($this->label('delete'), $this->excludeIcon(\TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-edit-delete')), $editOnClick . 'return false;');
+               $editOnClick = 'if(' . $loc . ' && ' . $conf . ' ){' . $loc . '.location.href=top.TS.PATH_typo3+\'tce_db.php?redirect=\'+top.rawurlencode(' . $this->frameLocation(($loc . '.document')) . '.pathname+' . $this->frameLocation(($loc . '.document')) . '.search)+\'' . '&cmd[' . $table . '][' . $uid . '][delete]=1&prErr=1&vC=' . $GLOBALS['BE_USER']->veriCode() . BackendUtility::getUrlToken('tceAction') . '\';}hideCM();top.nav.refresh.defer(500, top.nav);';
+               return $this->linkItem($this->label('delete'), $this->excludeIcon(IconUtility::getSpriteIcon('actions-edit-delete')), $editOnClick . 'return false;');
        }
 
        /**
@@ -649,7 +652,7 @@ class ClickMenu {
         * @todo Define visibility
         */
        public function DB_view($id, $anchor = '') {
-               return $this->linkItem($this->label('view'), $this->excludeIcon(\TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-document-view')), \TYPO3\CMS\Backend\Utility\BackendUtility::viewOnClick($id, $this->PH_backPath, \TYPO3\CMS\Backend\Utility\BackendUtility::BEgetRootLine($id), $anchor) . 'return hideCM();');
+               return $this->linkItem($this->label('view'), $this->excludeIcon(IconUtility::getSpriteIcon('actions-document-view')), BackendUtility::viewOnClick($id, $this->PH_backPath, BackendUtility::BEgetRootLine($id), $anchor) . 'return hideCM();');
        }
 
        /**
@@ -661,7 +664,7 @@ class ClickMenu {
         * @todo Define visibility
         */
        public function DB_tempMountPoint($page_id) {
-               return $this->linkItem($this->label('tempMountPoint'), $this->excludeIcon(\TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('apps-pagetree-page-mountpoint')), 'if (top.content.nav_frame) {
+               return $this->linkItem($this->label('tempMountPoint'), $this->excludeIcon(IconUtility::getSpriteIcon('apps-pagetree-page-mountpoint')), 'if (top.content.nav_frame) {
                                var node = top.TYPO3.Backend.NavigationContainer.PageTree.getSelected();
                                if (node === null) {
                                        return false;
@@ -711,8 +714,8 @@ class ClickMenu {
                $uid = $rec['_ORIG_uid'] ? $rec['_ORIG_uid'] : $rec['uid'];
                $editOnClick = '';
                $loc = 'top.content.list_frame';
-               $editOnClick = 'if(' . $loc . '){' . $loc . '.location.href=top.TS.PATH_typo3+\'tce_db.php?redirect=\'' . '+top.rawurlencode(' . $this->frameLocation(($loc . '.document')) . '.pathname+' . $this->frameLocation(($loc . '.document')) . '.search)+\'' . '&data[' . $table . '][' . $uid . '][' . $flagField . ']=' . ($rec[$flagField] ? 0 : 1) . '&prErr=1&vC=' . $GLOBALS['BE_USER']->veriCode() . \TYPO3\CMS\Backend\Utility\BackendUtility::getUrlToken('tceAction') . '\';}hideCM();top.nav.refresh.defer(500, top.nav);';
-               return $this->linkItem($title, $this->excludeIcon(\TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-edit-' . ($rec[$flagField] ? 'un' : '') . 'hide')), $editOnClick . 'return false;', 1);
+               $editOnClick = 'if(' . $loc . '){' . $loc . '.location.href=top.TS.PATH_typo3+\'tce_db.php?redirect=\'' . '+top.rawurlencode(' . $this->frameLocation(($loc . '.document')) . '.pathname+' . $this->frameLocation(($loc . '.document')) . '.search)+\'' . '&data[' . $table . '][' . $uid . '][' . $flagField . ']=' . ($rec[$flagField] ? 0 : 1) . '&prErr=1&vC=' . $GLOBALS['BE_USER']->veriCode() . BackendUtility::getUrlToken('tceAction') . '\';}hideCM();top.nav.refresh.defer(500, top.nav);';
+               return $this->linkItem($title, $this->excludeIcon(IconUtility::getSpriteIcon('actions-edit-' . ($rec[$flagField] ? 'un' : '') . 'hide')), $editOnClick . 'return false;', 1);
        }
 
        /***************************************
@@ -731,7 +734,7 @@ class ClickMenu {
        public function printFileClickMenu($combinedIdentifier) {
                $menuItems = array();
                $combinedIdentifier = rawurldecode($combinedIdentifier);
-               $fileObject = \TYPO3\CMS\Core\Resource\ResourceFactory::getInstance()
+               $fileObject = ResourceFactory::getInstance()
                                ->retrieveFileOrFolderObject($combinedIdentifier);
                if ($fileObject) {
                        $folder = FALSE;
@@ -741,7 +744,7 @@ class ClickMenu {
                        $userMayEditStorage = FALSE;
                        $identifier = $fileObject->getCombinedIdentifier();
                        if ($fileObject instanceof \TYPO3\CMS\Core\Resource\Folder) {
-                               $icon = \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIconForFile('folder', array(
+                               $icon = IconUtility::getSpriteIconForFile('folder', array(
                                        'class' => 'absmiddle',
                                        'title' => htmlspecialchars($fileObject->getName())
                                ));
@@ -759,7 +762,7 @@ class ClickMenu {
                                        $isOnline = FALSE;
                                }
                        } else {
-                               $icon = \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIconForFile($fileObject->getExtension(), array(
+                               $icon = IconUtility::getSpriteIconForFile($fileObject->getExtension(), array(
                                        'class' => 'absmiddle',
                                        'title' => htmlspecialchars($fileObject->getName() . ' (' . GeneralUtility::formatSize($fileObject->getSize()) . ')')
                                ));
@@ -869,7 +872,7 @@ class ClickMenu {
        public function FILE_launch($path, $script, $type, $image, $noReturnUrl = FALSE) {
                $loc = 'top.content.list_frame';
                $editOnClick = 'if(' . $loc . '){' . $loc . '.location.href=top.TS.PATH_typo3+\'' . $script . '?target=' . rawurlencode($path) . ($noReturnUrl ? '\'' : '&returnUrl=\'+top.rawurlencode(' . $this->frameLocation(($loc . '.document')) . '.pathname+' . $this->frameLocation(($loc . '.document')) . '.search)') . ';}';
-               return $this->linkItem($this->label($type), $this->excludeIcon('<img' . \TYPO3\CMS\Backend\Utility\IconUtility::skinImg($this->PH_backPath, ('gfx/' . $image), 'width="12" height="12"') . ' alt="" />'), $editOnClick . 'top.nav.refresh();return hideCM();');
+               return $this->linkItem($this->label($type), $this->excludeIcon('<img' . IconUtility::skinImg($this->PH_backPath, ('gfx/' . $image), 'width="12" height="12"') . ' alt="" />'), $editOnClick . 'top.nav.refresh();return hideCM();');
        }
 
        /**
@@ -907,7 +910,7 @@ class ClickMenu {
                if ($this->listFrame) {
                        $addParam['reloadListFrame'] = $this->alwaysContentFrame ? 2 : 1;
                }
-               return $this->linkItem($this->label($type), $this->excludeIcon(\TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-edit-' . $type . ($isSel === $type ? '-release' : ''))), 'top.loadTopMenu(\'' . $this->clipObj->selUrlFile($path, ($type == 'copy' ? 1 : 0), ($isSel == $type), $addParam) . '\');return false;');
+               return $this->linkItem($this->label($type), $this->excludeIcon(IconUtility::getSpriteIcon('actions-edit-' . $type . ($isSel === $type ? '-release' : ''))), 'top.loadTopMenu(\'' . $this->clipObj->selUrlFile($path, ($type == 'copy' ? 1 : 0), ($isSel == $type), $addParam) . '\');return false;');
        }
 
        /**
@@ -922,12 +925,12 @@ class ClickMenu {
                $editOnClick = '';
                $loc = 'top.content.list_frame';
                if ($GLOBALS['BE_USER']->jsConfirmation(4)) {
-                       $conf = 'confirm(' . $GLOBALS['LANG']->JScharCode((sprintf($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:mess.delete'), basename($path)) . \TYPO3\CMS\Backend\Utility\BackendUtility::referenceCount('_FILE', $path, ' (There are %s reference(s) to this file!)'))) . ')';
+                       $conf = 'confirm(' . $GLOBALS['LANG']->JScharCode((sprintf($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:mess.delete'), basename($path)) . BackendUtility::referenceCount('_FILE', $path, ' (There are %s reference(s) to this file!)'))) . ')';
                } else {
                        $conf = '1==1';
                }
                $editOnClick = 'if(' . $loc . ' && ' . $conf . ' ){' . $loc . '.location.href=top.TS.PATH_typo3+\'tce_file.php?redirect=\'+top.rawurlencode(' . $this->frameLocation(($loc . '.document')) . '.pathname+' . $this->frameLocation(($loc . '.document')) . '.search)+\'' . '&file[delete][0][data]=' . rawurlencode($path) . '&vC=' . $GLOBALS['BE_USER']->veriCode() . '\';}hideCM();';
-               return $this->linkItem($this->label('delete'), $this->excludeIcon(\TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-edit-delete')), $editOnClick . 'return false;');
+               return $this->linkItem($this->label('delete'), $this->excludeIcon(IconUtility::getSpriteIcon('actions-edit-delete')), $editOnClick . 'return false;');
        }
 
        /**
@@ -949,7 +952,7 @@ class ClickMenu {
                        $conf = $loc;
                }
                $editOnClick = 'if(' . $conf . '){' . $loc . '.location.href=top.TS.PATH_typo3+\'' . $this->clipObj->pasteUrl('_FILE', $path, 0) . '&redirect=\'+top.rawurlencode(' . $this->frameLocation(($loc . '.document')) . '.pathname+' . $this->frameLocation(($loc . '.document')) . '.search);  }hideCM();top.nav.refresh();';
-               return $this->linkItem($this->label('pasteinto'), $this->excludeIcon(\TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-document-paste-into')), $editOnClick . 'return false;');
+               return $this->linkItem($this->label('pasteinto'), $this->excludeIcon(IconUtility::getSpriteIcon('actions-document-paste-into')), $editOnClick . 'return false;');
        }
 
        /**
@@ -1002,7 +1005,7 @@ class ClickMenu {
                // Processing by external functions?
                $menuItems = $this->externalProcessingOfDBMenuItems($menuItems);
                // Return the printed elements:
-               return $this->printItems($menuItems, \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIconForRecord($table, $this->rec, array('title' => \TYPO3\CMS\Backend\Utility\BackendUtility::getRecordTitle($table, $this->rec, TRUE))));
+               return $this->printItems($menuItems, IconUtility::getSpriteIconForRecord($table, $this->rec, array('title' => BackendUtility::getRecordTitle($table, $this->rec, TRUE))));
        }
 
        /**
@@ -1031,8 +1034,8 @@ class ClickMenu {
                $negativeSign = $into == 'into' ? '' : '-';
                $editOnClick = '';
                $loc = 'top.content.list_frame';
-               $editOnClick = 'if(' . $loc . '){' . $loc . '.document.location=top.TS.PATH_typo3+"tce_db.php?redirect="+top.rawurlencode(' . $this->frameLocation(($loc . '.document')) . '.pathname+' . $this->frameLocation(($loc . '.document')) . '.search)+"' . '&cmd[pages][' . $srcUid . '][' . $action . ']=' . $negativeSign . $dstUid . '&prErr=1&vC=' . $GLOBALS['BE_USER']->veriCode() . \TYPO3\CMS\Backend\Utility\BackendUtility::getUrlToken('tceAction') . '";}hideCM();top.nav.refresh();';
-               return $this->linkItem($this->label($action . 'Page_' . $into), $this->excludeIcon(\TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-document-paste-' . $into)), $editOnClick . 'return false;', 0);
+               $editOnClick = 'if(' . $loc . '){' . $loc . '.document.location=top.TS.PATH_typo3+"tce_db.php?redirect="+top.rawurlencode(' . $this->frameLocation(($loc . '.document')) . '.pathname+' . $this->frameLocation(($loc . '.document')) . '.search)+"' . '&cmd[pages][' . $srcUid . '][' . $action . ']=' . $negativeSign . $dstUid . '&prErr=1&vC=' . $GLOBALS['BE_USER']->veriCode() . BackendUtility::getUrlToken('tceAction') . '";}hideCM();top.nav.refresh();';
+               return $this->linkItem($this->label($action . 'Page_' . $into), $this->excludeIcon(IconUtility::getSpriteIcon('actions-document-paste-' . $into)), $editOnClick . 'return false;', 0);
        }
 
        /**
@@ -1049,7 +1052,7 @@ class ClickMenu {
                $editOnClick = '';
                $loc = 'top.content.list_frame';
                $editOnClick = 'if(' . $loc . '){' . $loc . '.document.location=top.TS.PATH_typo3+"tce_file.php?redirect="+top.rawurlencode(' . $this->frameLocation(($loc . '.document')) . '.pathname+' . $this->frameLocation(($loc . '.document')) . '.search)+"' . '&file[' . $action . '][0][data]=' . $srcPath . '&file[' . $action . '][0][target]=' . $dstPath . '&prErr=1&vC=' . $GLOBALS['BE_USER']->veriCode() . '";}hideCM();top.nav.refresh();';
-               return $this->linkItem($this->label($action . 'Folder_into'), $this->excludeIcon(\TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('apps-pagetree-drag-move-into')), $editOnClick . 'return false;', 0);
+               return $this->linkItem($this->label($action . 'Folder_into'), $this->excludeIcon(IconUtility::getSpriteIcon('apps-pagetree-drag-move-into')), $editOnClick . 'return false;', 0);
        }
 
        /***************************************
@@ -1284,7 +1287,7 @@ class ClickMenu {
                        $onClick = str_replace('top.loadTopMenu', 'showClickmenu_raw', $onClick);
                }
                return array(
-                       \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('empty-empty', array(
+                       IconUtility::getSpriteIcon('empty-empty', array(
                                'class' => 'c-roimg',
                                'id' => ('roimg_' . $this->elCount)
                        )) . '<a href="#" onclick="' . htmlspecialchars($onClick) . '" onmouseover="mo(' . $this->elCount . ');" onmouseout="mout(' . $this->elCount . ');">' . $str . $icon . '</a>',
index 92d9076..9fa376b 100644 (file)
@@ -26,14 +26,14 @@ namespace TYPO3\CMS\Backend\Clipboard;
  *
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
-/**
- * Contains class for TYPO3 clipboard for records and files
- *
- * Revised for TYPO3 3.6 July/2003 by Kasper Skårhøj
- * XHTML compliant
- *
- * @author Kasper Skårhøj <kasperYYYY@typo3.com>
- */
+
+use TYPO3\CMS\Backend\Utility\BackendUtility;
+use TYPO3\CMS\Backend\Utility\IconUtility;
+use TYPO3\CMS\Core\Resource\ResourceFactory;
+use TYPO3\CMS\Core\Utility\GeneralUtility;
+use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
+use TYPO3\CMS\Core\Utility\MathUtility;
+
 /**
  * TYPO3 clipboard for records and files
  *
@@ -113,8 +113,8 @@ class Clipboard {
                $clipData = $GLOBALS['BE_USER']->getModuleData('clipboard', $GLOBALS['BE_USER']->getTSConfigVal('options.saveClipboard') ? '' : 'ses');
                // NumberTabs
                $clNP = $GLOBALS['BE_USER']->getTSConfigVal('options.clipboardNumberPads');
-               if (\TYPO3\CMS\Core\Utility\MathUtility::canBeInterpretedAsInteger($clNP) && $clNP >= 0) {
-                       $this->numberTabs = \TYPO3\CMS\Core\Utility\MathUtility::forceIntegerInRange($clNP, 0, 20);
+               if (MathUtility::canBeInterpretedAsInteger($clNP) && $clNP >= 0) {
+                       $this->numberTabs = MathUtility::forceIntegerInRange($clNP, 0, 20);
                }
                // Resets/reinstates the clipboard pads
                $this->clipData['normal'] = is_array($clipData['normal']) ? $clipData['normal'] : array();
@@ -265,25 +265,25 @@ class Clipboard {
                // Upper header
                $out[] = '
                        <tr class="t3-row-header">
-                               <td colspan="3">' . \TYPO3\CMS\Backend\Utility\BackendUtility::wrapInHelp('xMOD_csh_corebe', 'list_clipboard', $this->clLabel('clipboard', 'buttons')) . '</td>
+                               <td colspan="3">' . BackendUtility::wrapInHelp('xMOD_csh_corebe', 'list_clipboard', $this->clLabel('clipboard', 'buttons')) . '</td>
                        </tr>';
                // Button/menu header:
-               $thumb_url = \TYPO3\CMS\Core\Utility\GeneralUtility::linkThisScript(array('CB' => array('setThumb' => $this->clipData['_setThumb'] ? 0 : 1)));
-               $rmall_url = \TYPO3\CMS\Core\Utility\GeneralUtility::linkThisScript(array('CB' => array('removeAll' => $this->current)));
+               $thumb_url = GeneralUtility::linkThisScript(array('CB' => array('setThumb' => $this->clipData['_setThumb'] ? 0 : 1)));
+               $rmall_url = GeneralUtility::linkThisScript(array('CB' => array('removeAll' => $this->current)));
                // Copymode Selector menu
-               $copymode_url = \TYPO3\CMS\Core\Utility\GeneralUtility::linkThisScript();
+               $copymode_url = GeneralUtility::linkThisScript();
                $moveLabel = htmlspecialchars($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_misc.xlf:moveElements'));
                $copyLabel = htmlspecialchars($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_misc.xlf:copyElements'));
                $opt = array();
-               $opt[] = '<option style="padding-left: 20px; background-image: url(\'' . \TYPO3\CMS\Backend\Utility\IconUtility::skinImg($this->backPath, 'gfx/clip_cut.gif', '', 1) . '\'); background-repeat: no-repeat;" value="" ' . ($this->currentMode() == 'copy' ? '' : 'selected="selected"') . '>' . $moveLabel . '</option>';
-               $opt[] = '<option style="padding-left: 20px; background-image: url(\'' . \TYPO3\CMS\Backend\Utility\IconUtility::skinImg($this->backPath, 'gfx/clip_copy.gif', '', 1) . '\'); background-repeat: no-repeat;" value="1" ' . ($this->currentMode() == 'copy' ? 'selected="selected"' : '') . '>' . $copyLabel . '</option>';
+               $opt[] = '<option style="padding-left: 20px; background-image: url(\'' . IconUtility::skinImg($this->backPath, 'gfx/clip_cut.gif', '', 1) . '\'); background-repeat: no-repeat;" value="" ' . ($this->currentMode() == 'copy' ? '' : 'selected="selected"') . '>' . $moveLabel . '</option>';
+               $opt[] = '<option style="padding-left: 20px; background-image: url(\'' . IconUtility::skinImg($this->backPath, 'gfx/clip_copy.gif', '', 1) . '\'); background-repeat: no-repeat;" value="1" ' . ($this->currentMode() == 'copy' ? 'selected="selected"' : '') . '>' . $copyLabel . '</option>';
                $copymode_selector = ' <select name="CB[setCopyMode]" onchange="this.form.method=\'POST\'; this.form.action=\'' . htmlspecialchars(($copymode_url . '&CB[setCopyMode]=')) . '\'+(this.options[this.selectedIndex].value); this.form.submit(); return true;" >' . implode('', $opt) . '</select>';
                // Selector menu + clear button
                $opt = array();
                $opt[] = '<option value="" selected="selected">' . $this->clLabel('menu', 'rm') . '</option>';
                // Import / Export link:
-               if ($elCount && \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('impexp')) {
-                       $opt[] = '<option value="' . htmlspecialchars(('window.location.href=\'' . $this->backPath . \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('impexp') . 'app/index.php' . $this->exportClipElementParameters() . '\';')) . '">' . $this->clLabel('export', 'rm') . '</option>';
+               if ($elCount && ExtensionManagementUtility::isLoaded('impexp')) {
+                       $opt[] = '<option value="' . htmlspecialchars(('window.location.href=\'' . $this->backPath . ExtensionManagementUtility::extRelPath('impexp') . 'app/index.php' . $this->exportClipElementParameters() . '\';')) . '">' . $this->clLabel('export', 'rm') . '</option>';
                }
                // Edit:
                if (!$this->fileMode && $elCount) {
@@ -305,14 +305,14 @@ class Clipboard {
                $selector_menu = '<select name="_clipMenu" onchange="eval(this.options[this.selectedIndex].value);this.selectedIndex=0;">' . implode('', $opt) . '</select>';
                $out[] = '
                        <tr class="typo3-clipboard-head">
-                               <td nowrap="nowrap">' . '<a href="' . htmlspecialchars($thumb_url) . '#clip_head">' . '<img' . \TYPO3\CMS\Backend\Utility\IconUtility::skinImg($this->backPath, ('gfx/thumb_' . ($this->clipData['_setThumb'] ? 's' : 'n') . '.gif'), 'width="21" height="16"') . ' vspace="2" border="0" title="' . $this->clLabel('thumbmode_clip') . '" alt="" />' . '</a>' . '</td>
+                               <td nowrap="nowrap">' . '<a href="' . htmlspecialchars($thumb_url) . '#clip_head">' . '<img' . IconUtility::skinImg($this->backPath, ('gfx/thumb_' . ($this->clipData['_setThumb'] ? 's' : 'n') . '.gif'), 'width="21" height="16"') . ' vspace="2" border="0" title="' . $this->clLabel('thumbmode_clip') . '" alt="" />' . '</a>' . '</td>
                                <td width="95%" nowrap="nowrap">' . $copymode_selector . ' ' . $selector_menu . '</td>
-                               <td>' . '<a href="' . htmlspecialchars($rmall_url) . '#clip_head">' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-document-close', array('title' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:buttons.clear', TRUE))) . '</a></td>
+                               <td>' . '<a href="' . htmlspecialchars($rmall_url) . '#clip_head">' . IconUtility::getSpriteIcon('actions-document-close', array('title' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:buttons.clear', TRUE))) . '</a></td>
                        </tr>';
                // Print header and content for the NORMAL tab:
                $out[] = '
                        <tr class="bgColor5">
-                               <td colspan="3"><a href="' . htmlspecialchars(\TYPO3\CMS\Core\Utility\GeneralUtility::linkThisScript(array('CB' => array('setP' => 'normal')))) . '#clip_head">' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon(('actions-view-table-' . ($this->current == 'normal' ? 'collapse' : 'expand'))) . $this->padTitleWrap('Normal', 'normal') . '</a></td>
+                               <td colspan="3"><a href="' . htmlspecialchars(GeneralUtility::linkThisScript(array('CB' => array('setP' => 'normal')))) . '#clip_head">' . IconUtility::getSpriteIcon(('actions-view-table-' . ($this->current == 'normal' ? 'collapse' : 'expand'))) . $this->padTitleWrap('Normal', 'normal') . '</a></td>
                        </tr>';
                if ($this->current == 'normal') {
                        $out = array_merge($out, $this->printContentFromTab('normal'));
@@ -321,7 +321,7 @@ class Clipboard {
                for ($a = 1; $a <= $this->numberTabs; $a++) {
                        $out[] = '
                                <tr class="bgColor5">
-                                       <td colspan="3"><a href="' . htmlspecialchars(\TYPO3\CMS\Core\Utility\GeneralUtility::linkThisScript(array('CB' => array('setP' => ('tab_' . $a))))) . '#clip_head">' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon(('actions-view-table-' . ($this->current == 'tab_' . $a ? 'collapse' : 'expand'))) . $this->padTitleWrap(($this->clLabel('cliptabs') . $a), ('tab_' . $a)) . '</a></td>
+                                       <td colspan="3"><a href="' . htmlspecialchars(GeneralUtility::linkThisScript(array('CB' => array('setP' => ('tab_' . $a))))) . '#clip_head">' . IconUtility::getSpriteIcon(('actions-view-table-' . ($this->current == 'tab_' . $a ? 'collapse' : 'expand'))) . $this->padTitleWrap(($this->clLabel('cliptabs') . $a), ('tab_' . $a)) . '</a></td>
                                </tr>';
                        if ($this->current == 'tab_' . $a) {
                                $out = array_merge($out, $this->printContentFromTab('tab_' . $a));
@@ -359,20 +359,20 @@ class Clipboard {
                                        $bgColClass = $table == '_FILE' && $this->fileMode || $table != '_FILE' && !$this->fileMode ? 'bgColor4-20' : 'bgColor4';
                                        // Rendering files/directories on the clipboard
                                        if ($table == '_FILE') {
-                                               $fileObject = \TYPO3\CMS\Core\Resource\ResourceFactory::getInstance()->retrieveFileOrFolderObject($v);
+                                               $fileObject = ResourceFactory::getInstance()->retrieveFileOrFolderObject($v);
                                                if ($fileObject) {
                                                        $thumb = '';
                                                        $folder = $fileObject instanceof \TYPO3\CMS\Core\Resource\Folder;
-                                                       $size = $folder ? '' : '(' . \TYPO3\CMS\Core\Utility\GeneralUtility::formatSize($fileObject->getSize()) . 'bytes)';
-                                                       $icon = \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIconForFile($folder ? 'folder' : strtolower($fileObject->getExtension()), array('style' => 'margin: 0 20px;', 'title' => $fileObject->getName() . ' ' . $size));
-                                                       if ($this->clipData['_setThumb'] && \TYPO3\CMS\Core\Utility\GeneralUtility::inList($GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'], $fileObject->getExtension())) {
-                                                               $thumb = '<br />' . \TYPO3\CMS\Backend\Utility\BackendUtility::getThumbNail(($this->backPath . 'thumbs.php'), $v, ' vspace="4"');
+                                                       $size = $folder ? '' : '(' . GeneralUtility::formatSize($fileObject->getSize()) . 'bytes)';
+                                                       $icon = IconUtility::getSpriteIconForFile($folder ? 'folder' : strtolower($fileObject->getExtension()), array('style' => 'margin: 0 20px;', 'title' => $fileObject->getName() . ' ' . $size));
+                                                       if ($this->clipData['_setThumb'] && GeneralUtility::inList($GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'], $fileObject->getExtension())) {
+                                                               $thumb = '<br />' . BackendUtility::getThumbNail(($this->backPath . 'thumbs.php'), $v, ' vspace="4"');
                                                        }
                                                        $lines[] = '
                                                                <tr>
                                                                        <td class="' . $bgColClass . '">' . $icon . '</td>
-                                                                       <td class="' . $bgColClass . '" nowrap="nowrap" width="95%">&nbsp;' . $this->linkItemText(htmlspecialchars(\TYPO3\CMS\Core\Utility\GeneralUtility::fixed_lgd_cs($fileObject->getName(), $GLOBALS['BE_USER']->uc['titleLen'])), $fileObject->getName()) . ($pad == 'normal' ? ' <strong>(' . ($this->clipData['normal']['mode'] == 'copy' ? $this->clLabel('copy', 'cm') : $this->clLabel('cut', 'cm')) . ')</strong>' : '') . '&nbsp;' . $thumb . '</td>
-                                                                       <td class="' . $bgColClass . '" align="center" nowrap="nowrap">' . '<a href="#" onclick="' . htmlspecialchars(('top.launchView(\'' . $table . '\', \'' . $v . '\'); return false;')) . '">' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-document-info', array('title' => $this->clLabel('info', 'cm'))) . '</a>' . '<a href="' . htmlspecialchars($this->removeUrl('_FILE', \TYPO3\CMS\Core\Utility\GeneralUtility::shortmd5($v))) . '#clip_head">' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-selection-delete', array('title' => $this->clLabel('removeItem'))) . '</a>' . '</td>
+                                                                       <td class="' . $bgColClass . '" nowrap="nowrap" width="95%">&nbsp;' . $this->linkItemText(htmlspecialchars(GeneralUtility::fixed_lgd_cs($fileObject->getName(), $GLOBALS['BE_USER']->uc['titleLen'])), $fileObject->getName()) . ($pad == 'normal' ? ' <strong>(' . ($this->clipData['normal']['mode'] == 'copy' ? $this->clLabel('copy', 'cm') : $this->clLabel('cut', 'cm')) . ')</strong>' : '') . '&nbsp;' . $thumb . '</td>
+                                                                       <td class="' . $bgColClass . '" align="center" nowrap="nowrap">' . '<a href="#" onclick="' . htmlspecialchars(('top.launchView(\'' . $table . '\', \'' . $v . '\'); return false;')) . '">' . IconUtility::getSpriteIcon('actions-document-info', array('title' => $this->clLabel('info', 'cm'))) . '</a>' . '<a href="' . htmlspecialchars($this->removeUrl('_FILE', GeneralUtility::shortmd5($v))) . '#clip_head">' . IconUtility::getSpriteIcon('actions-selection-delete', array('title' => $this->clLabel('removeItem'))) . '</a>' . '</td>
                                                                </tr>';
                                                } else {
                                                        // If the file did not exist (or is illegal) then it is removed from the clipboard immediately:
@@ -381,13 +381,13 @@ class Clipboard {
                                                }
                                        } else {
                                                // Rendering records:
-                                               $rec = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecordWSOL($table, $uid);
+                                               $rec = BackendUtility::getRecordWSOL($table, $uid);
                                                if (is_array($rec)) {
                                                        $lines[] = '
                                                                <tr>
-                                                                       <td class="' . $bgColClass . '">' . $this->linkItemText(\TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIconForRecord($table, $rec, array('style' => 'margin: 0 20px;', 'title' => htmlspecialchars(\TYPO3\CMS\Backend\Utility\BackendUtility::getRecordIconAltText($rec, $table)))), $rec, $table) . '</td>
-                                                                       <td class="' . $bgColClass . '" nowrap="nowrap" width="95%">&nbsp;' . $this->linkItemText(htmlspecialchars(\TYPO3\CMS\Core\Utility\GeneralUtility::fixed_lgd_cs(\TYPO3\CMS\Backend\Utility\BackendUtility::getRecordTitle($table, $rec), $GLOBALS['BE_USER']->uc['titleLen'])), $rec, $table) . ($pad == 'normal' ? ' <strong>(' . ($this->clipData['normal']['mode'] == 'copy' ? $this->clLabel('copy', 'cm') : $this->clLabel('cut', 'cm')) . ')</strong>' : '') . '&nbsp;</td>
-                                                                       <td class="' . $bgColClass . '" align="center" nowrap="nowrap">' . '<a href="#" onclick="' . htmlspecialchars(('top.launchView(\'' . $table . '\', \'' . intval($uid) . '\'); return false;')) . '">' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-document-info', array('title' => $this->clLabel('info', 'cm'))) . '</a>' . '<a href="' . htmlspecialchars($this->removeUrl($table, $uid)) . '#clip_head">' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-selection-delete', array('title' => $this->clLabel('removeItem'))) . '</a>' . '</td>
+                                                                       <td class="' . $bgColClass . '">' . $this->linkItemText(IconUtility::getSpriteIconForRecord($table, $rec, array('style' => 'margin: 0 20px;', 'title' => htmlspecialchars(BackendUtility::getRecordIconAltText($rec, $table)))), $rec, $table) . '</td>
+                                                                       <td class="' . $bgColClass . '" nowrap="nowrap" width="95%">&nbsp;' . $this->linkItemText(htmlspecialchars(GeneralUtility::fixed_lgd_cs(BackendUtility::getRecordTitle($table, $rec), $GLOBALS['BE_USER']->uc['titleLen'])), $rec, $table) . ($pad == 'normal' ? ' <strong>(' . ($this->clipData['normal']['mode'] == 'copy' ? $this->clLabel('copy', 'cm') : $this->clLabel('cut', 'cm')) . ')</strong>' : '') . '&nbsp;</td>
+                                                                       <td class="' . $bgColClass . '" align="center" nowrap="nowrap">' . '<a href="#" onclick="' . htmlspecialchars(('top.launchView(\'' . $table . '\', \'' . intval($uid) . '\'); return false;')) . '">' . IconUtility::getSpriteIcon('actions-document-info', array('title' => $this->clLabel('info', 'cm'))) . '</a>' . '<a href="' . htmlspecialchars($this->removeUrl($table, $uid)) . '#clip_head">' . IconUtility::getSpriteIcon('actions-selection-delete', array('title' => $this->clLabel('removeItem'))) . '</a>' . '</td>
                                                                </tr>';
                                                        $localizationData = $this->getLocalizations($table, $rec, $bgColClass, $pad);
                                                        if ($localizationData) {
@@ -425,7 +425,7 @@ class Clipboard {
        public function getLocalizations($table, $parentRec, $bgColClass, $pad) {
                $lines = array();
                $tcaCtrl = $GLOBALS['TCA'][$table]['ctrl'];
-               if ($table != 'pages' && \TYPO3\CMS\Backend\Utility\BackendUtility::isTableLocalizable($table) && !$tcaCtrl['transOrigPointerTable']) {
+               if ($table != 'pages' && BackendUtility::isTableLocalizable($table) && !$tcaCtrl['transOrigPointerTable']) {
                        $where = array();
                        $where[] = $tcaCtrl['transOrigPointerField'] . '=' . intval($parentRec['uid']);
                        $where[] = $tcaCtrl['languageField'] . '<>0';
@@ -445,8 +445,8 @@ class Clipboard {
                                foreach ($rows as $rec) {
                                        $lines[] = '
                                        <tr>
-                                               <td class="' . $bgColClass . '">' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIconForRecord($table, $rec, array('style' => 'margin-left: 38px;')) . '</td>
-                                               <td class="' . $bgColClass . '" nowrap="nowrap" width="95%">&nbsp;' . htmlspecialchars(\TYPO3\CMS\Core\Utility\GeneralUtility::fixed_lgd_cs(\TYPO3\CMS\Backend\Utility\BackendUtility::getRecordTitle($table, $rec), $GLOBALS['BE_USER']->uc['titleLen'])) . $modeData . '&nbsp;</td>
+                                               <td class="' . $bgColClass . '">' . IconUtility::getSpriteIconForRecord($table, $rec, array('style' => 'margin-left: 38px;')) . '</td>
+                                               <td class="' . $bgColClass . '" nowrap="nowrap" width="95%">&nbsp;' . htmlspecialchars(GeneralUtility::fixed_lgd_cs(BackendUtility::getRecordTitle($table, $rec), $GLOBALS['BE_USER']->uc['titleLen'])) . $modeData . '&nbsp;</td>
                                                <td class="' . $bgColClass . '" align="center" nowrap="nowrap">&nbsp;</td>
                                        </tr>';
                                }
@@ -486,16 +486,16 @@ class Clipboard {
                        if ($this->fileMode) {
                                $str = $GLOBALS['TBE_TEMPLATE']->dfw($str);
                        } else {
-                               if (\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('recordlist')) {
-                                       $str = '<a href="' . htmlspecialchars(\TYPO3\CMS\Backend\Utility\BackendUtility::getModuleUrl('web_list', array('id' => $rec['pid']), $this->backPath)) . '">' . $str . '</a>';
+                               if (ExtensionManagementUtility::isLoaded('recordlist')) {
+                                       $str = '<a href="' . htmlspecialchars(BackendUtility::getModuleUrl('web_list', array('id' => $rec['pid']), $this->backPath)) . '">' . $str . '</a>';
                                }
                        }
                } elseif (file_exists($rec)) {
                        if (!$this->fileMode) {
                                $str = $GLOBALS['TBE_TEMPLATE']->dfw($str);
                        } else {
-                               if (\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('filelist')) {
-                                       $str = '<a href="' . htmlspecialchars(($this->backPath . \TYPO3\CMS\Backend\Utility\BackendUtility::getModuleUrl('file_list') . '&id=' . dirname($rec))) . '">' . $str . '</a>';
+                               if (ExtensionManagementUtility::isLoaded('filelist')) {
+                                       $str = '<a href="' . htmlspecialchars(($this->backPath . BackendUtility::getModuleUrl('file_list') . '&id=' . dirname($rec))) . '">' . $str . '</a>';
                                }
                        }
                }
@@ -519,7 +519,7 @@ class Clipboard {
                        $CB['setCopyMode'] = 1;
                }
                $baseArray['CB'] = $CB;
-               return \TYPO3\CMS\Core\Utility\GeneralUtility::linkThisScript($baseArray);
+               return GeneralUtility::linkThisScript($baseArray);
        }
 
        /**
@@ -533,12 +533,12 @@ class Clipboard {
         * @todo Define visibility
         */
        public function selUrlFile($path, $copy = 0, $deselect = 0, $baseArray = array()) {
-               $CB = array('el' => array(rawurlencode('_FILE|' . \TYPO3\CMS\Core\Utility\GeneralUtility::shortmd5($path)) => $deselect ? '' : $path));
+               $CB = array('el' => array(rawurlencode('_FILE|' . GeneralUtility::shortmd5($path)) => $deselect ? '' : $path));
                if ($copy) {
                        $CB['setCopyMode'] = 1;
                }
                $baseArray['CB'] = $CB;
-               return \TYPO3\CMS\Core\Utility\GeneralUtility::linkThisScript($baseArray);
+               return GeneralUtility::linkThisScript($baseArray);
        }
 
        /**
@@ -553,7 +553,7 @@ class Clipboard {
         * @todo Define visibility
         */
        public function pasteUrl($table, $uid, $setRedirect = 1) {
-               $rU = $this->backPath . ($table == '_FILE' ? 'tce_file.php' : 'tce_db.php') . '?' . ($setRedirect ? 'redirect=' . rawurlencode(\TYPO3\CMS\Core\Utility\GeneralUtility::linkThisScript(array('CB' => ''))) : '') . '&vC=' . $GLOBALS['BE_USER']->veriCode() . '&prErr=1&uPT=1' . '&CB[paste]=' . rawurlencode(($table . '|' . $uid)) . '&CB[pad]=' . $this->current . \TYPO3\CMS\Backend\Utility\BackendUtility::getUrlToken('tceAction');
+               $rU = $this->backPath . ($table == '_FILE' ? 'tce_file.php' : 'tce_db.php') . '?' . ($setRedirect ? 'redirect=' . rawurlencode(GeneralUtility::linkThisScript(array('CB' => ''))) : '') . '&vC=' . $GLOBALS['BE_USER']->veriCode() . '&prErr=1&uPT=1' . '&CB[paste]=' . rawurlencode(($table . '|' . $uid)) . '&CB[pad]=' . $this->current . BackendUtility::getUrlToken('tceAction');
                return $rU;
        }
 
@@ -566,7 +566,7 @@ class Clipboard {
         * @todo Define visibility
         */
        public function deleteUrl($setRedirect = 1, $file = 0) {
-               $rU = $this->backPath . ($file ? 'tce_file.php' : 'tce_db.php') . '?' . ($setRedirect ? 'redirect=' . rawurlencode(\TYPO3\CMS\Core\Utility\GeneralUtility::linkThisScript(array('CB' => ''))) : '') . '&vC=' . $GLOBALS['BE_USER']->veriCode() . '&prErr=1&uPT=1' . '&CB[delete]=1' . '&CB[pad]=' . $this->current . \TYPO3\CMS\Backend\Utility\BackendUtility::getUrlToken('tceAction');
+               $rU = $this->backPath . ($file ? 'tce_file.php' : 'tce_db.php') . '?' . ($setRedirect ? 'redirect=' . rawurlencode(GeneralUtility::linkThisScript(array('CB' => ''))) : '') . '&vC=' . $GLOBALS['BE_USER']->veriCode() . '&prErr=1&uPT=1' . '&CB[delete]=1' . '&CB[pad]=' . $this->current . BackendUtility::getUrlToken('tceAction');
                return $rU;
        }
 
@@ -600,7 +600,7 @@ class Clipboard {
         * @todo Define visibility
         */
        public function removeUrl($table, $uid) {
-               return \TYPO3\CMS\Core\Utility\GeneralUtility::linkThisScript(array('CB' => array('remove' => $table . '|' . $uid)));
+               return GeneralUtility::linkThisScript(array('CB' => array('remove' => $table . '|' . $uid)));
        }
 
        /**
@@ -626,7 +626,7 @@ class Clipboard {
                                        $selRecTitle = count($clElements);
                                }
                        } else {
-                               $thisRecTitle = $table == 'pages' && !is_array($rec) ? $GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename'] : \TYPO3\CMS\Backend\Utility\BackendUtility::getRecordTitle($table, $rec);
+                               $thisRecTitle = $table == 'pages' && !is_array($rec) ? $GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename'] : BackendUtility::getRecordTitle($table, $rec);
                                if ($this->current == 'normal') {
                                        $selItem = $this->getSelectedRecord();
                                        $selRecTitle = $selItem['_RECORD_TITLE'];
@@ -635,7 +635,7 @@ class Clipboard {
                                }
                        }
                        // Message
-                       $conf = 'confirm(' . $GLOBALS['LANG']->JScharCode(sprintf($msg, \TYPO3\CMS\Core\Utility\GeneralUtility::fixed_lgd_cs($selRecTitle, 30), \TYPO3\CMS\Core\Utility\GeneralUtility::fixed_lgd_cs($thisRecTitle, 30))) . ')';
+                       $conf = 'confirm(' . $GLOBALS['LANG']->JScharCode(sprintf($msg, GeneralUtility::fixed_lgd_cs($selRecTitle, 30), GeneralUtility::fixed_lgd_cs($thisRecTitle, 30))) . ')';
                } else {
                        $conf = '';
                }
@@ -672,12 +672,12 @@ class Clipboard {
                                        list($table, $uid) = explode('|', $k);
                                        // Rendering files/directories on the clipboard
                                        if ($table == '_FILE') {
-                                               if (file_exists($v) && \TYPO3\CMS\Core\Utility\GeneralUtility::isAllowedAbsPath($v)) {
+                                               if (file_exists($v) && GeneralUtility::isAllowedAbsPath($v)) {
                                                        $params[] = 'tx_impexp[' . (is_dir($v) ? 'dir' : 'file') . '][]=' . rawurlencode($v);
                                                }
                                        } else {
                                                // Rendering records:
-                                               $rec = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecord($table, $uid);
+                                               $rec = BackendUtility::getRecord($table, $uid);
                                                if (is_array($rec)) {
                                                        $params[] = 'tx_impexp[record][]=' . rawurlencode(($table . ':' . $uid));
                                                }
@@ -739,7 +739,7 @@ class Clipboard {
                        foreach ($this->clipData[$this->current]['el'] as $k => $v) {
                                list($table, $uid) = explode('|', $k);
                                if ($table != '_FILE') {
-                                       if (!$v || !is_array(\TYPO3\CMS\Backend\Utility\BackendUtility::getRecord($table, $uid, 'uid'))) {
+                                       if (!$v || !is_array(BackendUtility::getRecord($table, $uid, 'uid'))) {
                                                unset($this->clipData[$this->current]['el'][$k]);
                                                $this->changed = 1;
                                        }
@@ -749,7 +749,7 @@ class Clipboard {
                                                $this->changed = 1;
                                        } else {
                                                try {
-                                                       \TYPO3\CMS\Core\Resource\ResourceFactory::getInstance()->retrieveFileOrFolderObject($v);
+                                                       ResourceFactory::getInstance()->retrieveFileOrFolderObject($v);
                                                } catch (\TYPO3\CMS\Core\Resource\Exception\ResourceDoesNotExistException $e) {
                                                        // The file has been deleted in the meantime, so just remove it silently
                                                        unset($this->clipData[$this->current]['el'][$k]);
@@ -821,8 +821,8 @@ class Clipboard {
                        list($table, $uid) = explode('|', key($elArr));
                }
                if ($this->isSelected($table, $uid)) {
-                       $selRec = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecordWSOL($table, $uid);
-                       $selRec['_RECORD_TITLE'] = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecordTitle($table, $selRec);
+                       $selRec = BackendUtility::getRecordWSOL($table, $uid);
+                       $selRec['_RECORD_TITLE'] = BackendUtility::getRecordTitle($table, $selRec);
                        return $selRec;
                }
        }
@@ -957,5 +957,4 @@ class Clipboard {
 
 }
 
-
 ?>
\ No newline at end of file
index e19173d..4c8da36 100644 (file)
@@ -26,11 +26,10 @@ namespace TYPO3\CMS\Backend\Configuration;
  *
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
-/**
- * Contains translation tools
- *
- * @author Kasper Skårhøj <kasperYYYY@typo3.com>
- */
+
+use TYPO3\CMS\Backend\Utility\BackendUtility;
+use TYPO3\CMS\Backend\Utility\IconUtility;
+
 /**
  * Contains translation tools
  *
@@ -52,7 +51,7 @@ class TranslationConfigurationProvider {
         * @todo Define visibility
         */
        public function getSystemLanguages($page_id = 0, $backPath = '') {
-               $modSharedTSconfig = \TYPO3\CMS\Backend\Utility\BackendUtility::getModTSconfig($page_id, 'mod.SHARED');
+               $modSharedTSconfig = BackendUtility::getModTSconfig($page_id, 'mod.SHARED');
                $languageIconTitles = array();
                // fallback "old iconstyles"
                if (preg_match('/\\.gif$/', $modSharedTSconfig['properties']['defaultLanguageFlag'])) {
@@ -76,13 +75,13 @@ class TranslationConfigurationProvider {
                foreach ($sys_languages as $row) {
                        $languageIconTitles[$row['uid']] = $row;
                        if ($row['static_lang_isocode'] && \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('static_info_tables')) {
-                               $staticLangRow = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecord('static_languages', $row['static_lang_isocode'], 'lg_iso_2');
+                               $staticLangRow = BackendUtility::getRecord('static_languages', $row['static_lang_isocode'], 'lg_iso_2');
                                if ($staticLangRow['lg_iso_2']) {
                                        $languageIconTitles[$row['uid']]['ISOcode'] = $staticLangRow['lg_iso_2'];
                                }
                        }
                        if (strlen($row['flag'])) {
-                               $languageIconTitles[$row['uid']]['flagIcon'] = \TYPO3\CMS\Backend\Utility\IconUtility::mapRecordTypeToSpriteIconName('sys_language', $row);
+                               $languageIconTitles[$row['uid']]['flagIcon'] = IconUtility::mapRecordTypeToSpriteIconName('sys_language', $row);
                        }
                }
                return $languageIconTitles;
@@ -103,7 +102,7 @@ class TranslationConfigurationProvider {
        public function translationInfo($table, $uid, $sys_language_uid = 0, $row = NULL, $selFieldList = '') {
                if ($GLOBALS['TCA'][$table] && $uid) {
                        if ($row === NULL) {
-                               $row = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecordWSOL($table, $uid);
+                               $row = BackendUtility::getRecordWSOL($table, $uid);
                        }
                        if (is_array($row)) {
                                $trTable = $this->getTranslationTable($table);
@@ -111,7 +110,7 @@ class TranslationConfigurationProvider {
                                        if ($trTable !== $table || $row[$GLOBALS['TCA'][$table]['ctrl']['languageField']] <= 0) {
                                                if ($trTable !== $table || $row[$GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField']] == 0) {
                                                        // Look for translations of this record, index by language field value:
-                                                       $translationsTemp = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows($selFieldList ? $selFieldList : 'uid,' . $GLOBALS['TCA'][$trTable]['ctrl']['languageField'], $trTable, $GLOBALS['TCA'][$trTable]['ctrl']['transOrigPointerField'] . '=' . intval($uid) . ' AND pid=' . intval(($table === 'pages' ? $row['uid'] : $row['pid'])) . ' AND ' . $GLOBALS['TCA'][$trTable]['ctrl']['languageField'] . (!$sys_language_uid ? '>0' : '=' . intval($sys_language_uid)) . \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause($trTable) . \TYPO3\CMS\Backend\Utility\BackendUtility::versioningPlaceholderClause($trTable));
+                                                       $translationsTemp = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows($selFieldList ? $selFieldList : 'uid,' . $GLOBALS['TCA'][$trTable]['ctrl']['languageField'], $trTable, $GLOBALS['TCA'][$trTable]['ctrl']['transOrigPointerField'] . '=' . intval($uid) . ' AND pid=' . intval(($table === 'pages' ? $row['uid'] : $row['pid'])) . ' AND ' . $GLOBALS['TCA'][$trTable]['ctrl']['languageField'] . (!$sys_language_uid ? '>0' : '=' . intval($sys_language_uid)) . BackendUtility::deleteClause($trTable) . BackendUtility::versioningPlaceholderClause($trTable));
                                                        $translations = array();
                                                        $translations_errors = array();
                                                        foreach ($translationsTemp as $r) {
@@ -185,5 +184,4 @@ class TranslationConfigurationProvider {
 
 }
 
-
 ?>
\ No newline at end of file
index db889ea..2d39a38 100644 (file)
@@ -27,6 +27,9 @@ namespace TYPO3\CMS\Backend\Configuration;
  *
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
+
+use TYPO3\CMS\Backend\Utility\BackendUtility;
+
 /**
  * A TS-Config parsing class which performs condition evaluation
  *
@@ -35,7 +38,7 @@ namespace TYPO3\CMS\Backend\Configuration;
 class TsConfigParser extends \TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser {
 
        /**
-        * @var         array
+        * @var array
         */
        protected $rootLine = array();
 
@@ -53,7 +56,7 @@ class TsConfigParser extends \TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser
                $this->id = $id;
                $this->rootLine = $rootLine;
                $hash = md5($type . ':' . $TStext);
-               $cachedContent = \TYPO3\CMS\Backend\Utility\BackendUtility::getHash($hash, 0);
+               $cachedContent = BackendUtility::getHash($hash);
                if ($cachedContent) {
                        $storedData = unserialize($cachedContent);
                        $storedMD5 = substr($cachedContent, -strlen($hash));
@@ -67,7 +70,7 @@ class TsConfigParser extends \TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser
                                );
                        } else {
                                $shash = md5($checkMD5 . $hash);
-                               $cachedSpec = \TYPO3\CMS\Backend\Utility\BackendUtility::getHash($shash, 0);
+                               $cachedSpec = BackendUtility::getHash($shash);
                                if ($cachedSpec) {
                                        $storedData = unserialize($cachedSpec);
                                        $res = array(
@@ -77,7 +80,7 @@ class TsConfigParser extends \TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser
                                } else {
                                        $storeData = $this->parseWithConditions($TStext);
                                        $serData = serialize($storeData);
-                                       \TYPO3\CMS\Backend\Utility\BackendUtility::storeHash($shash, $serData, $type . '_TSconfig');
+                                       BackendUtility::storeHash($shash, $serData, $type . '_TSconfig');
                                        $res = array(
                                                'TSconfig' => $storeData['TSconfig'],
                                                'cached' => 0
@@ -88,7 +91,7 @@ class TsConfigParser extends \TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser
                        $storeData = $this->parseWithConditions($TStext);
                        $serData = serialize($storeData);
                        $md5 = md5($serData);
-                       \TYPO3\CMS\Backend\Utility\BackendUtility::storeHash($hash, $serData . $md5, $type . '_TSconfig');
+                       BackendUtility::storeHash($hash, $serData . $md5, $type . '_TSconfig');
                        $res = array(
                                'TSconfig' => $storeData['TSconfig'],
                                'cached' => 0
index 98f63e5..d537c28 100644 (file)
@@ -26,24 +26,24 @@ namespace TYPO3\CMS\Backend\Configuration\TypoScript\ConditionMatching;
  *
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
+
+use TYPO3\CMS\Backend\Utility\BackendUtility;
+use TYPO3\CMS\Core\Utility\GeneralUtility;
+
 /**
  * Matching TypoScript conditions for backend disposal.
  *
  * Used with the TypoScript parser.
  * Matches browserinfo, IPnumbers for use with templates
  *
- * @author     Kasper Skårhøj <kasperYYYY@typo3.com>
+ * @author Kasper Skårhøj <kasperYYYY@typo3.com>
  */
 class ConditionMatcher extends \TYPO3\CMS\Core\Configuration\TypoScript\ConditionMatching\AbstractConditionMatcher {
 
        /**
         * Constructor for this class
-        *
-        * @return void
         */
-       public function __construct() {
-
-       }
+       public function __construct() {}
 
        /**
         * Evaluates a TypoScript condition given as input, eg. "[browser=net][...(other conditions)...]"
@@ -53,54 +53,54 @@ class ConditionMatcher extends \TYPO3\CMS\Core\Configuration\TypoScript\Conditio
         * @see \TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser::parse()
         */
        protected function evaluateCondition($string) {
-               list($key, $value) = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode('=', $string, FALSE, 2);
+               list($key, $value) = GeneralUtility::trimExplode('=', $string, FALSE, 2);
                $result = parent::evaluateConditionCommon($key, $value);
                if (is_bool($result)) {
                        return $result;
                } else {
                        switch ($key) {
-                       case 'usergroup':
-                               $groupList = $this->getGroupList();
-                               $values = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $value, TRUE);
-                               foreach ($values as $test) {
-                                       if ($test == '*' || \TYPO3\CMS\Core\Utility\GeneralUtility::inList($groupList, $test)) {
-                                               return TRUE;
+                               case 'usergroup':
+                                       $groupList = $this->getGroupList();
+                                       $values = GeneralUtility::trimExplode(',', $value, TRUE);
+                                       foreach ($values as $test) {
+                                               if ($test == '*' || GeneralUtility::inList($groupList, $test)) {
+                                                       return TRUE;
+                                               }
                                        }
-                               }
-                               break;
-                       case 'adminUser':
-                               if ($this->isUserLoggedIn()) {
-                                       $result = !((bool) $value xor $this->isAdminUser());
-                                       return $result;
-                               }
-                               break;
-                       case 'treeLevel':
-                               $values = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $value, TRUE);
-                               $treeLevel = count($this->rootline) - 1;
-                               // If a new page is being edited or saved the treeLevel is higher by one:
-                               if ($this->isNewPageWithPageId($this->pageId)) {
-                                       $treeLevel++;
-                               }
-                               foreach ($values as $test) {
-                                       if ($test == $treeLevel) {
-                                               return TRUE;
+                                       break;
+                               case 'adminUser':
+                                       if ($this->isUserLoggedIn()) {
+                                               $result = !((bool) $value xor $this->isAdminUser());
+                                               return $result;
+                                       }
+                                       break;
+                               case 'treeLevel':
+                                       $values = GeneralUtility::trimExplode(',', $value, TRUE);
+                                       $treeLevel = count($this->rootline) - 1;
+                                       // If a new page is being edited or saved the treeLevel is higher by one:
+                                       if ($this->isNewPageWithPageId($this->pageId)) {
+                                               $treeLevel++;
                                        }
-                               }
-                               break;
-                       case 'PIDupinRootline':
-
-                       case 'PIDinRootline':
-                               $values = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $value, TRUE);
-                               if ($key == 'PIDinRootline' || !in_array($this->pageId, $values) || $this->isNewPageWithPageId($this->pageId)) {
                                        foreach ($values as $test) {
-                                               foreach ($this->rootline as $rl_dat) {
-                                                       if ($rl_dat['uid'] == $test) {
-                                                               return TRUE;
+                                               if ($test == $treeLevel) {
+                                                       return TRUE;
+                                               }
+                                       }
+                                       break;
+                               case 'PIDupinRootline':
+
+                               case 'PIDinRootline':
+                                       $values = GeneralUtility::trimExplode(',', $value, TRUE);
+                                       if ($key == 'PIDinRootline' || !in_array($this->pageId, $values) || $this->isNewPageWithPageId($this->pageId)) {
+                                               foreach ($values as $test) {
+                                                       foreach ($this->rootline as $rl_dat) {
+                                                               if ($rl_dat['uid'] == $test) {
+                                                                       return TRUE;
+                                                               }
                                                        }
                                                }
                                        }
-                               }
-                               break;
+                                       break;
                        }
                }
                return FALSE;
@@ -139,10 +139,10 @@ class ConditionMatcher extends \TYPO3\CMS\Core\Configuration\TypoScript\Conditio
         */
        protected function determinePageId() {
                $pageId = 0;
-               $editStatement = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('edit');
-               $commandStatement = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('cmd');
+               $editStatement = GeneralUtility::_GP('edit');
+               $commandStatement = GeneralUtility::_GP('cmd');
                // Determine id from module that was called with an id:
-               if ($id = intval(\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('id'))) {
+               if ($id = intval(GeneralUtility::_GP('id'))) {
                        $pageId = $id;
                } elseif (is_array($editStatement)) {
                        list($table, $uidAndAction) = each($editStatement);
@@ -172,7 +172,7 @@ class ConditionMatcher extends \TYPO3\CMS\Core\Configuration\TypoScript\Conditio
         */
        protected function getPage() {
                $pageId = isset($this->pageId) ? $this->pageId : $this->determinePageId();
-               return \TYPO3\CMS\Backend\Utility\BackendUtility::getRecord('pages', $pageId);
+               return BackendUtility::getRecord('pages', $pageId);
        }
 
        /**
@@ -190,7 +190,7 @@ class ConditionMatcher extends \TYPO3\CMS\Core\Configuration\TypoScript\Conditio
                        if (($ignoreTable || $table === 'pages') && $id >= 0) {
                                $pageId = $id;
                        } else {
-                               $record = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecordWSOL($table, abs($id), '*', '', FALSE);
+                               $record = BackendUtility::getRecordWSOL($table, abs($id), '*', '', FALSE);
                                $pageId = $record['pid'];
                        }
                }
@@ -222,7 +222,7 @@ class ConditionMatcher extends \TYPO3\CMS\Core\Configuration\TypoScript\Conditio
                                foreach ($elementsData as $element) {
                                        if ($element['cmd'] == 'new' && $element['table'] == 'pages') {
                                                if ($element['pid'] < 0) {
-                                                       $pageRecord = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecord('pages', abs($element['pid']), 'pid');
+                                                       $pageRecord = BackendUtility::getRecord('pages', abs($element['pid']), 'pid');
                                                        $element['pid'] = $pageRecord['pid'];
                                                }
                                                if ($element['pid'] == $pageId) {
@@ -242,7 +242,7 @@ class ConditionMatcher extends \TYPO3\CMS\Core\Configuration\TypoScript\Conditio
         */
        protected function determineRootline() {
                $pageId = isset($this->pageId) ? $this->pageId : $this->determinePageId();
-               $rootline = \TYPO3\CMS\Backend\Utility\BackendUtility::BEgetRootLine($pageId, '', TRUE);
+               $rootline = BackendUtility::BEgetRootLine($pageId, '', TRUE);
                return $rootline;
        }
 
@@ -296,5 +296,4 @@ class ConditionMatcher extends \TYPO3\CMS\Core\Configuration\TypoScript\Conditio
 
 }
 
-
 ?>
\ No newline at end of file
index caf2f8c..79395bb 100644 (file)
@@ -26,6 +26,7 @@ namespace TYPO3\CMS\Backend\ContextMenu;
  *
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
+
 /**
  * Abstract Context Menu
  *
@@ -65,5 +66,4 @@ abstract class AbstractContextMenu {
 
 }
 
-
 ?>
\ No newline at end of file
index 960a6bb..7b69ed5 100644 (file)
@@ -26,6 +26,7 @@ namespace TYPO3\CMS\Backend\ContextMenu;
  *
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
+
 /**
  * Abstract Context Menu Data Provider
  *
@@ -212,5 +213,4 @@ abstract class AbstractContextMenuDataProvider {
 
 }
 
-
 ?>
\ No newline at end of file
index 8beb0e1..2547380 100644 (file)
@@ -26,6 +26,7 @@ namespace TYPO3\CMS\Backend\ContextMenu;
  *
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
+
 /**
  * Context Menu Action
  *
@@ -273,5 +274,4 @@ class ContextMenuAction {
 
 }
 
-
 ?>
\ No newline at end of file
index 1c1a32a..5c6210c 100644 (file)
@@ -26,6 +26,7 @@ namespace TYPO3\CMS\Backend\ContextMenu;
  *
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
+
 /**
  * Context Menu Action Collection
  *
@@ -50,5 +51,4 @@ class ContextMenuActionCollection extends \ArrayObject {
 
 }
 
-
 ?>
\ No newline at end of file
index c310caf..0af203e 100644 (file)
@@ -26,6 +26,7 @@ namespace TYPO3\CMS\Backend\ContextMenu\Extdirect;
  *
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
+
 /**
  * Abstract Context Menu for ExtDirect
  *
@@ -74,5 +75,4 @@ abstract class AbstractExtdirectContextMenu extends \TYPO3\CMS\Backend\ContextMe
 
 }
 
-
 ?>
\ No newline at end of file
index d22f1de..3d5d02a 100644 (file)
@@ -26,6 +26,9 @@ namespace TYPO3\CMS\Backend\ContextMenu\Pagetree;
  *
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
+
+use TYPO3\CMS\Core\Utility\GeneralUtility;
+
 /**
  * Context Menu Data Provider for the Page Tree
  *
@@ -55,12 +58,12 @@ class ContextMenuDataProvider extends \TYPO3\CMS\Backend\ContextMenu\AbstractCon
                $tsConfig = $GLOBALS['BE_USER']->getTSConfig('options.contextMenu.' . $this->getContextMenuType() . '.disableItems');
                $disableItems = array();
                if (trim($tsConfig['value']) !== '') {
-                       $disableItems = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $tsConfig['value']);
+                       $disableItems = GeneralUtility::trimExplode(',', $tsConfig['value']);
                }
                $tsConfig = $GLOBALS['BE_USER']->getTSConfig('options.contextMenu.pageTree.disableItems');
                $oldDisableItems = array();
                if (trim($tsConfig['value']) !== '') {
-                       $oldDisableItems = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $tsConfig['value']);
+                       $oldDisableItems = GeneralUtility::trimExplode(',', $tsConfig['value']);
                }
                $additionalItems = array();
                foreach ($oldDisableItems as $item) {
@@ -69,7 +72,7 @@ class ContextMenuDataProvider extends \TYPO3\CMS\Backend\ContextMenu\AbstractCon
                                continue;
                        }
                        if (strpos($this->legacyContextMenuMapping[$item], ',')) {
-                               $actions = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $this->legacyContextMenuMapping[$item]);
+                               $actions = GeneralUtility::trimExplode(',', $this->legacyContextMenuMapping[$item]);
                                $additionalItems = array_merge($additionalItems, $actions);
                        } else {
                                $additionalItems[] = $item;
@@ -96,5 +99,4 @@ class ContextMenuDataProvider extends \TYPO3\CMS\Backend\ContextMenu\AbstractCon
 
 }
 
-
 ?>
\ No newline at end of file
index 6714052..ee68291 100644 (file)
@@ -26,6 +26,7 @@ namespace TYPO3\CMS\Backend\ContextMenu\Pagetree\Extdirect;
  *
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
+
 /**
  * Context Menu of the Page Tree
  *
@@ -65,5 +66,4 @@ class ContextMenuConfiguration extends \TYPO3\CMS\Backend\ContextMenu\Extdirect\
 
 }
 
-
 ?>
\ No newline at end of file
index d205324..6121a47 100644 (file)
@@ -26,6 +26,7 @@ namespace TYPO3\CMS\Backend\ContextMenu\Renderer;
  *
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
+
 /**
  * Abstract Context Menu Renderer
  *
@@ -62,5 +63,4 @@ abstract class AbstractContextMenuRenderer {
 
 }
 
-
 ?>
\ No newline at end of file
index f7e5e9f..d5645da 100644 (file)
@@ -27,6 +27,10 @@ namespace TYPO3\CMS\Backend\Controller;
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
 
+use TYPO3\CMS\Backend\Utility\BackendUtility;
+use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
+use TYPO3\CMS\Core\Utility\GeneralUtility;
+
 /**
  * Class for rendering the TYPO3 backend version 4.2+
  *
@@ -83,9 +87,9 @@ class BackendController {
                // Set debug flag for BE development only
                $this->debug = intval($GLOBALS['TYPO3_CONF_VARS']['BE']['debug']) === 1;
                // Initializes the backend modules structure for use later.
-               $this->moduleLoader = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Module\\ModuleLoader');
+               $this->moduleLoader = GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Module\\ModuleLoader');
                $this->moduleLoader->load($GLOBALS['TBE_MODULES']);
-               $this->moduleMenu = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\View\\ModuleMenuView');
+               $this->moduleMenu = GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\View\\ModuleMenuView');
                $this->pageRenderer = $GLOBALS['TBE_TEMPLATE']->getPageRenderer();
                $this->pageRenderer->loadScriptaculous('builder,effects,controls,dragdrop');
                $this->pageRenderer->loadExtJS();
@@ -143,7 +147,7 @@ class BackendController {
                        'liveSearch' => '\\TYPO3\\CMS\\Backend\\Toolbar\\LiveSearchToolbarItem'
                );
                foreach ($coreToolbarItems as $toolbarItemName => $toolbarItemClassName) {
-                       $toolbarItem = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance($toolbarItemClassName, $this);
+                       $toolbarItem = GeneralUtility::makeInstance($toolbarItemClassName, $this);
                        if (!$toolbarItem instanceof \TYPO3\CMS\Backend\Toolbar\ToolbarItemHookInterface) {
                                throw new \UnexpectedValueException('$toolbarItem "' . $toolbarItemName . '" must implement interface TYPO3\\CMS\\Backend\\Toolbar\\ToolbarItemHookInterface', 1195126772);
                        }
@@ -163,7 +167,7 @@ class BackendController {
        public function render() {
                $this->executeHook('renderPreProcess');
                // Prepare the scaffolding, at this point extension may still add javascript and css
-               $logo = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\View\\LogoView');
+               $logo = GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\View\\LogoView');
                $logo->setLogo('gfx/typo3logo_mini.png');
                // Create backend scaffolding
                $backendScaffolding = '
@@ -241,24 +245,24 @@ class BackendController {
                                $absoluteComponentPath = PATH_t3lib . 'js/extjs/' . $componentDirectory;
                                $relativeComponentPath = '../' . str_replace(PATH_site, '', $absoluteComponentPath);
                        } else {
-                               $absoluteComponentPath = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($info['extKey']) . $componentDirectory;
-                               $relativeComponentPath = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath($info['extKey']) . $componentDirectory;
+                               $absoluteComponentPath = ExtensionManagementUtility::extPath($info['extKey']) . $componentDirectory;
+                               $relativeComponentPath = ExtensionManagementUtility::extRelPath($info['extKey']) . $componentDirectory;
                        }
-                       $cssFiles = \TYPO3\CMS\Core\Utility\GeneralUtility::getFilesInDir($absoluteComponentPath . 'css/', 'css');
+                       $cssFiles = GeneralUtility::getFilesInDir($absoluteComponentPath . 'css/', 'css');
                        if (file_exists($absoluteComponentPath . 'css/loadorder.txt')) {
                                // Don't allow inclusion outside directory
-                               $loadOrder = str_replace('../', '', \TYPO3\CMS\Core\Utility\GeneralUtility::getUrl($absoluteComponentPath . 'css/loadorder.txt'));
-                               $cssFilesOrdered = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(LF, $loadOrder, TRUE);
+                               $loadOrder = str_replace('../', '', GeneralUtility::getUrl($absoluteComponentPath . 'css/loadorder.txt'));
+                               $cssFilesOrdered = GeneralUtility::trimExplode(LF, $loadOrder, TRUE);
                                $cssFiles = array_merge($cssFilesOrdered, $cssFiles);
                        }
                        foreach ($cssFiles as $cssFile) {
                                $this->pageRenderer->addCssFile($relativeComponentPath . 'css/' . $cssFile);
                        }
-                       $jsFiles = \TYPO3\CMS\Core\Utility\GeneralUtility::getFilesInDir($absoluteComponentPath . 'javascript/', 'js');
+                       $jsFiles = GeneralUtility::getFilesInDir($absoluteComponentPath . 'javascript/', 'js');
                        if (file_exists($absoluteComponentPath . 'javascript/loadorder.txt')) {
                                // Don't allow inclusion outside directory
-                               $loadOrder = str_replace('../', '', \TYPO3\CMS\Core\Utility\GeneralUtility::getUrl($absoluteComponentPath . 'javascript/loadorder.txt'));
-                               $jsFilesOrdered = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(LF, $loadOrder, TRUE);
+                               $loadOrder = str_replace('../', '', GeneralUtility::getUrl($absoluteComponentPath . 'javascript/loadorder.txt'));
+                               $jsFilesOrdered = GeneralUtility::trimExplode(LF, $loadOrder, TRUE);
                                $jsFiles = array_merge($jsFilesOrdered, $jsFiles);
                        }
                        foreach ($jsFiles as $jsFile) {
@@ -315,7 +319,7 @@ class BackendController {
                $title = $username;
                // Link to user setup if it's loaded and user has access
                $link = '';
-               if (\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('setup') && $GLOBALS['BE_USER']->check('modules', 'user_setup')) {
+               if (ExtensionManagementUtility::isLoaded('setup') && $GLOBALS['BE_USER']->check('modules', 'user_setup')) {
                        $link = '<a href="#" onclick="top.goToModule(\'user_setup\'); this.blur(); return false;">';
                }
                // Superuser mode
@@ -338,7 +342,7 @@ class BackendController {
                $filePath = 'typo3temp/locallang-BE-' . sha1($code) . '.js';
                if (!file_exists((PATH_site . $filePath))) {
                        // writeFileToTypo3tempDir() returns NULL on success (please double-read!)
-                       if (\TYPO3\CMS\Core\Utility\GeneralUtility::writeFileToTypo3tempDir(PATH_site . $filePath, $code) !== NULL) {
+                       if (GeneralUtility::writeFileToTypo3tempDir(PATH_site . $filePath, $code) !== NULL) {
                                throw new \RuntimeException('LocalLangFile could not be written to ' . $filePath, 1295193026);
                        }
                }
@@ -447,10 +451,10 @@ class BackendController {
         * @return void
         */
        protected function generateJavascript() {
-               $pathTYPO3 = \TYPO3\CMS\Core\Utility\GeneralUtility::dirname(\TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('SCRIPT_NAME')) . '/';
+               $pathTYPO3 = GeneralUtility::dirname(GeneralUtility::getIndpEnv('SCRIPT_NAME')) . '/';
                // If another page module was specified, replace the default Page module with the new one
                $newPageModule = trim($GLOBALS['BE_USER']->getTSConfigVal('options.overridePageModule'));
-               $pageModule = \TYPO3\CMS\Backend\Utility\BackendUtility::isModuleSetInTBE_MODULES($newPageModule) ? $newPageModule : 'web_layout';
+               $pageModule = BackendUtility::isModuleSetInTBE_MODULES($newPageModule) ? $newPageModule : 'web_layout';
                if (!$GLOBALS['BE_USER']->check('modules', $pageModule)) {
                        $pageModule = '';
                }
@@ -465,11 +469,11 @@ class BackendController {
                        $this->loginSecurityLevel = 'superchallenged';
                }
                $t3Configuration = array(
-                       'siteUrl' => \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_SITE_URL'),
+                       'siteUrl' => GeneralUtility::getIndpEnv('TYPO3_SITE_URL'),
                        'PATH_typo3' => $pathTYPO3,
                        'PATH_typo3_enc' => rawurlencode($pathTYPO3),
                        'username' => htmlspecialchars($GLOBALS['BE_USER']->user['username']),
-                       'uniqueID' => \TYPO3\CMS\Core\Utility\GeneralUtility::shortMD5(uniqid('')),
+                       'uniqueID' => GeneralUtility::shortMD5(uniqid('')),
                        'securityLevel' => $this->loginSecurityLevel,
                        'TYPO3_mainDir' => TYPO3_mainDir,
                        'pageModule' => $pageModule,
@@ -481,7 +485,7 @@ class BackendController {
                        'moduleMenuWidth' => $this->menuWidth - 1,
                        'topBarHeight' => isset($GLOBALS['TBE_STYLES']['dims']['topFrameH']) ? intval($GLOBALS['TBE_STYLES']['dims']['topFrameH']) : 30,
                        'showRefreshLoginPopup' => isset($GLOBALS['TYPO3_CONF_VARS']['BE']['showRefreshLoginPopup']) ? intval($GLOBALS['TYPO3_CONF_VARS']['BE']['showRefreshLoginPopup']) : FALSE,
-                       'listModulePath' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('recordlist') ? \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('recordlist') . 'mod1/' : '',
+                       'listModulePath' => ExtensionManagementUtility::isLoaded('recordlist') ? ExtensionManagementUtility::extRelPath('recordlist') . 'mod1/' : '',
                        'debugInWindow' => $GLOBALS['BE_USER']->uc['debugInWindow'] ? 1 : 0,
                        'ContextHelpWindows' => array(
                                'width' => 600,
@@ -538,22 +542,22 @@ class BackendController {
         * @return void
         */
        protected function handlePageEditing() {
-               if (!\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('cms')) {
+               if (!ExtensionManagementUtility::isLoaded('cms')) {
                        return;
                }
                // EDIT page:
-               $editId = preg_replace('/[^[:alnum:]_]/', '', \TYPO3\CMS\Core\Utility\GeneralUtility::_GET('edit'));
+               $editId = preg_replace('/[^[:alnum:]_]/', '', GeneralUtility::_GET('edit'));
                $editRecord = '';
                if ($editId) {
                        // Looking up the page to edit, checking permissions:
                        $where = ' AND (' . $GLOBALS['BE_USER']->getPagePermsClause(2) . ' OR ' . $GLOBALS['BE_USER']->getPagePermsClause(16) . ')';
                        if (\TYPO3\CMS\Core\Utility\MathUtility::canBeInterpretedAsInteger($editId)) {
-                               $editRecord = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecordWSOL('pages', $editId, '*', $where);
+                               $editRecord = BackendUtility::getRecordWSOL('pages', $editId, '*', $where);
                        } else {
-                               $records = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecordsByField('pages', 'alias', $editId, $where);
+                               $records = BackendUtility::getRecordsByField('pages', 'alias', $editId, $where);
                                if (is_array($records)) {
                                        $editRecord = reset($records);
-                                       \TYPO3\CMS\Backend\Utility\BackendUtility::workspaceOL('pages', $editRecord);
+                                       BackendUtility::workspaceOL('pages', $editRecord);
                                }
                        }
                        // If the page was accessible, then let the user edit it.
@@ -567,7 +571,7 @@ class BackendController {
                                if (!$GLOBALS['BE_USER']->getTSConfigVal('options.bookmark_onEditId_dontSetPageTree')) {
                                        $bookmarkKeepExpanded = $GLOBALS['BE_USER']->getTSConfigVal('options.bookmark_onEditId_keepExistingExpanded');
                                        // Expanding page tree:
-                                       \TYPO3\CMS\Backend\Utility\BackendUtility::openPageTree(intval($editRecord['pid']), !$bookmarkKeepExpanded);
+                                       BackendUtility::openPageTree(intval($editRecord['pid']), !$bookmarkKeepExpanded);
                                }
                        } else {
                                $this->js .= '
@@ -584,7 +588,7 @@ class BackendController {
         * @return void
         */
        protected function setStartupModule() {
-               $startModule = preg_replace('/[^[:alnum:]_]/', '', \TYPO3\CMS\Core\Utility\GeneralUtility::_GET('module'));
+               $startModule = preg_replace('/[^[:alnum:]_]/', '', GeneralUtility::_GET('module'));
                if (!$startModule) {
                        if ($GLOBALS['BE_USER']->uc['startModule']) {
                                $startModule = $GLOBALS['BE_USER']->uc['startModule'];
@@ -592,11 +596,11 @@ class BackendController {
                                $startModule = 'user_task';
                        }
                }
-               $moduleParameters = \TYPO3\CMS\Core\Utility\GeneralUtility::_GET('modParams');
+               $moduleParameters = GeneralUtility::_GET('modParams');
                if ($startModule) {
                        return '
                                        // start in module:
-                               top.startInModule = [\'' . $startModule . '\', ' . \TYPO3\CMS\Core\Utility\GeneralUtility::quoteJSvalue($moduleParameters) . '];
+                               top.startInModule = [\'' . $startModule . '\', ' . GeneralUtility::quoteJSvalue($moduleParameters) . '];
                        ';
                } else {
                        return '';
@@ -626,7 +630,7 @@ class BackendController {
        public function addJavascriptFile($javascriptFile) {
                $jsFileAdded = FALSE;
                //TODO add more checks if neccessary
-               if (file_exists(\TYPO3\CMS\Core\Utility\GeneralUtility::resolveBackPath(PATH_typo3 . $javascriptFile))) {
+               if (file_exists(GeneralUtility::resolveBackPath(PATH_typo3 . $javascriptFile))) {
                        $this->jsFiles[] = $javascriptFile;
                        $jsFileAdded = TRUE;
                }
@@ -670,7 +674,7 @@ class BackendController {
         * @return void
         */
        public function addToolbarItem($toolbarItemName, $toolbarItemClassName) {
-               $toolbarItem = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance($toolbarItemClassName, $this);
+               $toolbarItem = GeneralUtility::makeInstance($toolbarItemClassName, $this);
                if (!$toolbarItem instanceof \TYPO3\CMS\Backend\Toolbar\ToolbarItemHookInterface) {
                        throw new \UnexpectedValueException('$toolbarItem "' . $toolbarItemName . '" must implement interface TYPO3\\CMS\\Backend\\Toolbar\\ToolbarItemHookInterface', 1195125501);
                }
@@ -697,12 +701,11 @@ class BackendController {
                $options = &$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/backend.php'];
                if (isset($options[$identifier]) && is_array($options[$identifier])) {
                        foreach ($options[$identifier] as $hookFunction) {
-                               \TYPO3\CMS\Core\Utility\GeneralUtility::callUserFunction($hookFunction, $hookConfiguration, $this);
+                               GeneralUtility::callUserFunction($hookFunction, $hookConfiguration, $this);
                        }
                }
        }
 
 }
 
-
 ?>
\ No newline at end of file
index 7d133ef..51fe74a 100644 (file)
@@ -27,6 +27,9 @@ namespace TYPO3\CMS\Backend\Controller;
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
 
+use TYPO3\CMS\Backend\Utility\IconUtility;
+use TYPO3\CMS\Core\Utility\GeneralUtility;
+
 /**
  * Script Class for grid wizard
  *
@@ -63,13 +66,13 @@ class BackendLayoutWizardController {
         */
        public function init() {
                // Setting GET vars (used in frameset script):
-               $this->P = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('P', 1);
+               $this->P = GeneralUtility::_GP('P', 1);
                $this->formName = $this->P['formName'];
                $this->fieldName = $this->P['itemName'];
                $this->md5ID = $this->P['md5ID'];
                $uid = intval($this->P['uid']);
                // Initialize document object:
-               $this->doc = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Template\\DocumentTemplate');
+               $this->doc = GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Template\\DocumentTemplate');
                $this->doc->backPath = $GLOBALS['BACK_PATH'];
                $pageRenderer = $this->doc->getPageRenderer();
                $pageRenderer->addJsFile($GLOBALS['BACK_PATH'] . TYPO3_MOD_PATH . 'res/grideditor.js');
@@ -84,8 +87,6 @@ class BackendLayoutWizardController {
                $languageLabels = array(
                        'save' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_wizards.xlf:grid_labelSave', 1),
                        'title' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_wizards.xlf:grid_windowTitle', 1),
-                       'name' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_wizards.xlf:grid_labelName', 1),
-                       'column' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_wizards.xlf:grid_labelColumn', 1),
                        'editCell' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_wizards.xlf:grid_editCell', 1),
                        'mergeCell' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_wizards.xlf:grid_mergeCell', 1),
                        'splitCell' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_wizards.xlf:grid_splitCell', 1),
@@ -104,7 +105,7 @@ class BackendLayoutWizardController {
                        $rowCount = 1;
                } else {
                        // load TS parser
-                       $parser = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\TypoScript\\Parser\\TypoScriptParser');
+                       $parser = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\TypoScript\\Parser\\TypoScriptParser');
                        $parser->parse($record[0][$this->P['field']]);
                        $data = $parser->setup['backend_layout.'];
                        $t3GridData = '[';
@@ -197,9 +198,9 @@ class BackendLayoutWizardController {
         * @todo Define visibility
         */
        public function main() {
-               $content .= '<a href="#" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:rm.saveDoc', TRUE) . '" onclick="storeData(t3Grid.export2LayoutRecord());return true;">' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-document-save') . '</a>';
-               $content .= '<a href="#" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:rm.saveCloseDoc', TRUE) . '" onclick="storeData(t3Grid.export2LayoutRecord());window.close();return true;">' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-document-save-close') . '</a>';
-               $content .= '<a href="#" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:rm.closeDoc', TRUE) . '" onclick="window.close();return true;">' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-document-close') . '</a>';
+               $content .= '<a href="#" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:rm.saveDoc', TRUE) . '" onclick="storeData(t3Grid.export2LayoutRecord());return true;">' . IconUtility::getSpriteIcon('actions-document-save') . '</a>';
+               $content .= '<a href="#" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:rm.saveCloseDoc', TRUE) . '" onclick="storeData(t3Grid.export2LayoutRecord());window.close();return true;">' . IconUtility::getSpriteIcon('actions-document-save-close') . '</a>';
+               $content .= '<a href="#" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:rm.closeDoc', TRUE) . '" onclick="window.close();return true;">' . IconUtility::getSpriteIcon('actions-document-close') . '</a>';
                $content .= $this->doc->spacer(10);
                $content .= '
                <table border="0" width="100%" height="100%" id="outer_container">
@@ -244,5 +245,4 @@ class BackendLayoutWizardController {
 
 }
 
-
 ?>
\ No newline at end of file
index 0288ae6..c8826ae 100644 (file)
@@ -27,6 +27,8 @@ namespace TYPO3\CMS\Backend\Controller;
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
 
+use TYPO3\CMS\Core\Utility\GeneralUtility;
+
 /**
  * Script Class for the Context Sensitive Menu in TYPO3 (rendered in top frame, normally writing content dynamically to list frames).
  *
@@ -88,14 +90,14 @@ class ClickMenuController {
         */
        public function init() {
                // Setting GPvars:
-               $this->backPath = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('backPath');
-               $this->item = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('item');
-               $this->reloadListFrame = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('reloadListFrame');
+               $this->backPath = GeneralUtility::_GP('backPath');
+               $this->item = GeneralUtility::_GP('item');
+               $this->reloadListFrame = GeneralUtility::_GP('reloadListFrame');
                // Setting pseudo module name
                $this->MCONF['name'] = 'xMOD_alt_clickmenu.php';
                // Takes the backPath as a parameter BUT since we are worried about someone forging a backPath (XSS security hole) we will check with sent md5 hash:
                $inputBP = explode('|', $this->backPath);
-               if (count($inputBP) == 2 && $inputBP[1] == \TYPO3\CMS\Core\Utility\GeneralUtility::shortMD5($inputBP[0] . '|' . $GLOBALS['TYPO3_CONF_VARS']['SYS']['encryptionKey'])) {
+               if (count($inputBP) == 2 && $inputBP[1] == GeneralUtility::shortMD5($inputBP[0] . '|' . $GLOBALS['TYPO3_CONF_VARS']['SYS']['encryptionKey'])) {
                        $this->backPath = $inputBP[0];
                } else {
                        $this->backPath = $GLOBALS['BACK_PATH'];
@@ -107,7 +109,7 @@ class ClickMenuController {
                if (is_array($this->extClassArray)) {
                        foreach ($this->extClassArray as $extClassConf) {
                                if (isset($extClassConf['path'])) {
-                                       \TYPO3\CMS\Core\Utility\GeneralUtility::deprecationLog(
+                                       GeneralUtility::deprecationLog(
                                                '$GLOBALS[\'TBE_MODULES_EXT\'][\'xMOD_alt_clickmenu\'][\'extendCMclasses\'][\'path\'] option is not needed anymore. The autoloader takes care of loading the class.'
                                        );
                                        $this->include_once[] = $extClassConf['path'];
@@ -116,7 +118,7 @@ class ClickMenuController {
                }
                // Initialize template object
                if (!$this->ajax) {
-                       $this->doc = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Template\\DocumentTemplate');
+                       $this->doc = GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Template\\DocumentTemplate');
                        $this->doc->backPath = $GLOBALS['BACK_PATH'];
                }
                // Setting mode for display and background image in the top frame
@@ -178,20 +180,20 @@ class ClickMenuController {
         * @todo Define visibility
         */
        public function main() {
-               $this->ajax = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('ajax') ? TRUE : FALSE;
+               $this->ajax = GeneralUtility::_GP('ajax') ? TRUE : FALSE;
                // Initialize Clipboard object:
-               $clipObj = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Clipboard\\Clipboard');
+               $clipObj = GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Clipboard\\Clipboard');
                $clipObj->initializeClipboard();
                // This locks the clipboard to the Normal for this request.
                $clipObj->lockToNormal();
                // Update clipboard if some actions are sent.
-               $CB = \TYPO3\CMS\Core\Utility\GeneralUtility::_GET('CB');
+               $CB = GeneralUtility::_GET('CB');
                $clipObj->setCmd($CB);
                $clipObj->cleanCurrent();
                // Saves
                $clipObj->endClipboard();
                // Create clickmenu object
-               $clickMenu = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\ClickMenu\\ClickMenu');
+               $clickMenu = GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\ClickMenu\\ClickMenu');
                // Set internal vars in clickmenu object:
                $clickMenu->clipObj = $clipObj;
                $clickMenu->extClassArray = $this->extClassArray;
@@ -223,5 +225,4 @@ class ClickMenuController {
 
 }
 
-
 ?>
\ No newline at end of file
index 3c4cd4d..70e51fb 100644 (file)
@@ -27,15 +27,16 @@ namespace TYPO3\CMS\Backend\Controller\ContentElement;
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
 
+use TYPO3\CMS\Core\Utility\GeneralUtility;
+
 /**
  * Script Class for showing the history module of TYPO3s backend
  *
  * @author Kasper Skårhøj <kasperYYYY@typo3.com>
- * @see class.show_rechis.inc
+ * @see \TYPO3\CMS\Backend\History\RecordHistory
  */
 class ElementHistoryController {
 
-       // Internal:
        /**
         * @todo Define visibility
         */
@@ -57,7 +58,7 @@ class ElementHistoryController {
         */
        public function init() {
                // Create internal template object:
-               $this->doc = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Template\\DocumentTemplate');
+               $this->doc = GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Template\\DocumentTemplate');
                $this->doc->backPath = $GLOBALS['BACK_PATH'];
                $this->doc->setModuleTemplate('EXT:backend/Resources/Private/Templates/show_rechis.html');
                // Start the page header:
@@ -72,7 +73,7 @@ class ElementHistoryController {
         */
        public function main() {
                // Start history object
-               $historyObj = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\History\\RecordHistory');
+               $historyObj = GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\History\\RecordHistory');
                // Get content:
                $this->content .= $historyObj->main();
                // Setting up the buttons and markers for docheader
@@ -109,7 +110,7 @@ class ElementHistoryController {
                // CSH
                $buttons['csh'] = \TYPO3\CMS\Backend\Utility\BackendUtility::cshItem('xMOD_csh_corebe', 'history_log', $GLOBALS['BACK_PATH'], '', TRUE);
                // Start history object
-               $historyObj = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\History\\RecordHistory');
+               $historyObj = GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\History\\RecordHistory');
                if ($historyObj->returnUrl) {
                        $buttons['back'] = '<a href="' . htmlspecialchars($historyObj->returnUrl) . '" class="typo3-goBack">' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-view-go-back') . '</a>';
                }
@@ -118,5 +119,4 @@ class ElementHistoryController {
 
 }
 
-
 ?>
\ No newline at end of file
index f9abe21..0432608 100644 (file)
@@ -27,6 +27,11 @@ namespace TYPO3\CMS\Backend\Controller\ContentElement;
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
 
+use TYPO3\CMS\Backend\Utility\BackendUtility;
+use TYPO3\CMS\Backend\Utility\IconUtility;
+use TYPO3\CMS\Core\Resource\ProcessedFile;
+use TYPO3\CMS\Core\Utility\GeneralUtility;
+
 /**
  * Script Class for showing information about an item.
  *
@@ -134,8 +139,8 @@ class ElementInformationController {
         */
        public function init() {
                // Setting input variables.
-               $this->table = \TYPO3\CMS\Core\Utility\GeneralUtility::_GET('table');
-               $this->uid = \TYPO3\CMS\Core\Utility\GeneralUtility::_GET('uid');
+               $this->table = GeneralUtility::_GET('table');
+               $this->uid = GeneralUtility::_GET('uid');
                // Initialize:
                $this->perms_clause = $GLOBALS['BE_USER']->getPagePermsClause(1);
                // Set to TRUE if there is access to the record / file.
@@ -150,18 +155,18 @@ class ElementInformationController {
                        // Check permissions and uid value:
                        if ($this->uid && $GLOBALS['BE_USER']->check('tables_select', $this->table)) {
                                if ((string) $this->table == 'pages') {
-                                       $this->pageinfo = \TYPO3\CMS\Backend\Utility\BackendUtility::readPageAccess($this->uid, $this->perms_clause);
+                                       $this->pageinfo = BackendUtility::readPageAccess($this->uid, $this->perms_clause);
                                        $this->access = is_array($this->pageinfo) ? 1 : 0;
                                        $this->row = $this->pageinfo;
                                } else {
-                                       $this->row = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecordWSOL($this->table, $this->uid);
+                                       $this->row = BackendUtility::getRecordWSOL($this->table, $this->uid);
                                        if ($this->row) {
-                                               $this->pageinfo = \TYPO3\CMS\Backend\Utility\BackendUtility::readPageAccess($this->row['pid'], $this->perms_clause);
+                                               $this->pageinfo = BackendUtility::readPageAccess($this->row['pid'], $this->perms_clause);
                                                $this->access = is_array($this->pageinfo) ? 1 : 0;
                                        }
                                }
                                /** @var $treatData \TYPO3\CMS\Backend\Form\DataPreprocessor */
-                               $treatData = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Form\\DataPreprocessor');
+                               $treatData = GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Form\\DataPreprocessor');
                                $treatData->renderRecord($this->table, $this->uid, 0, $this->row);
                        }
                } elseif ($this->table == '_FILE' || $this->table == '_FOLDER' || $this->table == 'sys_file') {
@@ -176,14 +181,14 @@ class ElementInformationController {
                                $this->type = 'file';
                                $this->table = 'sys_file';
                                try {
-                                       $this->row = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecordWSOL($this->table, $this->fileObject->getUid());
+                                       $this->row = BackendUtility::getRecordWSOL($this->table, $this->fileObject->getUid());
                                } catch (\Exception $e) {
                                        $this->row = array();
                                }
                        }
                }
                // Initialize document template object:
-               $this->doc = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Template\\DocumentTemplate');
+               $this->doc = GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Template\\DocumentTemplate');
                $this->doc->backPath = $GLOBALS['BACK_PATH'];
                // Starting the page by creating page header stuff:
                $this->content .= $this->doc->startPage($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:show_item.php.viewItem'));
@@ -202,13 +207,13 @@ class ElementInformationController {
                if (!$this->access) {
                        return;
                }
-               $returnLink = \TYPO3\CMS\Core\Utility\GeneralUtility::sanitizeLocalUrl(\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('returnUrl'));
+               $returnLink = GeneralUtility::sanitizeLocalUrl(GeneralUtility::_GP('returnUrl'));
                $returnLinkTag = $returnLink ? '<a href="' . $returnLink . '" class="typo3-goBack">' : '<a href="#" onclick="window.close();">';
                // render type by user func
                $typeRendered = FALSE;
                if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/show_item.php']['typeRendering'])) {
                        foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/show_item.php']['typeRendering'] as $classRef) {
-                               $typeRenderObj = \TYPO3\CMS\Core\Utility\GeneralUtility::getUserObj($classRef);
+                               $typeRenderObj = GeneralUtility::getUserObj($classRef);
                                // @TODO should have an interface
                                if (is_object($typeRenderObj) && method_exists($typeRenderObj, 'isValid') && method_exists($typeRenderObj, 'render')) {
                                        if ($typeRenderObj->isValid($this->type, $this)) {
@@ -235,7 +240,7 @@ class ElementInformationController {
                        }
                }
                // If return Url is set, output link to go back:
-               if (\TYPO3\CMS\Core\Utility\GeneralUtility::sanitizeLocalUrl(\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('returnUrl'))) {
+               if (GeneralUtility::sanitizeLocalUrl(GeneralUtility::_GP('returnUrl'))) {
                        $this->content = $this->doc->section('', ($returnLinkTag . '<strong>' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:labels.goBack', 1) . '</strong></a><br /><br />')) . $this->content;
                        $this->content .= $this->doc->section('', '<br />' . $returnLinkTag . '<strong>' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:labels.goBack', 1) . '</strong></a>');
                }
@@ -260,7 +265,7 @@ class ElementInformationController {
                        'tstamp' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_general.xlf:LGL.timestamp', 1)
                );
                foreach ($extraFields as $name => $value) {
-                       $rowValue = \TYPO3\CMS\Backend\Utility\BackendUtility::getProcessedValueExtra($this->table, $name, $this->row[$name]);
+                       $rowValue = BackendUtility::getProcessedValueExtra($this->table, $name, $this->row[$name]);
                        if ($name === 'cruser_id' && $rowValue) {
                                $userTemp = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('username, realName', 'be_users', 'uid = ' . intval($rowValue));
                                if ($userTemp[0]['username'] !== '') {
@@ -277,7 +282,7 @@ class ElementInformationController {
                                </tr>';
                }
                // Traverse the list of fields to display for the record:
-               $fieldList = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $GLOBALS['TCA'][$this->table]['interface']['showRecordFieldList'], 1);
+               $fieldList = GeneralUtility::trimExplode(',', $GLOBALS['TCA'][$this->table]['interface']['showRecordFieldList'], 1);
                foreach ($fieldList as $name) {
                        $name = trim($name);
                        if (!isset($GLOBALS['TCA'][$this->table]['columns'][$name])) {
@@ -288,8 +293,8 @@ class ElementInformationController {
                                continue;
                        }
                        $uid = $this->row['uid'];
-                       $itemValue = \TYPO3\CMS\Backend\Utility\BackendUtility::getProcessedValue($this->table, $name, $this->row[$name], 0, 0, FALSE, $uid);
-                       $itemLabel = $GLOBALS['LANG']->sL(\TYPO3\CMS\Backend\Utility\BackendUtility::getItemLabel($this->table, $name), 1);
+                       $itemValue = BackendUtility::getProcessedValue($this->table, $name, $this->row[$name], 0, 0, FALSE, $uid);
+                       $itemLabel = $GLOBALS['LANG']->sL(BackendUtility::getItemLabel($this->table, $name), 1);
                        $tableRows[] = '
                                <tr>
                                        <td class="t3-col-header">' . $itemLabel . '</td>
@@ -304,7 +309,7 @@ class ElementInformationController {
                $this->content .= $this->doc->section('', $tableCode);
                // Add path and table information in the bottom:
                $code = '';
-               $code .= $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:labels.path') . ': ' . \TYPO3\CMS\Core\Utility\GeneralUtility::fixed_lgd_cs($this->pageinfo['_thePath'], -48) . '<br />';
+               $code .= $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:labels.path') . ': ' . GeneralUtility::fixed_lgd_cs($this->pageinfo['_thePath'], -48) . '<br />';
                $code .= $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:labels.table') . ': ' . $GLOBALS['LANG']->sL($GLOBALS['TCA'][$this->table]['ctrl']['title']) . ' (' . $this->table . ') - UID: ' . $this->uid . '<br />';
                $this->content .= $this->doc->section('', $code);
                // References:
@@ -328,22 +333,22 @@ class ElementInformationController {
         */
        public function renderFileInfo($returnLinkTag) {
                $fileExtension = $this->fileObject->getExtension();
-               $code = '<div class="fileInfoContainer">' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIconForFile($fileExtension) . '<strong>' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:show_item.php.file', TRUE) . ':</strong> ' . $this->fileObject->getName() . '&nbsp;&nbsp;' . '<strong>' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:show_item.php.filesize') . ':</strong> ' . \TYPO3\CMS\Core\Utility\GeneralUtility::formatSize($this->fileObject->getSize()) . '</div>
+               $code = '<div class="fileInfoContainer">' . IconUtility::getSpriteIconForFile($fileExtension) . '<strong>' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:show_item.php.file', TRUE) . ':</strong> ' . $this->fileObject->getName() . '&nbsp;&nbsp;' . '<strong>' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:show_item.php.filesize') . ':</strong> ' . GeneralUtility::formatSize($this->fileObject->getSize()) . '</div>
                        ';
                $this->content .= $this->doc->section('', $code);
                $this->content .= $this->doc->divider(2);
                // If the file was an image...
                // @todo: add this check in the domain model, or in the processing folder
-               if (\TYPO3\CMS\Core\Utility\GeneralUtility::inList($GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'], $fileExtension)) {
+               if (GeneralUtility::inList($GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'], $fileExtension)) {
                        // @todo: find a way to make getimagesize part of the \TYPO3\CMS\Core\Resource\File object
                        $imgInfo = @getimagesize($this->fileObject->getForLocalProcessing(FALSE));
-                       $thumbUrl = $this->fileObject->process(\TYPO3\CMS\Core\Resource\ProcessedFile::CONTEXT_IMAGEPREVIEW, array('width' => '150m', 'height' => '150m'))->getPublicUrl(TRUE);
+                       $thumbUrl = $this->fileObject->process(ProcessedFile::CONTEXT_IMAGEPREVIEW, array('width' => '150m', 'height' => '150m'))->getPublicUrl(TRUE);
                        $code = '<div class="fileInfoContainer fileDimensions">' . '<strong>' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:show_item.php.dimensions') . ':</strong> ' . $imgInfo[0] . 'x' . $imgInfo[1] . ' ' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:show_item.php.pixels') . '</div>';
                        $code .= '<br />
                                <div align="center">' . $returnLinkTag . '<img src="' . $thumbUrl . '" alt="' . htmlspecialchars(trim($this->fileObject->getName())) . '" title="' . htmlspecialchars(trim($this->fileObject->getName())) . '" /></a></div>';
                        $this->content .= $this->doc->section('', $code);
                } elseif ($fileExtension == 'ttf') {
-                       $thumbUrl = $this->fileObject->process(\TYPO3\CMS\Core\Resource\ProcessedFile::CONTEXT_IMAGEPREVIEW, array('width' => '530m', 'height' => '600m'))->getPublicUrl(TRUE);
+                       $thumbUrl = $this->fileObject->process(ProcessedFile::CONTEXT_IMAGEPREVIEW, array('width' => '530m', 'height' => '600m'))->getPublicUrl(TRUE);
                        $thumb = '<br />
                                <div align="center">' . $returnLinkTag . '<img src="' . $thumbUrl . '" border="0" title="' . htmlspecialchars(trim($this->fileObject->getName())) . '" alt="" /></a></div>';
                        $this->content .= $this->doc->section('', $thumb);
@@ -351,7 +356,7 @@ class ElementInformationController {
                // Traverse the list of fields to display for the record:
                $tableRows = array();
                $showRecordFieldList = $GLOBALS['TCA'][$this->table]['interface']['showRecordFieldList'];
-               $fieldList = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $showRecordFieldList, TRUE);
+               $fieldList = GeneralUtility::trimExplode(',', $showRecordFieldList, TRUE);
 
                foreach ($fieldList as $name) {
                        // Ignored fields
@@ -366,8 +371,8 @@ class ElementInformationController {
                                continue;
                        }
                        $uid = $this->row['uid'];
-                       $itemValue = \TYPO3\CMS\Backend\Utility\BackendUtility::getProcessedValue($this->table, $name, $this->row[$name], 0, 0, FALSE, $uid);
-                       $itemLabel = $GLOBALS['LANG']->sL(\TYPO3\CMS\Backend\Utility\BackendUtility::getItemLabel($this->table, $name), 1);
+                       $itemValue = BackendUtility::getProcessedValue($this->table, $name, $this->row[$name], 0, 0, FALSE, $uid);
+                       $itemLabel = $GLOBALS['LANG']->sL(BackendUtility::getItemLabel($this->table, $name), 1);
                        $tableRows[] = '
                                <tr>
                                        <td class="t3-col-header">' . $itemLabel . '</td>
@@ -433,11 +438,11 @@ class ElementInformationController {
                if ($table === '' || $uid < 0) {
                        return '';
                }
-               $editOnClick = \TYPO3\CMS\Backend\Utility\BackendUtility::editOnClick('&edit[' . $table . '][' . $uid . ']=edit', $GLOBALS['BACK_PATH']);
-               $icon = \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-document-open');
+               $editOnClick = BackendUtility::editOnClick('&edit[' . $table . '][' . $uid . ']=edit', $GLOBALS['BACK_PATH']);
+               $icon = IconUtility::getSpriteIcon('actions-document-open');
                $pageActionIcons = '<a href="#" onclick="' . htmlspecialchars($editOnClick) . '">' . $icon . '</a>';
-               $historyOnClick = 'window.location.href=\'show_rechis.php?element=' . $table . '%3A' . $uid . '&returnUrl=' . rawurlencode(\TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('REQUEST_URI')) . '\'; return false;';
-               $icon = \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-document-history-open');
+               $historyOnClick = 'window.location.href=\'show_rechis.php?element=' . $table . '%3A' . $uid . '&returnUrl=' . rawurlencode(GeneralUtility::getIndpEnv('REQUEST_URI')) . '\'; return false;';
+               $icon = IconUtility::getSpriteIcon('actions-document-history-open');
                $pageActionIcons .= '<a href="#" onclick="' . $historyOnClick . '">' . $icon . '</a>';
                if ($table === 'pages') {
                        $pageActionIcons .= $this->doc->viewPageIcon($uid, '');
@@ -462,7 +467,11 @@ class ElementInformationController {
                        $selectTable = $table;
                        $selectUid = $ref;
                }
-               $rows = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('*', 'sys_refindex', 'ref_table=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($selectTable, 'sys_refindex') . ' AND ref_uid=' . intval($selectUid) . ' AND deleted=0');
+               $rows = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows(
+                       '*',
+                       'sys_refindex',
+                       'ref_table=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($selectTable, 'sys_refindex') . ' AND ref_uid=' . intval($selectUid) . ' AND deleted=0'
+               );
                // Compile information for title tag:
                $infoData = array();
                if (count($rows)) {
@@ -472,10 +481,10 @@ class ElementInformationController {
                        if ($row['tablename'] === 'sys_file_reference') {
                                $row = $this->transformFileReferenceToRecordReference($row);
                        }
-                       $record = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecord($row['tablename'], $row['recuid']);
-                       $parentRecord = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecord('pages', $record['pid']);
+                       $record = BackendUtility::getRecord($row['tablename'], $row['recuid']);
+                       $parentRecord = BackendUtility::getRecord('pages', $record['pid']);
                        $actions = $this->getRecordActions($row['tablename'], $row['recuid']);
-                       $infoData[] = '<tr class="bgColor4">' . '<td style="white-space:nowrap;">' . $actions . '</td>' . '<td>' . $GLOBALS['LANG']->sL($GLOBALS['TCA'][$row['tablename']]['ctrl']['title'], TRUE) . '</td>' . '<td>' . \TYPO3\CMS\Backend\Utility\BackendUtility::getRecordTitle($row['tablename'], $record, TRUE) . '</td>' . '<td><span title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_common.xlf:page') . ': ' . htmlspecialchars(\TYPO3\CMS\Backend\Utility\BackendUtility::getRecordTitle('pages', $parentRecord)) . ' (uid=' . $record['pid'] . ')">' . $record['uid'] . '</span></td>' . '<td>' . htmlspecialchars($this->getFieldName($row['tablename'], $row['field'])) . '</td>' . '<td>' . htmlspecialchars($row['flexpointer']) . '</td>' . '<td>' . htmlspecialchars($row['softref_key']) . '</td>' . '<td>' . htmlspecialchars($row['sorting']) . '</td>' . '</tr>';
+                       $infoData[] = '<tr class="bgColor4">' . '<td style="white-space:nowrap;">' . $actions . '</td>' . '<td>' . $GLOBALS['LANG']->sL($GLOBALS['TCA'][$row['tablename']]['ctrl']['title'], TRUE) . '</td>' . '<td>' . BackendUtility::getRecordTitle($row['tablename'], $record, TRUE) . '</td>' . '<td><span title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_common.xlf:page') . ': ' . htmlspecialchars(BackendUtility::getRecordTitle('pages', $parentRecord)) . ' (uid=' . $record['pid'] . ')">' . $record['uid'] . '</span></td>' . '<td>' . htmlspecialchars($this->getFieldName($row['tablename'], $row['field'])) . '</td>' . '<td>' . htmlspecialchars($row['flexpointer']) . '</td>' . '<td>' . htmlspecialchars($row['softref_key']) . '</td>' . '<td>' . htmlspecialchars($row['sorting']) . '</td>' . '</tr>';
                }
                $referenceLine = '';
                if (count($infoData)) {
@@ -492,7 +501,11 @@ class ElementInformationController {
         * @return array
         */
        protected function transformFileReferenceToRecordReference(array $referenceRecord) {
-               $fileReference = $GLOBALS['TYPO3_DB']->exec_SELECTgetSingleRow('*', 'sys_file_reference', 'uid=' . (int)$referenceRecord['recuid']);
+               $fileReference = $GLOBALS['TYPO3_DB']->exec_SELECTgetSingleRow(
+                       '*',
+                       'sys_file_reference',
+                       'uid=' . (int)$referenceRecord['recuid']
+               );
                return array(
                        'recuid' => $fileReference['uid_foreign'],
                        'tablename' => $fileReference['tablenames'],
@@ -514,7 +527,11 @@ class ElementInformationController {
        public function makeRefFrom($table, $ref) {
                // Look up the path:
                // @TODO files not respected (see makeRef)
-               $rows = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('*', 'sys_refindex', 'tablename=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($table, 'sys_refindex') . ' AND recuid=' . intval($ref));
+               $rows = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows(
+                       '*',
+                       'sys_refindex',
+                       'tablename=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($table, 'sys_refindex') . ' AND recuid=' . intval($ref)
+               );
                // Compile information for title tag:
                $infoData = array();
                if (count($rows)) {
@@ -533,5 +550,4 @@ class ElementInformationController {
 
 }
 
-
 ?>
\ No newline at end of file
index 28e5569..c8e304b 100644 (file)
@@ -27,6 +27,10 @@ namespace TYPO3\CMS\Backend\Controller\ContentElement;
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
 
+use TYPO3\CMS\Backend\Utility\BackendUtility;
+use TYPO3\CMS\Backend\Utility\IconUtility;
+use TYPO3\CMS\Core\Utility\GeneralUtility;
+
 /**
  * Script Class for rendering the move-element wizard display
  *
@@ -99,17 +103,17 @@ class MoveElementController {
         */
        public function init() {
                // Setting internal vars:
-               $this->sys_language = intval(\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('sys_language'));
-               $this->page_id = intval(\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('uid'));
-               $this->table = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('table');
-               $this->R_URI = \TYPO3\CMS\Core\Utility\GeneralUtility::sanitizeLocalUrl(\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('returnUrl'));
-               $this->input_moveUid = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('moveUid');
+               $this->sys_language = intval(GeneralUtility::_GP('sys_language'));
+               $this->page_id = intval(GeneralUtility::_GP('uid'));
+               $this->table = GeneralUtility::_GP('table');
+               $this->R_URI = GeneralUtility::sanitizeLocalUrl(GeneralUtility::_GP('returnUrl'));
+               $this->input_moveUid = GeneralUtility::_GP('moveUid');
                $this->moveUid = $this->input_moveUid ? $this->input_moveUid : $this->page_id;
-               $this->makeCopy = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('makeCopy');
+               $this->makeCopy = GeneralUtility::_GP('makeCopy');
                // Select-pages where clause for read-access:
                $this->perms_clause = $GLOBALS['BE_USER']->getPagePermsClause(1);
                // Starting the document template object:
-               $this->doc = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Template\\DocumentTemplate');
+               $this->doc = GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Template\\DocumentTemplate');
                $this->doc->backPath = $GLOBALS['BACK_PATH'];
                $this->doc->setModuleTemplate('EXT:backend/Resources/Private/Templates/move_el.html');
                $this->doc->JScode = '';
@@ -127,13 +131,13 @@ class MoveElementController {
        public function main() {
                if ($this->page_id) {
                        // Get record for element:
-                       $elRow = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecordWSOL($this->table, $this->moveUid);
+                       $elRow = BackendUtility::getRecordWSOL($this->table, $this->moveUid);
                        // Headerline: Icon, record title:
-                       $hline = \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIconForRecord($this->table, $elRow, array('id' => 'c-recIcon', 'title' => htmlspecialchars(\TYPO3\CMS\Backend\Utility\BackendUtility::getRecordIconAltText($elRow, $this->table))));
-                       $hline .= \TYPO3\CMS\Backend\Utility\BackendUtility::getRecordTitle($this->table, $elRow, TRUE);
+                       $hline = IconUtility::getSpriteIconForRecord($this->table, $elRow, array('id' => 'c-recIcon', 'title' => htmlspecialchars(BackendUtility::getRecordIconAltText($elRow, $this->table))));
+                       $hline .= BackendUtility::getRecordTitle($this->table, $elRow, TRUE);
                        // Make-copy checkbox (clicking this will reload the page with the GET var makeCopy set differently):
                        $hline .= $this->doc->spacer(5);
-                       $onClick = 'window.location.href=\'' . \TYPO3\CMS\Core\Utility\GeneralUtility::linkThisScript(array('makeCopy' => !$this->makeCopy)) . '\';';
+                       $onClick = 'window.location.href=\'' . GeneralUtility::linkThisScript(array('makeCopy' => !$this->makeCopy)) . '\';';
                        $hline .= $this->doc->spacer(5);
                        $hline .= '<input type="hidden" name="makeCopy" value="0" />' . '<input type="checkbox" name="makeCopy" id="makeCopy" value="1"' . ($this->makeCopy ? ' checked="checked"' : '') . ' onclick="' . htmlspecialchars($onClick) . '" /> <label for="makeCopy" class="t3-label-valign-top">' . $GLOBALS['LANG']->getLL('makeCopy', 1) . '</label>';
                        // Add the header-content to the module content:
@@ -144,19 +148,19 @@ class MoveElementController {
                        // IF the table is "pages":
                        if ((string) $this->table == 'pages') {
                                // Get page record (if accessible):
-                               $pageinfo = \TYPO3\CMS\Backend\Utility\BackendUtility::readPageAccess($this->page_id, $this->perms_clause);
+                               $pageinfo = BackendUtility::readPageAccess($this->page_id, $this->perms_clause);
                                if (is_array($pageinfo) && $GLOBALS['BE_USER']->isInWebMount($pageinfo['pid'], $this->perms_clause)) {
                                        // Initialize the position map:
-                                       $posMap = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('ext_posMap_pages');
+                                       $posMap = GeneralUtility::makeInstance('ext_posMap_pages');
                                        $posMap->moveOrCopy = $this->makeCopy ? 'copy' : 'move';
                                        // Print a "go-up" link IF there is a real parent page (and if the user has read-access to that page).
                                        if ($pageinfo['pid']) {
-                                               $pidPageInfo = \TYPO3\CMS\Backend\Utility\BackendUtility::readPageAccess($pageinfo['pid'], $this->perms_clause);
+                                               $pidPageInfo = BackendUtility::readPageAccess($pageinfo['pid'], $this->perms_clause);
                                                if (is_array($pidPageInfo)) {
                                                        if ($GLOBALS['BE_USER']->isInWebMount($pidPageInfo['pid'], $this->perms_clause)) {
-                                                               $code .= '<a href="' . htmlspecialchars(\TYPO3\CMS\Core\Utility\GeneralUtility::linkThisScript(array('uid' => intval($pageinfo['pid']), 'moveUid' => $this->moveUid))) . '">' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-view-go-up') . \TYPO3\CMS\Backend\Utility\BackendUtility::getRecordTitle('pages', $pidPageInfo, TRUE) . '</a><br />';
+                                                               $code .= '<a href="' . htmlspecialchars(GeneralUtility::linkThisScript(array('uid' => intval($pageinfo['pid']), 'moveUid' => $this->moveUid))) . '">' . IconUtility::getSpriteIcon('actions-view-go-up') . BackendUtility::getRecordTitle('pages', $pidPageInfo, TRUE) . '</a><br />';
                                                        } else {
-                                                               $code .= \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIconForRecord('pages', $pidPageInfo) . \TYPO3\CMS\Backend\Utility\BackendUtility::getRecordTitle('pages', $pidPageInfo, TRUE) . '<br />';
+                                                               $code .= IconUtility::getSpriteIconForRecord('pages', $pidPageInfo) . BackendUtility::getRecordTitle('pages', $pidPageInfo, TRUE) . '<br />';
                                                        }
                                                }
                                        }
@@ -167,46 +171,45 @@ class MoveElementController {
                        // IF the table is "tt_content":
                        if ((string) $this->table == 'tt_content') {
                                // First, get the record:
-                               $tt_content_rec = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecord('tt_content', $this->moveUid);
+                               $tt_content_rec = BackendUtility::getRecord('tt_content', $this->moveUid);
                                // ?
                                if (!$this->input_moveUid) {
                                        $this->page_id = $tt_content_rec['pid'];
                                }
                                // Checking if the parent page is readable:
-                               $pageinfo = \TYPO3\CMS\Backend\Utility\BackendUtility::readPageAccess($this->page_id, $this->perms_clause);
+                               $pageinfo = BackendUtility::readPageAccess($this->page_id, $this->perms_clause);
                                if (is_array($pageinfo) && $GLOBALS['BE_USER']->isInWebMount($pageinfo['pid'], $this->perms_clause)) {
                                        // Initialize the position map:
-                                       $posMap = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('ext_posMap_tt_content');
+                                       $posMap = GeneralUtility::makeInstance('ext_posMap_tt_content');
                                        $posMap->moveOrCopy = $this->makeCopy ? 'copy' : 'move';
                                        $posMap->cur_sys_language = $this->sys_language;
                                        // Headerline for the parent page: Icon, record title:
-                                       $hline = \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIconForRecord('pages', $pageinfo, array('title' => htmlspecialchars(\TYPO3\CMS\Backend\Utility\BackendUtility::getRecordIconAltText($pageinfo, 'pages'))));
-                                       $hline .= \TYPO3\CMS\Backend\Utility\BackendUtility::getRecordTitle('pages', $pageinfo, TRUE);
+                                       $hline = IconUtility::getSpriteIconForRecord('pages', $pageinfo, array('title' => htmlspecialchars(BackendUtility::getRecordIconAltText($pageinfo, 'pages'))));
+                                       $hline .= BackendUtility::getRecordTitle('pages', $pageinfo, TRUE);
                                        // Load SHARED page-TSconfig settings and retrieve column list from there, if applicable:
                                        // SHARED page-TSconfig settings.
-                                       $modTSconfig_SHARED = \TYPO3\CMS\Backend\Utility\BackendUtility::getModTSconfig($this->page_id, 'mod.SHARED');
-                                       $colPosArray = \TYPO3\CMS\Core\Utility\GeneralUtility::callUserFunction('TYPO3\\CMS\\Backend\\View\\BackendLayoutView->getColPosListItemsParsed', $this->page_id, $this);
+                                       $modTSconfig_SHARED = BackendUtility::getModTSconfig($this->page_id, 'mod.SHARED');
+                                       $colPosArray = GeneralUtility::callUserFunction('TYPO3\\CMS\\Backend\\View\\BackendLayoutView->getColPosListItemsParsed', $this->page_id, $this);
                                        foreach ($colPosArray as $colPos) {
                                                $colPosList .= $colPosList != '' ? ',' . $colPos[1] : $colPos[1];
                                        }
                                        // Removing duplicates, if any
-                                       $colPosList = implode(',', array_unique(\TYPO3\CMS\Core\Utility\GeneralUtility::intExplode(',', $colPosList)));
+                                       $colPosList = implode(',', array_unique(GeneralUtility::intExplode(',', $colPosList)));
                                        // Adding parent page-header and the content element columns from position-map:
                                        $code = $hline . '<br />';
                                        $code .= $posMap->printContentElementColumns($this->page_id, $this->moveUid, $colPosList, 1, $this->R_URI);
                                        // Print a "go-up" link IF there is a real parent page (and if the user has read-access to that page).
-                                       $code .= '<br />';
-                                       $code .= '<br />';
+                                       $code .= '<br /><br />';
                                        if ($pageinfo['pid']) {
-                                               $pidPageInfo = \TYPO3\CMS\Backend\Utility\BackendUtility::readPageAccess($pageinfo['pid'], $this->perms_clause);
+                                               $pidPageInfo = BackendUtility::readPageAccess($pageinfo['pid'], $this->perms_clause);
                                                if (is_array($pidPageInfo)) {
                                                        if ($GLOBALS['BE_USER']->isInWebMount($pidPageInfo['pid'], $this->perms_clause)) {
-                                                               $code .= '<a href="' . htmlspecialchars(\TYPO3\CMS\Core\Utility\GeneralUtility::linkThisScript(array(
+                                                               $code .= '<a href="' . htmlspecialchars(GeneralUtility::linkThisScript(array(
                                                                        'uid' => intval($pageinfo['pid']),
                                                                        'moveUid' => $this->moveUid
-                                                               ))) . '">' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-view-go-up') . \TYPO3\CMS\Backend\Utility\BackendUtility::getRecordTitle('pages', $pidPageInfo, TRUE) . '</a><br />';
+                                                               ))) . '">' . IconUtility::getSpriteIcon('actions-view-go-up') . BackendUtility::getRecordTitle('pages', $pidPageInfo, TRUE) . '</a><br />';
                                                        } else {
-                                                               $code .= \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIconForRecord('pages', $pidPageInfo) . \TYPO3\CMS\Backend\Utility\BackendUtility::getRecordTitle('pages', $pidPageInfo, TRUE) . '<br />';
+                                                               $code .= IconUtility::getSpriteIconForRecord('pages', $pidPageInfo) . BackendUtility::getRecordTitle('pages', $pidPageInfo, TRUE) . '<br />';
                                                        }
                                                }
                                        }
@@ -250,15 +253,12 @@ class MoveElementController {
                );
                if ($this->page_id) {
                        if ((string) $this->table == 'pages') {
-                               // CSH
-                               $buttons['csh'] = \TYPO3\CMS\Backend\Utility\BackendUtility::cshItem('xMOD_csh_corebe', 'move_el_pages', $GLOBALS['BACK_PATH'], '', TRUE);
+                               $buttons['csh'] = BackendUtility::cshItem('xMOD_csh_corebe', 'move_el_pages', $GLOBALS['BACK_PATH'], '', TRUE);
                        } elseif ((string) $this->table == 'tt_content') {
-                               // CSH
-                               $buttons['csh'] = \TYPO3\CMS\Backend\Utility\BackendUtility::cshItem('xMOD_csh_corebe', 'move_el_cs', $GLOBALS['BACK_PATH'], '', TRUE);
+                               $buttons['csh'] = BackendUtility::cshItem('xMOD_csh_corebe', 'move_el_cs', $GLOBALS['BACK_PATH'], '', TRUE);
                        }
                        if ($this->R_URI) {
-                               // Back
-                               $buttons['back'] = '<a href="' . htmlspecialchars($this->R_URI) . '" class="typo3-goBack" title="' . $GLOBALS['LANG']->getLL('goBack', TRUE) . '">' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-view-go-back') . '</a>';
+                               $buttons['back'] = '<a href="' . htmlspecialchars($this->R_URI) . '" class="typo3-goBack" title="' . $GLOBALS['LANG']->getLL('goBack', TRUE) . '">' . IconUtility::getSpriteIcon('actions-view-go-back') . '</a>';
                        }
                }
                return $buttons;
@@ -266,5 +266,4 @@ class MoveElementController {
 
 }
 
-
 ?>
\ No newline at end of file
index e119e8c..90a9d5f 100644 (file)
@@ -27,6 +27,10 @@ namespace TYPO3\CMS\Backend\Controller\ContentElement;
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
 
+use TYPO3\CMS\Backend\Utility\BackendUtility;
+use TYPO3\CMS\Backend\Utility\IconUtility;
+use TYPO3\CMS\Core\Utility\GeneralUtility;
+
 /**
  * Script Class for the New Content element wizard
  *
@@ -116,17 +120,17 @@ class NewContentElementController {
                        $this->include_once = array_merge($this->include_once, $GLOBALS['TBE_MODULES_EXT']['xMOD_db_new_content_el']['addElClasses']);
                }
                // Setting internal vars:
-               $this->id = intval(\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('id'));
-               $this->sys_language = intval(\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('sys_language_uid'));
-               $this->R_URI = \TYPO3\CMS\Core\Utility\GeneralUtility::sanitizeLocalUrl(\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('returnUrl'));
-               $this->colPos = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('colPos');
-               $this->uid_pid = intval(\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('uid_pid'));
+               $this->id = intval(GeneralUtility::_GP('id'));
+               $this->sys_language = intval(GeneralUtility::_GP('sys_language_uid'));
+               $this->R_URI = GeneralUtility::sanitizeLocalUrl(GeneralUtility::_GP('returnUrl'));
+               $this->colPos = GeneralUtility::_GP('colPos');
+               $this->uid_pid = intval(GeneralUtility::_GP('uid_pid'));
                $this->MCONF['name'] = 'xMOD_db_new_content_el';
-               $this->modTSconfig = \TYPO3\CMS\Backend\Utility\BackendUtility::getModTSconfig($this->id, 'mod.wizards.newContentElement');
-               $config = \TYPO3\CMS\Backend\Utility\BackendUtility::getPagesTSconfig($this->id);
+               $this->modTSconfig = BackendUtility::getModTSconfig($this->id, 'mod.wizards.newContentElement');
+               $config = BackendUtility::getPagesTSconfig($this->id);
                $this->config = $config['mod.']['wizards.']['newContentElement.'];
                // Starting the document template object:
-               $this->doc = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Template\\DocumentTemplate');
+               $this->doc = GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Template\\DocumentTemplate');
                $this->doc->backPath = $GLOBALS['BACK_PATH'];
                $this->doc->setModuleTemplate('EXT:backend/Resources/Private/Templates/db_new_content_el.html');
                $this->doc->JScode = '';
@@ -135,7 +139,7 @@ class NewContentElementController {
                $this->doc->getContextMenuCode();
                // Getting the current page and receiving access information (used in main())
                $perms_clause = $GLOBALS['BE_USER']->getPagePermsClause(1);
-               $this->pageinfo = \TYPO3\CMS\Backend\Utility\BackendUtility::readPageAccess($this->id, $perms_clause);
+               $this->pageinfo = BackendUtility::readPageAccess($this->id, $perms_clause);
                $this->access = is_array($this->pageinfo) ? 1 : 0;
        }
 
@@ -148,7 +152,7 @@ class NewContentElementController {
        public function main() {
                if ($this->id && $this->access) {
                        // Init position map object:
-                       $posMap = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('ext_posMap');
+                       $posMap = GeneralUtility::makeInstance('ext_posMap');
                        $posMap->cur_sys_language = $this->sys_language;
                        $posMap->backPath = $GLOBALS['BACK_PATH'];
                        // If a column is pre-set:
@@ -183,7 +187,7 @@ class NewContentElementController {
                        // Hook for manipulating wizardItems, wrapper, onClickEvent etc.
                        if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms']['db_new_content_el']['wizardItemsHook'])) {
                                foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms']['db_new_content_el']['wizardItemsHook'] as $classData) {
-                                       $hookObject = \TYPO3\CMS\Core\Utility\GeneralUtility::getUserObj($classData);
+                                       $hookObject = GeneralUtility::getUserObj($classData);
                                        if (!$hookObject instanceof \TYPO3\CMS\Backend\Wizard\NewContentElementWizardHookInterface) {
                                                throw new \UnexpectedValueException('$hookObject must implement interface cms_newContentElementWizardItemsHook', 1227834741);
                                        }
@@ -233,7 +237,7 @@ class NewContentElementController {
                                        // Icon:
                                        $iInfo = @getimagesize($wInfo['icon']);
                                        $content .= $this->elementWrapper['wizardPart'][0] . '<a href="#" onclick="' . htmlspecialchars($aOnClick) . '">
-                                               <img' . \TYPO3\CMS\Backend\Utility\IconUtility::skinImg($this->doc->backPath, $wInfo['icon'], '') . ' alt="" /></a>' . $this->elementWrapper['wizardPart'][1];
+                                               <img' . IconUtility::skinImg($this->doc->backPath, $wInfo['icon'], '') . ' alt="" /></a>' . $this->elementWrapper['wizardPart'][1];
                                        // Title + description:
                                        $content .= $this->elementWrapper['wizardPart'][0] . '<a href="#" onclick="' . htmlspecialchars($aOnClick) . '"><strong>' . htmlspecialchars($wInfo['title']) . '</strong><br />' . nl2br(htmlspecialchars(trim($wInfo['description']))) . '</a>' . $this->elementWrapper['wizardPart'][1];
                                        // Finally, put it together in a container:
@@ -268,9 +272,9 @@ class NewContentElementController {
                                // Select position
                                $code = $GLOBALS['LANG']->getLL('sel2', 1) . '<br /><br />';
                                // Load SHARED page-TSconfig settings and retrieve column list from there, if applicable:
-                               $modTSconfig_SHARED = \TYPO3\CMS\Backend\Utility\BackendUtility::getModTSconfig($this->id, 'mod.SHARED');
+                               $modTSconfig_SHARED = BackendUtility::getModTSconfig($this->id, 'mod.SHARED');
                                $colPosList = strcmp(trim($modTSconfig_SHARED['properties']['colPos_list']), '') ? trim($modTSconfig_SHARED['properties']['colPos_list']) : '1,0,2,3';
-                               $colPosList = implode(',', array_unique(\TYPO3\CMS\Core\Utility\GeneralUtility::intExplode(',', $colPosList)));
+                               $colPosList = implode(',', array_unique(GeneralUtility::intExplode(',', $colPosList)));
                                // Removing duplicates, if any
                                // Finally, add the content of the column selector to the content:
                                $code .= $posMap->printContentElementColumns($this->id, 0, $colPosList, 1, $this->R_URI);
@@ -317,11 +321,9 @@ class NewContentElementController {
                        'back' => ''
                );
                if ($this->id && $this->access) {
-                       // CSH
-                       $buttons['csh'] = \TYPO3\CMS\Backend\Utility\BackendUtility::cshItem('xMOD_csh_corebe', 'new_ce', $GLOBALS['BACK_PATH'], '', TRUE);
-                       // Back
+                       $buttons['csh'] = BackendUtility::cshItem('xMOD_csh_corebe', 'new_ce', $GLOBALS['BACK_PATH'], '', TRUE);
                        if ($this->R_URI) {
-                               $buttons['back'] = '<a href="' . htmlspecialchars($this->R_URI) . '" class="typo3-goBack" title="' . $GLOBALS['LANG']->getLL('goBack', TRUE) . '">' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-view-go-back') . '</a>';
+                               $buttons['back'] = '<a href="' . htmlspecialchars($this->R_URI) . '" class="typo3-goBack" title="' . $GLOBALS['LANG']->getLL('goBack', TRUE) . '">' . IconUtility::getSpriteIcon('actions-view-go-back') . '</a>';
                        }
                }
                return $buttons;
@@ -358,7 +360,7 @@ class NewContentElementController {
                if (is_array($wizards)) {
                        foreach ($wizards as $groupKey => $wizardGroup) {
                                $groupKey = preg_replace('/\\.$/', '', $groupKey);
-                               $showItems = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $wizardGroup['show'], TRUE);
+                               $showItems = GeneralUtility::trimExplode(',', $wizardGroup['show'], TRUE);
                                $showAll = strcmp($wizardGroup['show'], '*') ? FALSE : TRUE;
                                $groupItems = array();
                                if (is_array($appendWizards[$groupKey . '.']['elements.'])) {
@@ -400,7 +402,7 @@ class NewContentElementController {
                if (is_array($GLOBALS['TBE_MODULES_EXT']['xMOD_db_new_content_el']['addElClasses'])) {
                        foreach ($GLOBALS['TBE_MODULES_EXT']['xMOD_db_new_content_el']['addElClasses'] as $class => $path) {
                                require_once $path;
-                               $modObj = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance($class);
+                               $modObj = GeneralUtility::makeInstance($class);
                                $wizardElements = $modObj->proc($wizardElements);
                        }
                }
@@ -451,21 +453,21 @@ class NewContentElementController {
        public function removeInvalidElements(&$wizardItems) {
                // Get TCEFORM from TSconfig of current page
                $row = array('pid' => $this->id);
-               $TCEFORM_TSconfig = \TYPO3\CMS\Backend\Utility\BackendUtility::getTCEFORM_TSconfig('tt_content', $row);
-               $removeItems = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $TCEFORM_TSconfig['CType']['removeItems'], 1);
-               $keepItems = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $TCEFORM_TSconfig['CType']['keepItems'], 1);
+               $TCEFORM_TSconfig = BackendUtility::getTCEFORM_TSconfig('tt_content', $row);
+               $removeItems = GeneralUtility::trimExplode(',', $TCEFORM_TSconfig['CType']['removeItems'], 1);
+               $keepItems = GeneralUtility::trimExplode(',', $TCEFORM_TSconfig['CType']['keepItems'], 1);
                $headersUsed = array();
                // Traverse wizard items:
                foreach ($wizardItems as $key => $cfg) {
                        // Exploding parameter string, if any (old style)
                        if ($wizardItems[$key]['params']) {
                                // Explode GET vars recursively
-                               $tempGetVars = \TYPO3\CMS\Core\Utility\GeneralUtility::explodeUrl2Array($wizardItems[$key]['params'], TRUE);
+                               $tempGetVars = GeneralUtility::explodeUrl2Array($wizardItems[$key]['params'], TRUE);
                                // If tt_content values are set, merge them into the tt_content_defValues array, unset them from $tempGetVars and re-implode $tempGetVars into the param string (in case remaining parameters are around).
                                if (is_array($tempGetVars['defVals']['tt_content'])) {
                                        $wizardItems[$key]['tt_content_defValues'] = array_merge(is_array($wizardItems[$key]['tt_content_defValues']) ? $wizardItems[$key]['tt_content_defValues'] : array(), $tempGetVars['defVals']['tt_content']);
                                        unset($tempGetVars['defVals']['tt_content']);
-                                       $wizardItems[$key]['params'] = \TYPO3\CMS\Core\Utility\GeneralUtility::implodeArrayForUrl('', $tempGetVars);
+                                       $wizardItems[$key]['params'] = GeneralUtility::implodeArrayForUrl('', $tempGetVars);
                                }
                        }
                        // If tt_content_defValues are defined...:
@@ -502,5 +504,4 @@ class NewContentElementController {
 
 }
 
-
 ?>
\ No newline at end of file
index 2ba9658..3d30655 100644 (file)
@@ -27,6 +27,15 @@ namespace TYPO3\CMS\Backend\Controller;
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
 
+use TYPO3\CMS\Backend\Form\FormEngine;
+use TYPO3\CMS\Backend\Utility\BackendUtility;
+use TYPO3\CMS\Backend\Utility\IconUtility;
+use TYPO3\CMS\Core\Html\HtmlParser;
+use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
+use TYPO3\CMS\Core\Utility\GeneralUtility;
+use TYPO3\CMS\Core\Utility\HttpUtility;
+use TYPO3\CMS\Core\Utility\MathUtility;
+
 /**
  * Script Class: Drawing the editing form for editing records in TYPO3.
  * Notice: It does NOT use tce_db.php to submit data to, rather it handles submissions itself
@@ -349,20 +358,20 @@ class EditDocumentController {
         * @todo Define visibility
         */
        public function preInit() {
-               if (\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('justLocalized')) {
-                       $this->localizationRedirect(\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('justLocalized'));
+               if (GeneralUtility::_GP('justLocalized')) {
+                       $this->localizationRedirect(GeneralUtility::_GP('justLocalized'));
                }
                // Setting GPvars:
-               $this->editconf = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('edit');
-               $this->defVals = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('defVals');
-               $this->overrideVals = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('overrideVals');
-               $this->columnsOnly = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('columnsOnly');
-               $this->returnUrl = \TYPO3\CMS\Core\Utility\GeneralUtility::sanitizeLocalUrl(\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('returnUrl'));
-               $this->closeDoc = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('closeDoc');
-               $this->doSave = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('doSave');
-               $this->returnEditConf = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('returnEditConf');
-               $this->localizationMode = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('localizationMode');
-               $this->uc = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('uc');
+               $this->editconf = GeneralUtility::_GP('edit');
+               $this->defVals = GeneralUtility::_GP('defVals');
+               $this->overrideVals = GeneralUtility::_GP('overrideVals');
+               $this->columnsOnly = GeneralUtility::_GP('columnsOnly');
+               $this->returnUrl = GeneralUtility::sanitizeLocalUrl(GeneralUtility::_GP('returnUrl'));
+               $this->closeDoc = GeneralUtility::_GP('closeDoc');
+               $this->doSave = GeneralUtility::_GP('doSave');
+               $this->returnEditConf = GeneralUtility::_GP('returnEditConf');
+               $this->localizationMode = GeneralUtility::_GP('localizationMode');
+               $this->uc = GeneralUtility::_GP('uc');
                // Setting override values as default if defVals does not exist.
                if (!is_array($this->defVals) && is_array($this->overrideVals)) {
                        $this->defVals = $this->overrideVals;
@@ -372,8 +381,8 @@ class EditDocumentController {
                // Fix $this->editconf if versioning applies to any of the records
                $this->fixWSversioningInEditConf();
                // Make R_URL (request url) based on input GETvars:
-               $this->R_URL_parts = parse_url(\TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('REQUEST_URI'));
-               $this->R_URL_getvars = \TYPO3\CMS\Core\Utility\GeneralUtility::_GET();
+               $this->R_URL_parts = parse_url(GeneralUtility::getIndpEnv('REQUEST_URI'));
+               $this->R_URL_getvars = GeneralUtility::_GET();
                $this->R_URL_getvars['edit'] = $this->editconf;
                // MAKE url for storing
                $this->compileStoreDat();
@@ -414,18 +423,18 @@ class EditDocumentController {
         */
        public function processData() {
                // GPvars specifically for processing:
-               $control = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('control');
-               $this->data = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('data');
-               $this->cmd = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('cmd');
-               $this->mirror = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('mirror');
-               $this->cacheCmd = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('cacheCmd');
-               $this->redirect = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('redirect');
-               $this->returnNewPageId = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('returnNewPageId');
-               $this->vC = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('vC');
+               $control = GeneralUtility::_GP('control');
+               $this->data = GeneralUtility::_GP('data');
+               $this->cmd = GeneralUtility::_GP('cmd');
+               $this->mirror = GeneralUtility::_GP('mirror');
+               $this->cacheCmd = GeneralUtility::_GP('cacheCmd');
+               $this->redirect = GeneralUtility::_GP('redirect');
+               $this->returnNewPageId = GeneralUtility::_GP('returnNewPageId');
+               $this->vC = GeneralUtility::_GP('vC');
                // See tce_db.php for relevate options here:
                // Only options related to $this->data submission are included here.
                /** @var $tce \TYPO3\CMS\Core\DataHandling\DataHandler */
-               $tce = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\DataHandling\\DataHandler');
+               $tce = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\DataHandling\\DataHandler');
                $tce->stripslashes_values = 0;
 
                if (!empty($control)) {
@@ -456,11 +465,11 @@ class EditDocumentController {
                }
                // If pages are being edited, we set an instruction about updating the page tree after this operation.
                if (isset($this->data['pages']) || $GLOBALS['BE_USER']->workspace != 0 && count($this->data)) {
-                       \TYPO3\CMS\Backend\Utility\BackendUtility::setUpdateSignal('updatePageTree');
+                       BackendUtility::setUpdateSignal('updatePageTree');
                }
                // Checking referer / executing
-               $refInfo = parse_url(\TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('HTTP_REFERER'));
-               $httpHost = \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_HOST_ONLY');
+               $refInfo = parse_url(GeneralUtility::getIndpEnv('HTTP_REFERER'));
+               $httpHost = GeneralUtility::getIndpEnv('TYPO3_HOST_ONLY');
                if ($httpHost != $refInfo['host'] && $this->vC != $GLOBALS['BE_USER']->veriCode() && !$GLOBALS['TYPO3_CONF_VARS']['SYS']['doNotCheckReferer']) {
                        $tce->log('', 0, 0, 0, 1, 'Referer host \'%s\' and server host \'%s\' did not match and veriCode was not valid either!', 1, array($refInfo['host'], $httpHost));
                        debug('Error: Referer host did not match with server host.');
@@ -482,7 +491,7 @@ class EditDocumentController {
                                                        // Check if the $editId isn't a child record of an IRRE action
                                                        if (!(is_array($tce->newRelatedIDs[$tableName]) && in_array($editId, $tce->newRelatedIDs[$tableName]))) {
                                                                // Translate new id to the workspace version:
-                                                               if ($versionRec = \TYPO3\CMS\Backend\Utility\BackendUtility::getWorkspaceVersionOfRecord($GLOBALS['BE_USER']->workspace, $tableName, $editId, 'uid')) {
+                                                               if ($versionRec = BackendUtility::getWorkspaceVersionOfRecord($GLOBALS['BE_USER']->workspace, $tableName, $editId, 'uid')) {
                                                                        $editId = $versionRec['uid'];
                                                                }
                                                                $newEditConf[$tableName][$editId] = 'edit';
@@ -519,7 +528,7 @@ class EditDocumentController {
                                // Finding the first id, getting the records pid+uid
                                reset($this->editconf[$nTable]);
                                $nUid = key($this->editconf[$nTable]);
-                               $nRec = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecord($nTable, $nUid, 'pid,uid');
+                               $nRec = BackendUtility::getRecord($nTable, $nUid, 'pid,uid');
                                // Setting a blank editconf array for a new record:
                                $this->editconf = array();
                                if ($this->getNewIconMode($nTable) == 'top') {
@@ -532,7 +541,7 @@ class EditDocumentController {
                                // Re-compile the store* values since editconf changed...
                                $this->compileStoreDat();
                        }
-                       $tce->printLogErrorMessages(isset($_POST['_saveandclosedok_x']) || isset($_POST['_translation_savedok_x']) ? $this->retUrl : $this->R_URL_parts['path'] . '?' . \TYPO3\CMS\Core\Utility\GeneralUtility::implodeArrayForUrl('', $this->R_URL_getvars));
+                       $tce->printLogErrorMessages(isset($_POST['_saveandclosedok_x']) || isset($_POST['_translation_savedok_x']) ? $this->retUrl : $this->R_URL_parts['path'] . '?' . GeneralUtility::implodeArrayForUrl('', $this->R_URL_getvars));
                }
                //  || count($tce->substNEWwithIDs)... If any new items has been save, the document is CLOSED
                // because if not, we just get that element re-listed as new. And we don't want that!
@@ -549,17 +558,17 @@ class EditDocumentController {
         */
        public function init() {
                // Setting more GPvars:
-               $this->popViewId = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('popViewId');
-               $this->popViewId_addParams = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('popViewId_addParams');
-               $this->viewUrl = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('viewUrl');
-               $this->editRegularContentFromId = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('editRegularContentFromId');
-               $this->recTitle = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('recTitle');
-               $this->disHelp = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('disHelp');
-               $this->noView = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('noView');
+               $this->popViewId = GeneralUtility::_GP('popViewId');
+               $this->popViewId_addParams = GeneralUtility::_GP('popViewId_addParams');
+               $this->viewUrl = GeneralUtility::_GP('viewUrl');
+               $this->editRegularContentFromId = GeneralUtility::_GP('editRegularContentFromId');
+               $this->recTitle = GeneralUtility::_GP('recTitle');
+               $this->disHelp = GeneralUtility::_GP('disHelp');
+               $this->noView = GeneralUtility::_GP('noView');
                $this->perms_clause = $GLOBALS['BE_USER']->getPagePermsClause(1);
                // Set other internal variables:
                $this->R_URL_getvars['returnUrl'] = $this->retUrl;
-               $this->R_URI = $this->R_URL_parts['path'] . '?' . \TYPO3\CMS\Core\Utility\GeneralUtility::implodeArrayForUrl('', $this->R_URL_getvars);
+               $this->R_URI = $this->R_URL_parts['path'] . '?' . GeneralUtility::implodeArrayForUrl('', $this->R_URL_getvars);
                // MENU-ITEMS:
                // If array, then it's a selector box menu
                // If empty string it's just a variable, that'll be saved.
@@ -570,7 +579,7 @@ class EditDocumentController {
                // Setting virtual document name
                $this->MCONF['name'] = 'xMOD_alt_doc.php';
                // CLEANSE SETTINGS
-               $this->MOD_SETTINGS = \TYPO3\CMS\Backend\Utility\BackendUtility::getModuleData($this->MOD_MENU, \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('SET'), $this->MCONF['name']);
+               $this->MOD_SETTINGS = BackendUtility::getModuleData($this->MOD_MENU, GeneralUtility::_GP('SET'), $this->MCONF['name']);
                // Create an instance of the document template object
                $this->doc = $GLOBALS['TBE_TEMPLATE'];
                $this->doc->backPath = $GLOBALS['BACK_PATH'];
@@ -609,14 +618,14 @@ class EditDocumentController {
                                if (
                                        ' . ($GLOBALS['BE_USER']->jsConfirmation(4) ? 'confirm(' . $GLOBALS['LANG']->JScharCode($GLOBALS['LANG']->getLL('deleteWarning')) . ')' : '1==1') . '
                                )       {
-                                       window.location.href = "tce_db.php?cmd["+table+"]["+id+"][delete]=1' . \TYPO3\CMS\Backend\Utility\BackendUtility::getUrlToken('tceAction') . '&redirect="+escape(url)+"&vC=' . $GLOBALS['BE_USER']->veriCode() . '&prErr=1&uPT=1";
+                                       window.location.href = "tce_db.php?cmd["+table+"]["+id+"][delete]=1' . BackendUtility::getUrlToken('tceAction') . '&redirect="+escape(url)+"&vC=' . $GLOBALS['BE_USER']->veriCode() . '&prErr=1&uPT=1";
                                }
                                return false;
                        }
-               ' . (isset($_POST['_savedokview_x']) && $this->popViewId ? 'if (window.opener) { ' . \TYPO3\CMS\Backend\Utility\BackendUtility::viewOnClick($this->popViewId, '', \TYPO3\CMS\Backend\Utility\BackendUtility::BEgetRootLine($this->popViewId), '', $this->viewUrl, $this->popViewId_addParams, FALSE) . ' } else { ' . \TYPO3\CMS\Backend\Utility\BackendUtility::viewOnClick($this->popViewId, '', \TYPO3\CMS\Backend\Utility\BackendUtility::BEgetRootLine($this->popViewId), '', $this->viewUrl, $this->popViewId_addParams) . ' } ' : ''));
+               ' . (isset($_POST['_savedokview_x']) && $this->popViewId ? 'if (window.opener) { ' . BackendUtility::viewOnClick($this->popViewId, '', BackendUtility::BEgetRootLine($this->popViewId), '', $this->viewUrl, $this->popViewId_addParams, FALSE) . ' } else { ' . BackendUtility::viewOnClick($this->popViewId, '', BackendUtility::BEgetRootLine($this->popViewId), '', $this->viewUrl, $this->popViewId_addParams) . ' } ' : ''));
                // Setting up the context sensitive menu:
                $this->doc->getContextMenuCode();
-               $this->doc->bodyTagAdditions = 'onload="window.scrollTo(0,' . \TYPO3\CMS\Core\Utility\MathUtility::forceIntegerInRange(\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('_scrollPosition'), 0, 10000) . ');"';
+               $this->doc->bodyTagAdditions = 'onload="window.scrollTo(0,' . MathUtility::forceIntegerInRange(GeneralUtility::_GP('_scrollPosition'), 0, 10000) . ');"';
        }
 
        /**
@@ -629,10 +638,10 @@ class EditDocumentController {
                // Begin edit:
                if (is_array($this->editconf)) {
                        // Initialize TCEforms (rendering the forms)
-                       $this->tceforms = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Form\\FormEngine');
+                       $this->tceforms = GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Form\\FormEngine');
                        $this->tceforms->initDefaultBEMode();
                        $this->tceforms->doSaveFieldName = 'doSave';
-                       $this->tceforms->localizationMode = \TYPO3\CMS\Core\Utility\GeneralUtility::inList('text,media', $this->localizationMode) ? $this->localizationMode : '';
+                       $this->tceforms->localizationMode = GeneralUtility::inList('text,media', $this->localizationMode) ? $this->localizationMode : '';
                        // text,media is keywords defined in TYPO3 Core API..., see "l10n_cat"
                        $this->tceforms->returnUrl = $this->R_URI;
                        $this->tceforms->palettesCollapsed = !$this->MOD_SETTINGS['showPalettes'];
@@ -641,7 +650,7 @@ class EditDocumentController {
                        $this->tceforms->enableTabMenu = TRUE;
                        // Clipboard is initialized:
                        // Start clipboard
-                       $this->tceforms->clipObj = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Clipboard\\Clipboard');
+                       $this->tceforms->clipObj = GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Clipboard\\Clipboard');
                        // Initialize - reads the clipboard content from the user session
                        $this->tceforms->clipObj->initializeClipboard();
                        // Setting external variables:
@@ -657,10 +666,10 @@ class EditDocumentController {
                                if ((strcmp($this->docDat[1], $this->storeUrlMd5) || !isset($this->docHandler[$this->storeUrlMd5])) && !$this->dontStoreDocumentRef) {
                                        $this->docHandler[$this->storeUrlMd5] = array($this->storeTitle, $this->storeArray, $this->storeUrl, $this->firstEl);
                                        $GLOBALS['BE_USER']->pushModuleData('alt_doc.php', array($this->docHandler, $this->storeUrlMd5));
-                                       \TYPO3\CMS\Backend\Utility\BackendUtility::setUpdateSignal('OpendocsController::updateNumber', count($this->docHandler));
+                                       BackendUtility::setUpdateSignal('OpendocsController::updateNumber', count($this->docHandler));
                                }
                                // Module configuration
-                               $this->modTSconfig = $this->viewId ? \TYPO3\CMS\Backend\Utility\BackendUtility::getModTSconfig($this->viewId, 'mod.xMOD_alt_doc') : array();
+                               $this->modTSconfig = $this->viewId ? BackendUtility::getModTSconfig($this->viewId, 'mod.xMOD_alt_doc') : array();
                                $body .= $this->tceforms->printNeededJSFunctions_top();
                                $body .= $this->compileForm($editForm);
                                $body .= $this->tceforms->printNeededJSFunctions();
@@ -670,7 +679,7 @@ class EditDocumentController {
                }
                // Access check...
                // The page will show only if there is a valid page and if this page may be viewed by the user
-               $this->pageinfo = \TYPO3\CMS\Backend\Utility\BackendUtility::readPageAccess($this->viewId, $this->perms_clause);
+               $this->pageinfo = BackendUtility::readPageAccess($this->viewId, $this->perms_clause);
                // Setting up the buttons and markers for docheader
                $docHeaderButtons = $this->getButtons();
                $markers = array(
@@ -723,7 +732,7 @@ class EditDocumentController {
                                foreach ($conf as $cKey => $cmd) {
                                        if ($cmd == 'edit' || $cmd == 'new') {
                                                // Get the ids:
-                                               $ids = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $cKey, 1);
+                                               $ids = GeneralUtility::trimExplode(',', $cKey, 1);
                                                // Traverse the ids:
                                                foreach ($ids as $theUid) {
                                                        // Checking if the user has permissions? (Only working as a precaution,
@@ -743,11 +752,11 @@ class EditDocumentController {
                                                                        // Find parent page on which the new record reside
                                                                        // Less than zero - find parent page
                                                                        if ($theUid < 0) {
-                                                                               $calcPRec = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecord($table, abs($theUid));
-                                                                               $calcPRec = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecord('pages', $calcPRec['pid']);
+                                                                               $calcPRec = BackendUtility::getRecord($table, abs($theUid));
+                                                                               $calcPRec = BackendUtility::getRecord('pages', $calcPRec['pid']);
                                                                        } else {
                                                                                // always a page
-                                                                               $calcPRec = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecord('pages', abs($theUid));
+                                                                               $calcPRec = BackendUtility::getRecord('pages', abs($theUid));
                                                                        }
                                                                        // Now, calculate whether the user has access to creating new records on this position:
                                                                        if (is_array($calcPRec)) {
@@ -767,8 +776,8 @@ class EditDocumentController {
                                                                $this->dontStoreDocumentRef = 1;
                                                        } else {
                                                                // Edit:
-                                                               $calcPRec = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecord($table, $theUid);
-                                                               \TYPO3\CMS\Backend\Utility\BackendUtility::fixVersioningPid($table, $calcPRec);
+                                                               $calcPRec = BackendUtility::getRecord($table, $theUid);
+                                                               BackendUtility::fixVersioningPid($table, $calcPRec);
                                                                if (is_array($calcPRec)) {
                                                                        if ($table == 'pages') { // If pages:
                                                                                $CALC_PERMS = $GLOBALS['BE_USER']->calcPerms($calcPRec);
@@ -777,7 +786,7 @@ class EditDocumentController {
                                                                                $this->viewId = $calcPRec['uid'];
                                                                        } else {
                                                                                // Fetching pid-record first
-                                                                               $CALC_PERMS = $GLOBALS['BE_USER']->calcPerms(\TYPO3\CMS\Backend\Utility\BackendUtility::getRecord('pages', $calcPRec['pid']));
+                                                                               $CALC_PERMS = $GLOBALS['BE_USER']->calcPerms(BackendUtility::getRecord('pages', $calcPRec['pid']));
                                                                                $hasAccess = $CALC_PERMS & 16 ? 1 : 0;
                                                                                $deleteAccess = $CALC_PERMS & 16 ? 1 : 0;
                                                                                $this->viewId = $calcPRec['pid'];
@@ -787,7 +796,7 @@ class EditDocumentController {
                                                                                }
                                                                        }
                                                                        // Check internals regarding access:
-                                                                       $isRootLevelRestrictionIgnored = \TYPO3\CMS\Backend\Utility\BackendUtility::isRootLevelRestrictionIgnored($table);
+                                                                       $isRootLevelRestrictionIgnored = BackendUtility::isRootLevelRestrictionIgnored($table);
                                                                        if ($hasAccess || (string) $calcPRec['pid'] === '0' && $isRootLevelRestrictionIgnored) {
                                                                                $hasAccess = $GLOBALS['BE_USER']->recordEditAccessInternals($table, $calcPRec);
                                                                                $deniedAccessReason = $GLOBALS['BE_USER']->errorMsg;
@@ -804,14 +813,14 @@ class EditDocumentController {
                                                                                'cmd' => $cmd,
                                                                                'hasAccess' => $hasAccess
                                                                        );
-                                                                       $hasAccess = \TYPO3\CMS\Core\Utility\GeneralUtility::callUserFunction($_funcRef, $_params, $this);
+                                                                       $hasAccess = GeneralUtility::callUserFunction($_funcRef, $_params, $this);
                                                                }
                                                        }
                                                        // AT THIS POINT we have checked the access status of the editing/creation of
                                                        // records and we can now proceed with creating the form elements:
                                                        if ($hasAccess) {
                                                                $prevPageID = is_object($trData) ? $trData->prevPageID : '';
-                                                               $trData = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Form\\DataPreprocessor');
+                                                               $trData = GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Form\\DataPreprocessor');
                                                                $trData->addRawData = TRUE;
                                                                $trData->defVals = $this->defVals;
                                                                $trData->lockRecords = 1;
@@ -836,7 +845,7 @@ class EditDocumentController {
                                                                        // Setting visual path / title of form:
                                                                        $this->generalPathOfForm = $this->tceforms->getRecordPath($table, $rec);
                                                                        if (!$this->storeTitle) {
-                                                                               $this->storeTitle = $this->recTitle ? htmlspecialchars($this->recTitle) : \TYPO3\CMS\Backend\Utility\BackendUtility::getRecordTitle($table, $rec, TRUE);
+                                                                               $this->storeTitle = $this->recTitle ? htmlspecialchars($this->recTitle) : BackendUtility::getRecordTitle($table, $rec, TRUE);
                                                                        }
                                                                        // Setting variables in TCEforms object:
                                                                        $this->tceforms->hiddenFieldList = '';
@@ -864,10 +873,10 @@ class EditDocumentController {
                                                                                $this->newC++;
                                                                        }
                                                                        // Display "is-locked" message:
-                                                                       if ($lockInfo = \TYPO3\CMS\Backend\Utility\BackendUtility::isRecordLocked($table, $rec['uid'])) {
-                                                                               $flashMessage = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessage', htmlspecialchars($lockInfo['msg']), '', \TYPO3\CMS\Core\Messaging\FlashMessage::WARNING);
+                                                                       if ($lockInfo = BackendUtility::isRecordLocked($table, $rec['uid'])) {
+                                                                               $flashMessage = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessage', htmlspecialchars($lockInfo['msg']), '', \TYPO3\CMS\Core\Messaging\FlashMessage::WARNING);
                                                                                /** @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);
@@ -912,51 +921,51 @@ class EditDocumentController {
                // The action of each button is decided by its name attribute. (See doProcessData())
                if (!$this->errorC && !$GLOBALS['TCA'][$this->firstEl['table']]['ctrl']['readOnly']) {
                        // SAVE button:
-                       $buttons['save'] = \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-document-save', array('html' => '<input type="image" name="_savedok" class="c-inputButton" src="clear.gif" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:rm.saveDoc', 1) . '" />'));
+                       $buttons['save'] = IconUtility::getSpriteIcon('actions-document-save', array('html' => '<input type="image" name="_savedok" class="c-inputButton" src="clear.gif" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:rm.saveDoc', 1) . '" />'));
                        // SAVE / VIEW button:
-                       if ($this->viewId && !$this->noView && \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('cms') && $this->getNewIconMode($this->firstEl['table'], 'saveDocView')) {
-                               $buttons['save_view'] = \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-document-save-view', array('html' => '<input type="image" class="c-inputButton" name="_savedokview" src="clear.gif" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:rm.saveDocShow', 1) . '" />'));
+                       if ($this->viewId && !$this->noView && ExtensionManagementUtility::isLoaded('cms') && $this->getNewIconMode($this->firstEl['table'], 'saveDocView')) {
+                               $buttons['save_view'] = IconUtility::getSpriteIcon('actions-document-save-view', array('html' => '<input type="image" class="c-inputButton" name="_savedokview" src="clear.gif" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:rm.saveDocShow', 1) . '" />'));
                        }
                        // SAVE / NEW button:
                        if (count($this->elementsData) == 1 && $this->getNewIconMode($this->firstEl['table'])) {
-                               $buttons['save_new'] = \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-document-save-new', array('html' => '<input type="image" class="c-inputButton" name="_savedoknew" src="clear.gif" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:rm.saveNewDoc', 1) . '" />'));
+                               $buttons['save_new'] = IconUtility::getSpriteIcon('actions-document-save-new', array('html' => '<input type="image" class="c-inputButton" name="_savedoknew" src="clear.gif" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:rm.saveNewDoc', 1) . '" />'));
                        }
                        // SAVE / CLOSE
-                       $buttons['save_close'] = \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-document-save-close', array('html' => '<input type="image" class="c-inputButton" name="_saveandclosedok" src="clear.gif" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:rm.saveCloseDoc', 1) . '" />'));
+                       $buttons['save_close'] = IconUtility::getSpriteIcon('actions-document-save-close', array('html' => '<input type="image" class="c-inputButton" name="_saveandclosedok" src="clear.gif" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:rm.saveCloseDoc', 1) . '" />'));
                        // FINISH TRANSLATION / SAVE / CLOSE
                        if ($GLOBALS['TYPO3_CONF_VARS']['BE']['explicitConfirmationOfTranslation']) {
-                               $buttons['translation_save'] = '<input type="image" class="c-inputButton" name="_translation_savedok" src="' . \TYPO3\CMS\Backend\Utility\IconUtility::skinImg($this->doc->backPath, 'gfx/translationsavedok.gif', '', 1) . '" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:rm.translationSaveDoc', 1) . '" />';
-                               $buttons['translation_saveclear'] = '<input type="image" class="c-inputButton" name="_translation_savedokclear" src="' . \TYPO3\CMS\Backend\Utility\IconUtility::skinImg($this->doc->backPath, 'gfx/translationsavedok_clear.gif', '', 1) . '" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:rm.translationSaveDocClear', 1) . '" />';
+                               $buttons['translation_save'] = '<input type="image" class="c-inputButton" name="_translation_savedok" src="' . IconUtility::skinImg($this->doc->backPath, 'gfx/translationsavedok.gif', '', 1) . '" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:rm.translationSaveDoc', 1) . '" />';
+                               $buttons['translation_saveclear'] = '<input type="image" class="c-inputButton" name="_translation_savedokclear" src="' . IconUtility::skinImg($this->doc->backPath, 'gfx/translationsavedok_clear.gif', '', 1) . '" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:rm.translationSaveDocClear', 1) . '" />';
                        }
                }
                // CLOSE button:
-               $buttons['close'] = '<a href="#" onclick="document.editform.closeDoc.value=1; document.editform.submit(); return false;" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:rm.closeDoc', TRUE) . '">' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-document-close') . '</a>';
+               $buttons['close'] = '<a href="#" onclick="document.editform.closeDoc.value=1; document.editform.submit(); return false;" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:rm.closeDoc', TRUE) . '">' . IconUtility::getSpriteIcon('actions-document-close') . '</a>';
                // DELETE + UNDO buttons:
                if (!$this->errorC && !$GLOBALS['TCA'][$this->firstEl['table']]['ctrl']['readOnly'] && count($this->elementsData) == 1) {
-                       if ($this->firstEl['cmd'] != 'new' && \TYPO3\CMS\Core\Utility\MathUtility::canBeInterpretedAsInteger($this->firstEl['uid'])) {
+                       if ($this->firstEl['cmd'] != 'new' && MathUtility::canBeInterpretedAsInteger($this->firstEl['uid'])) {
                                // Delete:
                                if ($this->firstEl['deleteAccess'] && !$GLOBALS['TCA'][$this->firstEl['table']]['ctrl']['readOnly'] && !$this->getNewIconMode($this->firstEl['table'], 'disableDelete')) {
                                        $aOnClick = 'return deleteRecord(\'' . $this->firstEl['table'] . '\',\'' . $this->firstEl['uid'] . '\', unescape(\'' . rawurlencode($this->retUrl) . '\'));';
-                                       $buttons['delete'] = '<a href="#" onclick="' . htmlspecialchars($aOnClick) . '" title="' . $GLOBALS['LANG']->getLL('deleteItem', TRUE) . '">' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-edit-delete') . '</a>';
+                                       $buttons['delete'] = '<a href="#" onclick="' . htmlspecialchars($aOnClick) . '" title="' . $GLOBALS['LANG']->getLL('deleteItem', TRUE) . '">' . IconUtility::getSpriteIcon('actions-edit-delete') . '</a>';
                                }
                                // Undo:
                                $undoRes = $GLOBALS['TYPO3_DB']->exec_SELECTquery('tstamp', 'sys_history', 'tablename=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($this->firstEl['table'], 'sys_history') . ' AND recuid=' . intval($this->firstEl['uid']), '', 'tstamp DESC', '1');
                                if ($undoButtonR = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($undoRes)) {
                                        $aOnClick = 'window.location.href=\'show_rechis.php?element=' . rawurlencode(($this->firstEl['table'] . ':' . $this->firstEl['uid'])) . '&revert=ALL_FIELDS&sumUp=-1&returnUrl=' . rawurlencode($this->R_URI) . '\'; return false;';
-                                       $buttons['undo'] = '<a href="#" onclick="' . htmlspecialchars($aOnClick) . '"' . ' title="' . htmlspecialchars(sprintf($GLOBALS['LANG']->getLL('undoLastChange'), \TYPO3\CMS\Backend\Utility\BackendUtility::calcAge(($GLOBALS['EXEC_TIME'] - $undoButtonR['tstamp']), $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:labels.minutesHoursDaysYears')))) . '">' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-edit-undo') . '</a>';
+                                       $buttons['undo'] = '<a href="#" onclick="' . htmlspecialchars($aOnClick) . '"' . ' title="' . htmlspecialchars(sprintf($GLOBALS['LANG']->getLL('undoLastChange'), BackendUtility::calcAge(($GLOBALS['EXEC_TIME'] - $undoButtonR['tstamp']), $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:labels.minutesHoursDaysYears')))) . '">' . IconUtility::getSpriteIcon('actions-edit-undo') . '</a>';
                                }
                                if ($this->getNewIconMode($this->firstEl['table'], 'showHistory')) {
                                        $aOnClick = 'window.location.href=\'show_rechis.php?element=' . rawurlencode(($this->firstEl['table'] . ':' . $this->firstEl['uid'])) . '&returnUrl=' . rawurlencode($this->R_URI) . '\'; return false;';
-                                       $buttons['history'] = '<a href="#" onclick="' . htmlspecialchars($aOnClick) . '">' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-document-history-open') . '</a>';
+                                       $buttons['history'] = '<a href="#" onclick="' . htmlspecialchars($aOnClick) . '">' . IconUtility::getSpriteIcon('actions-document-history-open') . '</a>';
                                }
                                // If only SOME fields are shown in the form, this will link the user to the FULL form:
                                if ($this->columnsOnly) {
-                                       $buttons['columns_only'] = '<a href="' . htmlspecialchars(($this->R_URI . '&columnsOnly=')) . '" title="' . $GLOBALS['LANG']->getLL('editWholeRecord', TRUE) . '">' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-document-open') . '</a>';
+                                       $buttons['columns_only'] = '<a href="' . htmlspecialchars(($this->R_URI . '&columnsOnly=')) . '" title="' . $GLOBALS['LANG']->getLL('editWholeRecord', TRUE) . '">' . IconUtility::getSpriteIcon('actions-document-open') . '</a>';
                                }
                        }
                }
                // add the CSH icon
-               $buttons['csh'] = \TYPO3\CMS\Backend\Utility\BackendUtility::cshItem('xMOD_csh_corebe', 'TCEforms', $GLOBALS['BACK_PATH'], '', TRUE);
+               $buttons['csh'] = BackendUtility::cshItem('xMOD_csh_corebe', 'TCEforms', $GLOBALS['BACK_PATH'], '', TRUE);
                $buttons['shortcut'] = $this->shortCutLink();
                $buttons['open_in_new_window'] = $this->openInNewWindowLink();
                return $buttons;
@@ -987,8 +996,8 @@ class EditDocumentController {
        public function extraFormHeaders() {
                $extraTemplate = '';
                if (is_array($this->tceforms->extraFormHeaders)) {
-                       $extraTemplate = \TYPO3\CMS\Core\Html\HtmlParser::getSubpart($this->doc->moduleTemplate, '###DOCHEADER_EXTRAHEADER###');
-                       $extraTemplate = \TYPO3\CMS\Core\Html\HtmlParser::substituteMarker($extraTemplate, '###EXTRAHEADER###', implode(LF, $this->tceforms->extraFormHeaders));
+                       $extraTemplate = HtmlParser::getSubpart($this->doc->moduleTemplate, '###DOCHEADER_EXTRAHEADER###');
+                       $extraTemplate = HtmlParser::substituteMarker($extraTemplate, '###EXTRAHEADER###', implode(LF, $this->tceforms->extraFormHeaders));
                }
                return $extraTemplate;
        }
@@ -1018,7 +1027,7 @@ class EditDocumentController {
                        <input type="hidden" name="closeDoc" value="0" />
                        <input type="hidden" name="doSave" value="0" />
                        <input type="hidden" name="_serialNumber" value="' . md5(microtime()) . '" />
-                       <input type="hidden" name="_scrollPosition" value="" />' . \TYPO3\CMS\Backend\Form\FormEngine::getHiddenTokenField('editRecord');
+                       <input type="hidden" name="_scrollPosition" value="" />' . FormEngine::getHiddenTokenField('editRecord');
                return $formContent;
        }
 
@@ -1033,7 +1042,7 @@ class EditDocumentController {
                        // Show palettes:
                        return '
                                <!-- Function menu (checkbox for showing all palettes): -->
-                               <br />' . \TYPO3\CMS\Backend\Utility\BackendUtility::getFuncCheck('', 'SET[showPalettes]', $this->MOD_SETTINGS['showPalettes'], 'alt_doc.php', (\TYPO3\CMS\Core\Utility\GeneralUtility::implodeArrayForUrl('', array_merge($this->R_URL_getvars, array('SET' => ''))) . \TYPO3\CMS\Backend\Utility\BackendUtility::getUrlToken('editRecord')), 'id="checkShowPalettes"') . '<label for="checkShowPalettes">' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:labels.showPalettes', 1) . '</label>';
+                               <br />' . BackendUtility::getFuncCheck('', 'SET[showPalettes]', $this->MOD_SETTINGS['showPalettes'], 'alt_doc.php', (GeneralUtility::implodeArrayForUrl('', array_merge($this->R_URL_getvars, array('SET' => ''))) . BackendUtility::getUrlToken('editRecord')), 'id="checkShowPalettes"') . '<label for="checkShowPalettes">' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:labels.showPalettes', 1) . '</label>';
                } else {
                        return '';
                }
@@ -1062,8 +1071,8 @@ class EditDocumentController {
                if ($this->returnUrl == 'close.html') {
                        return '';
                }
-               $aOnClick = 'vHWin=window.open(\'' . \TYPO3\CMS\Core\Utility\GeneralUtility::linkThisScript(array('returnUrl' => 'close.html')) . '\',\'' . md5($this->R_URI) . '\',\'width=670,height=500,status=0,menubar=0,scrollbars=1,resizable=1\');vHWin.focus();return false;';
-               return '<a href="#" onclick="' . htmlspecialchars($aOnClick) . '" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:labels.openInNewWindow', TRUE) . '">' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-window-open') . '</a>';
+               $aOnClick = 'vHWin=window.open(\'' . GeneralUtility::linkThisScript(array('returnUrl' => 'close.html')) . '\',\'' . md5($this->R_URI) . '\',\'width=670,height=500,status=0,menubar=0,scrollbars=1,resizable=1\');vHWin.focus();return false;';
+               return '<a href="#" onclick="' . htmlspecialchars($aOnClick) . '" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:labels.openInNewWindow', TRUE) . '">' . IconUtility::getSpriteIcon('actions-window-open') . '</a>';
        }
 
        /**
@@ -1105,7 +1114,7 @@ class EditDocumentController {
                // Table editable and activated for languages?
                if ($GLOBALS['BE_USER']->check('tables_modify', $table) && $languageField && $transOrigPointerField && !$GLOBALS['TCA'][$table]['ctrl']['transOrigPointerTable']) {
                        if (is_null($pid)) {
-                               $row = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecord($table, $uid, 'pid');
+                               $row = BackendUtility::getRecord($table, $uid, 'pid');
                                $pid = $row['pid'];
                        }
                        // Get all avalibale languages for the page
@@ -1115,25 +1124,25 @@ class EditDocumentController {
                                $rowsByLang = array();
                                $fetchFields = 'uid,' . $languageField . ',' . $transOrigPointerField;
                                // Get record in current language
-                               $rowCurrent = \TYPO3\CMS\Backend\Utility\BackendUtility::getLiveVersionOfRecord($table, $uid, $fetchFields);
+                               $rowCurrent = BackendUtility::getLiveVersionOfRecord($table, $uid, $fetchFields);
                                if (!is_array($rowCurrent)) {
-                                       $rowCurrent = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecord($table, $uid, $fetchFields);
+                                       $rowCurrent = BackendUtility::getRecord($table, $uid, $fetchFields);
                                }
                                $currentLanguage = $rowCurrent[$languageField];
                                // Disabled for records with [all] language!
                                if ($currentLanguage > -1) {
                                        // Get record in default language if needed
                                        if ($currentLanguage && $rowCurrent[$transOrigPointerField]) {
-                                               $rowsByLang[0] = \TYPO3\CMS\Backend\Utility\BackendUtility::getLiveVersionOfRecord($table, $rowCurrent[$transOrigPointerField], $fetchFields);
+                                               $rowsByLang[0] = BackendUtility::getLiveVersionOfRecord($table, $rowCurrent[$transOrigPointerField], $fetchFields);
                                                if (!is_array($rowsByLang[0])) {
-                                                       $rowsByLang[0] = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecord($table, $rowCurrent[$transOrigPointerField], $fetchFields);
+                                                       $rowsByLang[0] = BackendUtility::getRecord($table, $rowCurrent[$transOrigPointerField], $fetchFields);
                                                }
                                        } else {
                                                $rowsByLang[$rowCurrent[$languageField]] = $rowCurrent;
                                        }
                                        if ($rowCurrent[$transOrigPointerField] || $currentLanguage === '0') {
                                                // Get record in other languages to see what's already available
-                                               $translations = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows($fetchFields, $table, 'pid=' . intval($pid) . ' AND ' . $languageField . '>0' . ' AND ' . $transOrigPointerField . '=' . intval($rowsByLang[0]['uid']) . \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause($table) . \TYPO3\CMS\Backend\Utility\BackendUtility::versioningPlaceholderClause($table));
+                                               $translations = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows($fetchFields, $table, 'pid=' . intval($pid) . ' AND ' . $languageField . '>0' . ' AND ' . $transOrigPointerField . '=' . intval($rowsByLang[0]['uid']) . BackendUtility::deleteClause($table) . BackendUtility::versioningPlaceholderClause($table));
                                                foreach ($translations as $row) {
                                                        $rowsByLang[$row[$languageField]] = $row;
                                                }
@@ -1144,11 +1153,11 @@ class EditDocumentController {
                                                        $newTranslation = isset($rowsByLang[$lang['uid']]) ? '' : ' [' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:labels.new', 1) . ']';
                                                        // Create url for creating a localized record
                                                        if ($newTranslation) {
-                                                               $href = $this->doc->issueCommand('&cmd[' . $table . '][' . $rowsByLang[0]['uid'] . '][localize]=' . $lang['uid'], $this->backPath . 'alt_doc.php?justLocalized=' . rawurlencode(($table . ':' . $rowsByLang[0]['uid'] . ':' . $lang['uid'])) . '&returnUrl=' . rawurlencode($this->retUrl) . \TYPO3\CMS\Backend\Utility\BackendUtility::getUrlToken('editRecord'));
+                                                               $href = $this->doc->issueCommand('&cmd[' . $table . '][' . $rowsByLang[0]['uid'] . '][localize]=' . $lang['uid'], $this->backPath . 'alt_doc.php?justLocalized=' . rawurlencode(($table . ':' . $rowsByLang[0]['uid'] . ':' . $lang['uid'])) . '&returnUrl=' . rawurlencode($this->retUrl) . BackendUtility::getUrlToken('editRecord'));
                                                        } else {
                                                                $href = $this->backPath . 'alt_doc.php?';
                                                                $href .= '&edit[' . $table . '][' . $rowsByLang[$lang['uid']]['uid'] . ']=edit';
-                                                               $href .= '&returnUrl=' . rawurlencode($this->retUrl) . \TYPO3\CMS\Backend\Utility\BackendUtility::getUrlToken('editRecord');
+                                                               $href .= '&returnUrl=' . rawurlencode($this->retUrl) . BackendUtility::getUrlToken('editRecord');
                                                        }
                                                        $langSelItems[$lang['uid']] = '
                                                                <option value="' . htmlspecialchars($href) . '"' . ($currentLanguage == $lang['uid'] ? ' selected="selected"' : '') . '>' . htmlspecialchars(($lang['title'] . $newTranslation)) . '</option>';
@@ -1177,13 +1186,13 @@ class EditDocumentController {
        public function localizationRedirect($justLocalized) {
                list($table, $orig_uid, $language) = explode(':', $justLocalized);
                if ($GLOBALS['TCA'][$table] && $GLOBALS['TCA'][$table]['ctrl']['languageField'] && $GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField']) {
-                       $localizedRecord = $GLOBALS['TYPO3_DB']->exec_SELECTgetSingleRow('uid', $table, $GLOBALS['TCA'][$table]['ctrl']['languageField'] . '=' . intval($language) . ' AND ' . $GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField'] . '=' . intval($orig_uid) . \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause($table) . \TYPO3\CMS\Backend\Utility\BackendUtility::versioningPlaceholderClause($table));
+                       $localizedRecord = $GLOBALS['TYPO3_DB']->exec_SELECTgetSingleRow('uid', $table, $GLOBALS['TCA'][$table]['ctrl']['languageField'] . '=' . intval($language) . ' AND ' . $GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField'] . '=' . intval($orig_uid) . BackendUtility::deleteClause($table) . BackendUtility::versioningPlaceholderClause($table));
                        if (is_array($localizedRecord)) {
                                // Create parameters and finally run the classic page module for creating a new page translation
                                $params = '&edit[' . $table . '][' . $localizedRecord['uid'] . ']=edit';
-                               $returnUrl = '&returnUrl=' . rawurlencode(\TYPO3\CMS\Core\Utility\GeneralUtility::sanitizeLocalUrl(\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('returnUrl')));
-                               $location = $GLOBALS['BACK_PATH'] . 'alt_doc.php?' . $params . $returnUrl . \TYPO3\CMS\Backend\Utility\BackendUtility::getUrlToken('editRecord');
-                               \TYPO3\CMS\Core\Utility\HttpUtility::redirect($location);
+                               $returnUrl = '&returnUrl=' . rawurlencode(GeneralUtility::sanitizeLocalUrl(GeneralUtility::_GP('returnUrl')));
+                               $location = $GLOBALS['BACK_PATH'] . 'alt_doc.php?' . $params . $returnUrl . BackendUtility::getUrlToken('editRecord');
+                               HttpUtility::redirect($location);
                        }
                }
        }
@@ -1196,7 +1205,7 @@ class EditDocumentController {
         * @todo Define visibility
         */
        public function getLanguages($id) {
-               $modSharedTSconfig = \TYPO3\CMS\Backend\Utility\BackendUtility::getModTSconfig($id, 'mod.SHARED');
+               $modSharedTSconfig = BackendUtility::getModTSconfig($id, 'mod.SHARED');
                // Fallback non sprite-configuration
                if (preg_match('/\\.gif$/', $modSharedTSconfig['properties']['defaultLanguageFlag'])) {
                        $modSharedTSconfig['properties']['defaultLanguageFlag'] = str_replace('.gif', '', $modSharedTSconfig['properties']['defaultLanguageFlag']);
@@ -1212,7 +1221,7 @@ class EditDocumentController {
                );
                $exQ = $GLOBALS['BE_USER']->isAdmin() ? '' : ' AND sys_language.hidden=0';
                if ($id) {
-                       $rows = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('sys_language.*', 'pages_language_overlay,sys_language', 'pages_language_overlay.sys_language_uid=sys_language.uid AND pages_language_overlay.pid=' . intval($id) . \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause('pages_language_overlay') . $exQ, 'pages_language_overlay.sys_language_uid,sys_language.uid,sys_language.pid,sys_language.tstamp,sys_language.hidden,sys_language.title,sys_language.static_lang_isocode,sys_language.flag', 'sys_language.title');
+                       $rows = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('sys_language.*', 'pages_language_overlay,sys_language', 'pages_language_overlay.sys_language_uid=sys_language.uid AND pages_language_overlay.pid=' . intval($id) . BackendUtility::deleteClause('pages_language_overlay') . $exQ, 'pages_language_overlay.sys_language_uid,sys_language.uid,sys_language.pid,sys_language.tstamp,sys_language.hidden,sys_language.title,sys_language.static_lang_isocode,sys_language.flag', 'sys_language.title');
                } else {
                        $rows = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('sys_language.*', 'sys_language', 'sys_language.hidden=0', '', 'sys_language.title');
                }
@@ -1247,7 +1256,7 @@ class EditDocumentController {
                                        foreach ($conf as $cKey => $cmd) {
                                                if ($cmd == 'edit') {
                                                        // Traverse the ids:
-                                                       $ids = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $cKey, 1);
+                                                       $ids = GeneralUtility::trimExplode(',', $cKey, 1);
                                                        foreach ($ids as $idKey => $theUid) {
                                                                if (is_array($mapArray)) {
                                                                        if ($mapArray[$table][$theUid]) {
@@ -1285,7 +1294,7 @@ class EditDocumentController {
         */
        public function getRecordForEdit($table, $theUid) {
                // Fetch requested record:
-               $reqRecord = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecord($table, $theUid, 'uid,pid');
+               $reqRecord = BackendUtility::getRecord($table, $theUid, 'uid,pid');
                if (is_array($reqRecord)) {
                        // If workspace is OFFLINE:
                        if ($GLOBALS['BE_USER']->workspace != 0) {
@@ -1298,7 +1307,7 @@ class EditDocumentController {
                                        } else {
                                                // The input record was online and an offline version must be found or made:
                                                // Look for version of this workspace:
-                                               $versionRec = \TYPO3\CMS\Backend\Utility\BackendUtility::getWorkspaceVersionOfRecord($GLOBALS['BE_USER']->workspace, $table, $reqRecord['uid'], 'uid,pid,t3ver_oid');
+                                               $versionRec = BackendUtility::getWorkspaceVersionOfRecord($GLOBALS['BE_USER']->workspace, $table, $reqRecord['uid'], 'uid,pid,t3ver_oid');
                                                return is_array($versionRec) ? $versionRec : $reqRecord;
                                        }
                                } else {
@@ -1322,8 +1331,8 @@ class EditDocumentController {
         * @todo Define visibility
         */
        public function editRegularContentFromId() {
-               if (\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('cms')) {
-                       $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('uid', 'tt_content', 'pid=' . intval($this->editRegularContentFromId) . \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause('tt_content') . \TYPO3\CMS\Backend\Utility\BackendUtility::versioningPlaceholderClause('tt_content') . ' AND colPos=0 AND sys_language_uid=0', '', 'sorting');
+               if (ExtensionManagementUtility::isLoaded('cms')) {
+                       $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('uid', 'tt_content', 'pid=' . intval($this->editRegularContentFromId) . BackendUtility::deleteClause('tt_content') . BackendUtility::versioningPlaceholderClause('tt_content') . ' AND colPos=0 AND sys_language_uid=0', '', 'sorting');
                        if ($GLOBALS['TYPO3_DB']->sql_num_rows($res)) {
                                $ecUids = array();
                                while ($ecRec = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
@@ -1343,8 +1352,8 @@ class EditDocumentController {
         * @todo Define visibility
         */
        public function compileStoreDat() {
-               $this->storeArray = \TYPO3\CMS\Core\Utility\GeneralUtility::compileSelectedGetVarsFromArray('edit,defVals,overrideVals,columnsOnly,disHelp,noView,editRegularContentFromId', $this->R_URL_getvars);
-               $this->storeUrl = \TYPO3\CMS\Core\Utility\GeneralUtility::implodeArrayForUrl('', $this->storeArray);
+               $this->storeArray = GeneralUtility::compileSelectedGetVarsFromArray('edit,defVals,overrideVals,columnsOnly,disHelp,noView,editRegularContentFromId', $this->R_URL_getvars);
+               $this->storeUrl = GeneralUtility::implodeArrayForUrl('', $this->storeArray);
                $this->storeUrlMd5 = md5($this->storeUrl);
        }
 
@@ -1391,7 +1400,7 @@ class EditDocumentController {
                        }
                        $GLOBALS['BE_USER']->pushModuleData('opendocs::recent', $recentDocs);
                        $GLOBALS['BE_USER']->pushModuleData('alt_doc.php', array($this->docHandler, $this->docDat[1]));
-                       \TYPO3\CMS\Backend\Utility\BackendUtility::setUpdateSignal('OpendocsController::updateNumber', count($this->docHandler));
+                       BackendUtility::setUpdateSignal('OpendocsController::updateNumber', count($this->docHandler));
                }
                // If ->returnEditConf is set, then add the current content of editconf to the ->retUrl variable: (used by other scripts, like wizard_add, to know which records was created or so...)
                if ($this->returnEditConf && $this->retUrl != 'dummy.php') {
@@ -1399,7 +1408,7 @@ class EditDocumentController {
                }
                // If code is NOT set OR set to 1, then make a header location redirect to $this->retUrl
                if (!$code || $code == 1) {
-                       \TYPO3\CMS\Core\Utility\HttpUtility::redirect($this->retUrl);
+                       HttpUtility::redirect($this->retUrl);
                } else {
                        $this->setDocument('', $this->retUrl);
                }
@@ -1415,7 +1424,7 @@ class EditDocumentController {
         * @todo Define visibility
         */
        public function setDocument($currentDocFromHandlerMD5 = '', $retUrl = 'alt_doc_nodoc.php') {
-               if (!\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('cms') && !strcmp($retUrl, 'alt_doc_nodoc.php')) {
+               if (!ExtensionManagementUtility::isLoaded('cms') && !strcmp($retUrl, 'alt_doc_nodoc.php')) {
                        return;
                }
                if (!$this->modTSconfig['properties']['disableDocSelector'] && is_array($this->docHandler) && count($this->docHandler)) {
@@ -1425,14 +1434,13 @@ class EditDocumentController {
                                $setupArr = reset($this->docHandler);
                        }
                        if ($setupArr[2]) {
-                               $sParts = parse_url(\TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('REQUEST_URI'));
+                               $sParts = parse_url(GeneralUtility::getIndpEnv('REQUEST_URI'));
                                $retUrl = $sParts['path'] . '?' . $setupArr[2] . '&returnUrl=' . rawurlencode($retUrl);
                        }
                }
-               \TYPO3\CMS\Core\Utility\HttpUtility::redirect($retUrl);
+               HttpUtility::redirect($retUrl);
        }
 
 }
 
-
 ?>
\ No newline at end of file
index 0bc7c7a..0cc9f99 100644 (file)
@@ -27,6 +27,9 @@ namespace TYPO3\CMS\Backend\Controller\File;
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
 
+use TYPO3\CMS\Backend\Utility\BackendUtility;
+use TYPO3\CMS\Core\Utility\GeneralUtility;
+
 /**
  * Script Class for the create-new script; Displays a form for creating up to 10 folders or one new text file
  *
@@ -95,9 +98,9 @@ class CreateFolderController {
         */
        public function init() {
                // Initialize GPvars:
-               $this->number = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('number');
-               $this->target = ($combinedIdentifier = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('target'));
-               $this->returnUrl = \TYPO3\CMS\Core\Utility\GeneralUtility::sanitizeLocalUrl(\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('returnUrl'));
+               $this->number = GeneralUtility::_GP('number');
+               $this->target = ($combinedIdentifier = GeneralUtility::_GP('target'));
+               $this->returnUrl = GeneralUtility::sanitizeLocalUrl(GeneralUtility::_GP('returnUrl'));
                // create the folder object
                if ($combinedIdentifier) {
                        $this->folderObject = \TYPO3\CMS\Core\Resource\ResourceFactory::getInstance()->getFolderObjectFromCombinedIdentifier($combinedIdentifier);
@@ -112,7 +115,7 @@ class CreateFolderController {
                $icon = \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('apps-filetree-root');
                $this->title = $icon . htmlspecialchars($this->folderObject->getStorage()->getName()) . ': ' . htmlspecialchars($this->folderObject->getIdentifier());
                // Setting template object
-               $this->doc = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Template\\DocumentTemplate');
+               $this->doc = GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Template\\DocumentTemplate');
                $this->doc->setModuleTemplate('EXT:backend/Resources/Private/Templates/file_newfolder.html');
                $this->doc->backPath = $GLOBALS['BACK_PATH'];
                $this->doc->JScode = $this->doc->wrapScriptTags('
@@ -182,7 +185,7 @@ class CreateFolderController {
                        </div>
                        ';
                // CSH:
-               $code .= \TYPO3\CMS\Backend\Utility\BackendUtility::cshItem('xMOD_csh_corebe', 'file_newfolder', $GLOBALS['BACK_PATH'], '<br />');
+               $code .= BackendUtility::cshItem('xMOD_csh_corebe', 'file_newfolder', $GLOBALS['BACK_PATH'], '<br />');
                $pageContent .= $code;
                // Add spacer:
                $pageContent .= $this->doc->spacer(10);
@@ -191,7 +194,7 @@ class CreateFolderController {
                $pageContent .= '</form><form action="tce_file.php" method="post" name="editform2">';
                // Create a list of allowed file extensions with the nice format "*.jpg, *.gif" etc.
                $fileExtList = array();
-               $textfileExt = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $GLOBALS['TYPO3_CONF_VARS']['SYS']['textfile_ext'], TRUE);
+               $textfileExt = GeneralUtility::trimExplode(',', $GLOBALS['TYPO3_CONF_VARS']['SYS']['textfile_ext'], TRUE);
                foreach ($textfileExt as $fileExt) {
                        if (!preg_match(('/' . $GLOBALS['TYPO3_CONF_VARS']['BE']['fileDenyPattern'] . '/i'), ('.' . $fileExt))) {
                                $fileExtList[] = '*.' . $fileExt;
@@ -214,7 +217,7 @@ class CreateFolderController {
                        </div>
                        ';
                // CSH:
-               $code .= \TYPO3\CMS\Backend\Utility\BackendUtility::cshItem('xMOD_csh_corebe', 'file_newfile', $GLOBALS['BACK_PATH'], '<br />');
+               $code .= BackendUtility::cshItem('xMOD_csh_corebe', 'file_newfile', $GLOBALS['BACK_PATH'], '<br />');
                $pageContent .= $this->doc->section($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:file_newfolder.php.newfile'), $code);
                $pageContent .= $this->doc->sectionEnd();
                $pageContent .= '</form>';
@@ -222,7 +225,7 @@ class CreateFolderController {
                // Add the HTML as a section:
                $markerArray = array(
                        'CSH' => $docHeaderButtons['csh'],
-                       'FUNC_MENU' => \TYPO3\CMS\Backend\Utility\BackendUtility::getFuncMenu($this->id, 'SET[function]', $this->MOD_SETTINGS['function'], $this->MOD_MENU['function']),
+                       'FUNC_MENU' => BackendUtility::getFuncMenu($this->id, 'SET[function]', $this->MOD_SETTINGS['function'], $this->MOD_MENU['function']),
                        'CONTENT' => $pageContent,
                        'PATH' => $this->title
                );
@@ -243,5 +246,4 @@ class CreateFolderController {
 
 }
 
-
 ?>
\ No newline at end of file
index 51fa01a..469cfff 100644 (file)
@@ -27,6 +27,10 @@ namespace TYPO3\CMS\Backend\Controller\File;
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
 
+use TYPO3\CMS\Backend\Utility\BackendUtility;
+use TYPO3\CMS\Backend\Utility\IconUtility;
+use TYPO3\CMS\Core\Utility\GeneralUtility;
+
 /**
  * Script Class for rendering the file editing screen
  *
@@ -87,8 +91,8 @@ class EditFileController {
         */
        public function init() {
                // Setting target, which must be a file reference to a file within the mounts.
-               $this->target = ($this->origTarget = ($fileIdentifier = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('target')));
-               $this->returnUrl = \TYPO3\CMS\Core\Utility\GeneralUtility::sanitizeLocalUrl(\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('returnUrl'));
+               $this->target = ($this->origTarget = ($fileIdentifier = GeneralUtility::_GP('target')));
+               $this->returnUrl = GeneralUtility::sanitizeLocalUrl(GeneralUtility::_GP('returnUrl'));
                // create the file object
                if ($fileIdentifier) {
                        $this->fileObject = \TYPO3\CMS\Core\Resource\ResourceFactory::getInstance()->retrieveFileOrFolderObject($fileIdentifier);
@@ -100,12 +104,11 @@ class EditFileController {
                        throw new \RuntimeException($title . ': ' . $message, 1294586841);
                }
                // Setting the title and the icon
-               $icon = \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('apps-filetree-root');
+               $icon = IconUtility::getSpriteIcon('apps-filetree-root');
                $this->title = $icon . htmlspecialchars($this->fileObject->getStorage()->getName()) . ': ' . htmlspecialchars($this->fileObject->getIdentifier());
-               // ***************************
+
                // Setting template object
-               // ***************************
-               $this->doc = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Template\\DocumentTemplate');
+               $this->doc = GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Template\\DocumentTemplate');
                $this->doc->setModuleTemplate('EXT:backend/Resources/Private/Templates/file_edit.html');
                $this->doc->backPath = $GLOBALS['BACK_PATH'];
                $this->doc->JScode = $this->doc->wrapScriptTags('
@@ -123,7 +126,6 @@ class EditFileController {
         * @todo Define visibility
         */
        public function main() {
-               //TODO: change locallang*.php to locallang*.xml
                $docHeaderButtons = $this->getButtons();
                $this->content = $this->doc->startPage($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:file_edit.php.pagetitle'));
                // Hook before compiling the output
@@ -135,7 +137,7 @@ class EditFileController {
                                        'target' => &$this->target
                                );
                                foreach ($preOutputProcessingHook as $hookFunction) {
-                                       \TYPO3\CMS\Core\Utility\GeneralUtility::callUserFunction($hookFunction, $hookParameters, $this);
+                                       GeneralUtility::callUserFunction($hookFunction, $hookParameters, $this);
                                }
                        }
                }
@@ -143,7 +145,7 @@ class EditFileController {
                $pageContent .= $this->doc->spacer(2);
                $code = '';
                $extList = $GLOBALS['TYPO3_CONF_VARS']['SYS']['textfile_ext'];
-               if ($extList && \TYPO3\CMS\Core\Utility\GeneralUtility::inList($extList, $this->fileObject->getExtension())) {
+               if ($extList && GeneralUtility::inList($extList, $this->fileObject->getExtension())) {
                        // Read file content to edit:
                        $fileContent = $this->fileObject->getContents();
                        // Making the formfields
@@ -151,7 +153,7 @@ class EditFileController {
                        // Edit textarea:
                        $code .= '
                                <div id="c-edit">
-                                       <textarea rows="30" name="file[editfile][0][data]" wrap="off"' . $this->doc->formWidthText(48, 'width:98%;height:80%', 'off') . ' class="fixed-font enable-tab">' . \TYPO3\CMS\Core\Utility\GeneralUtility::formatForTextarea($fileContent) . '</textarea>
+                                       <textarea rows="30" name="file[editfile][0][data]" wrap="off"' . $this->doc->formWidthText(48, 'width:98%;height:80%', 'off') . ' class="fixed-font enable-tab">' . GeneralUtility::formatForTextarea($fileContent) . '</textarea>
                                        <input type="hidden" name="file[editfile][0][target]" value="' . $this->fileObject->getUid() . '" />
                                        <input type="hidden" name="redirect" value="' . htmlspecialchars($hValue) . '" />
                                </div>
@@ -178,14 +180,14 @@ class EditFileController {
                                        'target' => &$this->target
                                );
                                foreach ($postOutputProcessingHook as $hookFunction) {
-                                       \TYPO3\CMS\Core\Utility\GeneralUtility::callUserFunction($hookFunction, $hookParameters, $this);
+                                       GeneralUtility::callUserFunction($hookFunction, $hookParameters, $this);
                                }
                        }
                }
                // Add the HTML as a section:
                $markerArray = array(
                        'CSH' => $docHeaderButtons['csh'],
-                       'FUNC_MENU' => \TYPO3\CMS\Backend\Utility\BackendUtility::getFuncMenu($this->id, 'SET[function]', $this->MOD_SETTINGS['function'], $this->MOD_MENU['function']),
+                       'FUNC_MENU' => BackendUtility::getFuncMenu($this->id, 'SET[function]', $this->MOD_SETTINGS['function'], $this->MOD_MENU['function']),
                        'BUTTONS' => $docHeaderButtons,
                        'PATH' => $this->title,
                        'CONTENT' => $pageContent
@@ -214,20 +216,19 @@ class EditFileController {
        public function getButtons() {
                $buttons = array();
                // CSH button
-               $buttons['csh'] = \TYPO3\CMS\Backend\Utility\BackendUtility::cshItem('xMOD_csh_corebe', 'file_edit', $GLOBALS['BACK_PATH'], '', TRUE);
+               $buttons['csh'] = BackendUtility::cshItem('xMOD_csh_corebe', 'file_edit', $GLOBALS['BACK_PATH'], '', TRUE);
                // Save button
-               $theIcon = \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-document-save');
+               $theIcon = IconUtility::getSpriteIcon('actions-document-save');
                $buttons['SAVE'] = '<a href="#" onclick="document.editform.submit();" title="' . $GLOBALS['LANG']->makeEntities($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:file_edit.php.submit', TRUE)) . '">' . $theIcon . '</a>';
                // Save and Close button
-               $theIcon = \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-document-save-close');
+               $theIcon = IconUtility::getSpriteIcon('actions-document-save-close');
                $buttons['SAVE_CLOSE'] = '<a href="#" onclick="document.editform.redirect.value=\'' . htmlspecialchars($this->returnUrl) . '\'; document.editform.submit();" title="' . $GLOBALS['LANG']->makeEntities($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:file_edit.php.saveAndClose', TRUE)) . '">' . $theIcon . '</a>';
                // Cancel button
-               $theIcon = \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-document-close');
+               $theIcon = IconUtility::getSpriteIcon('actions-document-close');
                $buttons['CANCEL'] = '<a href="#" onclick="backToList(); return false;" title="' . $GLOBALS['LANG']->makeEntities($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:labels.cancel', TRUE)) . '">' . $theIcon . '</a>';
                return $buttons;
        }
 
 }
 
-
 ?>
\ No newline at end of file
index 8e379e6..865d1ea 100644 (file)
@@ -27,6 +27,9 @@ namespace TYPO3\CMS\Backend\Controller\File;
  *
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
+
+use TYPO3\CMS\Core\Utility\GeneralUtility;
+
 /**
  * Gateway for TCE (TYPO3 Core Engine) file-handling through POST forms.
  * This script serves as the fileadministration part of the TYPO3 Core Engine.
@@ -34,17 +37,6 @@ namespace TYPO3\CMS\Backend\Controller\File;
  * Before TYPO3 4.3, it was located in typo3/tce_file.php and redirected back to a
  * $redirectURL. Since 4.3 this class is also used for accessing via AJAX
  *
- *
- * For syntax and API information, see the document 'TYPO3 Core APIs'
- *
- * Revised for TYPO3 3.6 July/2003 by Kasper Skårhøj
- * Revised for TYPO3 4.3 Mar/2009 by Benjamin Mack
- *
- * @author Kasper Skårhøj <kasperYYYY@typo3.com>
- */
-/**
- * Script Class, handling the calling of methods in the file admin classes.
- *
  * @author Kasper Skårhøj <kasperYYYY@typo3.com>
  */
 class FileController {
@@ -80,11 +72,11 @@ class FileController {
         */
        public function init() {
                // Set the GPvars from outside
-               $this->file = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('file');
-               $this->CB = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('CB');
-               $this->overwriteExistingFiles = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('overwriteExistingFiles');
-               $this->vC = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('vC');
-               $this->redirect = \TYPO3\CMS\Core\Utility\GeneralUtility::sanitizeLocalUrl(\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('redirect'));
+               $this->file = GeneralUtility::_GP('file');
+               $this->CB = GeneralUtility::_GP('CB');
+               $this->overwriteExistingFiles = GeneralUtility::_GP('overwriteExistingFiles');
+               $this->vC = GeneralUtility::_GP('vC');
+               $this->redirect = GeneralUtility::sanitizeLocalUrl(GeneralUtility::_GP('redirect'));
                $this->initClipboard();
        }
 
@@ -95,7 +87,7 @@ class FileController {
         */
        public function initClipboard() {
                if (is_array($this->CB)) {
-                       $clipObj = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Clipboard\\Clipboard');
+                       $clipObj = GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Clipboard\\Clipboard');
                        $clipObj->initializeClipboard();
                        if ($this->CB['paste']) {
                                $clipObj->setCurrentPad($this->CB['pad']);
@@ -116,13 +108,13 @@ class FileController {
         */
        public function main() {
                // Initializing:
-               $this->fileProcessor = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Utility\\File\\ExtendedFileUtility');
+               $this->fileProcessor = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Utility\\File\\ExtendedFileUtility');
                $this->fileProcessor->init($GLOBALS['FILEMOUNTS'], $GLOBALS['TYPO3_CONF_VARS']['BE']['fileExtensions']);
                $this->fileProcessor->init_actionPerms($GLOBALS['BE_USER']->getFileoperationPermissions());
                $this->fileProcessor->dontCheckForUnique = $this->overwriteExistingFiles ? 1 : 0;
                // Checking referrer / executing:
-               $refInfo = parse_url(\TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('HTTP_REFERER'));
-               $httpHost = \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_HOST_ONLY');
+               $refInfo = parse_url(GeneralUtility::getIndpEnv('HTTP_REFERER'));
+               $httpHost = GeneralUtility::getIndpEnv('TYPO3_HOST_ONLY');
                if ($httpHost != $refInfo['host'] && $this->vC != $GLOBALS['BE_USER']->veriCode() && !$GLOBALS['TYPO3_CONF_VARS']['SYS']['doNotCheckReferer'] && $GLOBALS['CLIENT']['BROWSER'] != 'flash') {
                        $this->fileProcessor->writeLog(0, 2, 1, 'Referrer host "%s" and server host "%s" did not match!', array($refInfo['host'], $httpHost));
                } else {
@@ -153,7 +145,7 @@ class FileController {
         * actual return value
         *
         * @param array $params Always empty.
-        * @param \TYPO3\CMS\Core\Http\AjaxRequestHandler $ajaxObj The Ajax object used to return content and set content types
+        * @param \TYPO3\CMS\Core\Http\AjaxRequestHandler $ajaxObj The AjaxRequestHandler object used to return content and set content types
         * @return void
         */
        public function processAjaxRequest(array $params, \TYPO3\CMS\Core\Http\AjaxRequestHandler $ajaxObj) {
@@ -173,5 +165,4 @@ class FileController {
 
 }
 
-
 ?>
\ No newline at end of file
index 954e85e..0e41ed8 100644 (file)
@@ -27,6 +27,9 @@ namespace TYPO3\CMS\Backend\Controller\File;
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
 
+use TYPO3\CMS\Backend\Utility\BackendUtility;
+use TYPO3\CMS\Core\Utility\GeneralUtility;
+
 /**
  * Script Class for display up to 10 upload fields
  *
@@ -84,10 +87,10 @@ class FileUploadController {
         */
        public function init() {
                // Initialize GPvars:
-               $this->target = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('target');
-               $this->returnUrl = \TYPO3\CMS\Core\Utility\GeneralUtility::sanitizeLocalUrl(\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('returnUrl'));
+               $this->target = GeneralUtility::_GP('target');
+               $this->returnUrl = GeneralUtility::sanitizeLocalUrl(GeneralUtility::_GP('returnUrl'));
                if (!$this->returnUrl) {
-                       $this->returnUrl = \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_SITE_URL') . TYPO3_mainDir . \TYPO3\CMS\Backend\Utility\BackendUtility::getModuleUrl('file_list') . '&id=' . rawurlencode($this->target);
+                       $this->returnUrl = GeneralUtility::getIndpEnv('TYPO3_SITE_URL') . TYPO3_mainDir . BackendUtility::getModuleUrl('file_list') . '&id=' . rawurlencode($this->target);
                }
                // Create the folder object
                if ($this->target) {
@@ -103,7 +106,7 @@ class FileUploadController {
                $icon = \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('apps-filetree-root');
                $this->title = $icon . htmlspecialchars($this->folderObject->getStorage()->getName()) . ': ' . htmlspecialchars($this->folderObject->getIdentifier());
                // Setting template object
-               $this->doc = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Template\\DocumentTemplate');
+               $this->doc = GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Template\\DocumentTemplate');
                $this->doc->setModuleTemplate('EXT:backend/Resources/Private/Templates/file_upload.html');
                $this->doc->backPath = $GLOBALS['BACK_PATH'];
                $this->doc->form = '<form action="tce_file.php" method="post" name="editform" enctype="' . $GLOBALS['TYPO3_CONF_VARS']['SYS']['form_enctype'] . '">';
@@ -122,11 +125,11 @@ class FileUploadController {
                $pageContent = $this->doc->header($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:file_upload.php.pagetitle')) . $this->doc->section('', $form);
                // Header Buttons
                $docHeaderButtons = array(
-                       'csh' => \TYPO3\CMS\Backend\Utility\BackendUtility::cshItem('xMOD_csh_corebe', 'file_upload', $GLOBALS['BACK_PATH'])
+                       'csh' => BackendUtility::cshItem('xMOD_csh_corebe', 'file_upload', $GLOBALS['BACK_PATH'])
                );
                $markerArray = array(
                        'CSH' => $docHeaderButtons['csh'],
-                       'FUNC_MENU' => \TYPO3\CMS\Backend\Utility\BackendUtility::getFuncMenu($this->id, 'SET[function]', $this->MOD_SETTINGS['function'], $this->MOD_MENU['function']),
+                       'FUNC_MENU' => BackendUtility::getFuncMenu($this->id, 'SET[function]', $this->MOD_SETTINGS['function'], $this->MOD_MENU['function']),
                        'CONTENT' => $pageContent,
                        'PATH' => $this->title
                );
@@ -185,5 +188,4 @@ class FileUploadController {
 
 }
 
-
 ?>
\ No newline at end of file
index 42eea35..8eaa8bc 100644 (file)
@@ -27,6 +27,9 @@ namespace TYPO3\CMS\Backend\Controller\File;
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
 
+use TYPO3\CMS\Backend\Utility\BackendUtility;
+use TYPO3\CMS\Core\Utility\GeneralUtility;
+
 /**
  * Script Class for the rename-file form.
  *
@@ -84,8 +87,8 @@ class RenameFileController {
         */
        public function init() {
                // Initialize GPvars:
-               $this->target = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('target');
-               $this->returnUrl = \TYPO3\CMS\Core\Utility\GeneralUtility::sanitizeLocalUrl(\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('returnUrl'));
+               $this->target = GeneralUtility::_GP('target');
+               $this->returnUrl = GeneralUtility::sanitizeLocalUrl(GeneralUtility::_GP('returnUrl'));
                // Cleaning and checking target
                if ($this->target) {
                        $this->fileOrFolderObject = \TYPO3\CMS\Core\Resource\ResourceFactory::getInstance()->retrieveFileOrFolderObject($this->target);
@@ -101,7 +104,7 @@ class RenameFileController {
                // rename the folder
                if ($this->fileOrFolderObject instanceof \TYPO3\CMS\Core\Resource\Folder) {
                        $parsedUrl = parse_url($this->returnUrl);
-                       $queryParts = \TYPO3\CMS\Core\Utility\GeneralUtility::explodeUrl2Array(urldecode($parsedUrl['query']));
+                       $queryParts = GeneralUtility::explodeUrl2Array(urldecode($parsedUrl['query']));
                        if ($queryParts['id'] === $this->fileOrFolderObject->getCombinedIdentifier()) {
                                $this->returnUrl = str_replace(urlencode($queryParts['id']), urlencode($this->fileOrFolderObject->getStorage()->getRootLevelFolder()->getCombinedIdentifier()), $this->returnUrl);
                        }
@@ -110,7 +113,7 @@ class RenameFileController {
                $icon = \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('apps-filetree-root');
                $this->title = $icon . htmlspecialchars($this->fileOrFolderObject->getStorage()->getName()) . ': ' . htmlspecialchars($this->fileOrFolderObject->getIdentifier());
                // Setting template object
-               $this->doc = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Template\\DocumentTemplate');
+               $this->doc = GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Template\\DocumentTemplate');
                $this->doc->setModuleTemplate('EXT:backend/Resources/Private/Templates/file_rename.html');
                $this->doc->backPath = $GLOBALS['BACK_PATH'];
                $this->doc->JScode = $this->doc->wrapScriptTags('
@@ -159,11 +162,11 @@ class RenameFileController {
                // Add the HTML as a section:
                $pageContent .= $code;
                $docHeaderButtons = array();
-               $docHeaderButtons['csh'] = \TYPO3\CMS\Backend\Utility\BackendUtility::cshItem('xMOD_csh_corebe', 'file_rename', $GLOBALS['BACK_PATH']);
+               $docHeaderButtons['csh'] = BackendUtility::cshItem('xMOD_csh_corebe', 'file_rename', $GLOBALS['BACK_PATH']);
                // Add the HTML as a section:
                $markerArray = array(
                        'CSH' => $docHeaderButtons['csh'],
-                       'FUNC_MENU' => \TYPO3\CMS\Backend\Utility\BackendUtility::getFuncMenu($this->id, 'SET[function]', $this->MOD_SETTINGS['function'], $this->MOD_MENU['function']),
+                       'FUNC_MENU' => BackendUtility::getFuncMenu($this->id, 'SET[function]', $this->MOD_SETTINGS['function'], $this->MOD_MENU['function']),
                        'CONTENT' => $pageContent,
                        'PATH' => $this->title
                );
@@ -184,5 +187,4 @@ class RenameFileController {
 
 }
 
-
 ?>
\ No newline at end of file
index 515526f..a8484f8 100644 (file)
@@ -27,6 +27,9 @@ namespace TYPO3\CMS\Backend\Controller;
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
 
+use TYPO3\CMS\Backend\Utility\IconUtility;
+use TYPO3\CMS\Core\Utility\GeneralUtility;
+
 /**
  * Main script class for rendering of the folder tree
  *
@@ -81,11 +84,11 @@ class FileSystemNavigationFrameController {
                // Setting backPath
                $this->backPath = $GLOBALS['BACK_PATH'];
                // Setting GPvars:
-               $this->currentSubScript = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('currentSubScript');
-               $this->cMR = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('cMR');
+               $this->currentSubScript = GeneralUtility::_GP('currentSubScript');
+               $this->cMR = GeneralUtility::_GP('cMR');
                // Create folder tree object:
                /** @var $foldertree \TYPO3\CMS\Filelist\FileListFolderTree */
-               $this->foldertree = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Filelist\\FileListFolderTree');
+               $this->foldertree = GeneralUtility::makeInstance('TYPO3\\CMS\\Filelist\\FileListFolderTree');
                $this->foldertree->ext_IconMode = $GLOBALS['BE_USER']->getTSConfigVal('options.folderTree.disableIconLinkToContextmenu');
                $this->foldertree->thisScript = 'alt_file_navframe.php';
        }
@@ -100,7 +103,7 @@ class FileSystemNavigationFrameController {
                // Setting highlight mode:
                $this->doHighlight = !$GLOBALS['BE_USER']->getTSConfigVal('options.pageTree.disableTitleHighlight');
                // Create template object:
-               $this->doc = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Template\\DocumentTemplate');
+               $this->doc = GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Template\\DocumentTemplate');
                $this->doc->backPath = $GLOBALS['BACK_PATH'];
                $this->doc->setModuleTemplate('EXT:backend/Resources/Private/Templates/alt_file_navframe.html');
                $this->doc->showFlashMessages = FALSE;
@@ -149,7 +152,7 @@ class FileSystemNavigationFrameController {
                // Setting up the buttons and markers for docheader
                $docHeaderButtons = $this->getButtons();
                $markers = array(
-                       'IMG_RESET' => '<img' . \TYPO3\CMS\Backend\Utility\IconUtility::skinImg($GLOBALS['BACK_PATH'], 'gfx/close_gray.gif', ' width="16" height="16"') . ' id="treeFilterReset" alt="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:labels.resetFilter') . '" ' . 'title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:labels.resetFilter') . '" />',
+                       'IMG_RESET' => '<img' . IconUtility::skinImg($GLOBALS['BACK_PATH'], 'gfx/close_gray.gif', ' width="16" height="16"') . ' id="treeFilterReset" alt="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:labels.resetFilter') . '" ' . 'title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:labels.resetFilter') . '" />',
                        'CONTENT' => $this->content
                );
                $subparts = array();
@@ -183,7 +186,7 @@ class FileSystemNavigationFrameController {
                        'refresh' => ''
                );
                // Refresh
-               $buttons['refresh'] = '<a href="' . htmlspecialchars(\TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('REQUEST_URI')) . '">' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-system-refresh') . '</a>';
+               $buttons['refresh'] = '<a href="' . htmlspecialchars(GeneralUtility::getIndpEnv('REQUEST_URI')) . '">' . IconUtility::getSpriteIcon('actions-system-refresh') . '</a>';
                // CSH
                $buttons['csh'] = str_replace('typo3-csh-inline', 'typo3-csh-inline show-right', \TYPO3\CMS\Backend\Utility\BackendUtility::cshItem('xMOD_csh_corebe', 'filetree', $GLOBALS['BACK_PATH']));
                return $buttons;
@@ -214,5 +217,4 @@ class FileSystemNavigationFrameController {
 
 }
 
-
 ?>
\ No newline at end of file
index 5483380..7d53b10 100644 (file)
@@ -27,6 +27,13 @@ namespace TYPO3\CMS\Backend\Controller;
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
 
+use TYPO3\CMS\Backend\Utility\BackendUtility;
+use TYPO3\CMS\Backend\Utility\IconUtility;
+use TYPO3\CMS\Core\Html\HtmlParser;
+use TYPO3\CMS\Core\Messaging\FlashMessage;
+use TYPO3\CMS\Core\Utility\GeneralUtility;
+use TYPO3\CMS\Core\Utility\HttpUtility;
+
 /**
  * Script Class for rendering the login form
  *
@@ -35,6 +42,7 @@ namespace TYPO3\CMS\Backend\Controller;
 class LoginController {
 
        const SIGNAL_RenderLoginForm = 'renderLoginForm';
+
        // Internal, GPvars:
        // GPvar: redirect_url; The URL to redirect to after login.
        /**
@@ -138,25 +146,25 @@ class LoginController {
        public function init() {
                // We need a PHP session session for most login levels
                session_start();
-               $this->redirect_url = \TYPO3\CMS\Core\Utility\GeneralUtility::sanitizeLocalUrl(\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('redirect_url'));
-               $this->GPinterface = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('interface');
+               $this->redirect_url = GeneralUtility::sanitizeLocalUrl(GeneralUtility::_GP('redirect_url'));
+               $this->GPinterface = GeneralUtility::_GP('interface');
                // Grabbing preset username and password, for security reasons this feature only works if SSL is used
-               if (\TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_SSL')) {
-                       $this->u = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('u');
-                       $this->p = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('p');
+               if (GeneralUtility::getIndpEnv('TYPO3_SSL')) {
+                       $this->u = GeneralUtility::_GP('u');
+                       $this->p = GeneralUtility::_GP('p');
                }
                // If "L" is "OUT", then any logged in is logged out. If redirect_url is given, we redirect to it
-               $this->L = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('L');
+               $this->L = GeneralUtility::_GP('L');
                // Login
-               $this->loginRefresh = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('loginRefresh');
+               $this->loginRefresh = GeneralUtility::_GP('loginRefresh');
                // Value of "Login" button. If set, the login button was pressed.
-               $this->commandLI = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('commandLI');
+               $this->commandLI = GeneralUtility::_GP('commandLI');
                // Sets the level of security from conf vars
                if ($GLOBALS['TYPO3_CONF_VARS']['BE']['loginSecurityLevel']) {
                        $this->loginSecurityLevel = $GLOBALS['TYPO3_CONF_VARS']['BE']['loginSecurityLevel'];
                }
                // Try to get the preferred browser language
-               $preferredBrowserLanguage = $GLOBALS['LANG']->csConvObj->getPreferredClientLanguage(\TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('HTTP_ACCEPT_LANGUAGE'));
+               $preferredBrowserLanguage = $GLOBALS['LANG']->csConvObj->getPreferredClientLanguage(GeneralUtility::getIndpEnv('HTTP_ACCEPT_LANGUAGE'));
                // If we found a $preferredBrowserLanguage and it is not the default language and no be_user is logged in
                // initialize $GLOBALS['LANG'] again with $preferredBrowserLanguage
                if ($preferredBrowserLanguage != 'default' && !$GLOBALS['BE_USER']->user['uid']) {
@@ -169,7 +177,7 @@ class LoginController {
                if ($this->L == 'OUT' && is_object($GLOBALS['BE_USER'])) {
                        $GLOBALS['BE_USER']->logoff();
                        if ($this->redirect_url) {
-                               \TYPO3\CMS\Core\Utility\HttpUtility::redirect($this->redirect_url);
+                               HttpUtility::redirect($this->redirect_url);
                        }
                        die;
                }
@@ -236,7 +244,7 @@ class LoginController {
         * @todo Define visibility
         */
        public function makeLoginForm() {
-               $content = \TYPO3\CMS\Core\Html\HtmlParser::getSubpart($GLOBALS['TBE_TEMPLATE']->moduleTemplate, '###LOGIN_FORM###');
+               $content = HtmlParser::getSubpart($GLOBALS['TBE_TEMPLATE']->moduleTemplate, '###LOGIN_FORM###');
                $markers = array(
                        'VALUE_USERNAME' => htmlspecialchars($this->u),
                        'VALUE_PASSWORD' => htmlspecialchars($this->p),
@@ -244,7 +252,7 @@ class LoginController {
                );
                // Show an error message if the login command was successful already, otherwise remove the subpart
                if (!$this->isLoginInProgress()) {
-                       $content = \TYPO3\CMS\Core\Html\HtmlParser::substituteSubpart($content, '###LOGIN_ERROR###', '');
+                       $content = HtmlParser::substituteSubpart($content, '###LOGIN_ERROR###', '');
                } else {
                        $markers['ERROR_MESSAGE'] = $GLOBALS['LANG']->getLL('error.login', TRUE);
                        $markers['ERROR_LOGIN_TITLE'] = $GLOBALS['LANG']->getLL('error.login.title', TRUE);
@@ -252,12 +260,12 @@ class LoginController {
                }
                // Remove the interface selector markers if it's not available
                if (!($this->interfaceSelector && !$this->loginRefresh)) {
-                       $content = \TYPO3\CMS\Core\Html\HtmlParser::substituteSubpart($content, '###INTERFACE_SELECTOR###', '');
+                       $content = HtmlParser::substituteSubpart($content, '###INTERFACE_SELECTOR###', '');
                } else {
                        $markers['LABEL_INTERFACE'] = $GLOBALS['LANG']->getLL('labels.interface', TRUE);
                        $markers['VALUE_INTERFACE'] = $this->interfaceSelector;
                }
-               return \TYPO3\CMS\Core\Html\HtmlParser::substituteMarkerArray($content, $markers, '###|###');
+               return HtmlParser::substituteMarkerArray($content, $markers, '###|###');
        }
 
        /**
@@ -268,7 +276,7 @@ class LoginController {
         * @todo Define visibility
         */
        public function makeLogoutForm() {
-               $content = \TYPO3\CMS\Core\Html\HtmlParser::getSubpart($GLOBALS['TBE_TEMPLATE']->moduleTemplate, '###LOGOUT_FORM###');
+               $content = HtmlParser::getSubpart($GLOBALS['TBE_TEMPLATE']->moduleTemplate, '###LOGOUT_FORM###');
                $markers = array(
                        'LABEL_USERNAME' => $GLOBALS['LANG']->getLL('labels.username', TRUE),
                        'VALUE_USERNAME' => htmlspecialchars($GLOBALS['BE_USER']->user['username']),
@@ -276,12 +284,12 @@ class LoginController {
                );
                // Remove the interface selector markers if it's not available
                if (!$this->interfaceSelector_jump) {
-                       $content = \TYPO3\CMS\Core\Html\HtmlParser::substituteSubpart($content, '###INTERFACE_SELECTOR###', '');
+                       $content = HtmlParser::substituteSubpart($content, '###INTERFACE_SELECTOR###', '');
                } else {
                        $markers['LABEL_INTERFACE'] = $GLOBALS['LANG']->getLL('labels.interface', TRUE);
                        $markers['VALUE_INTERFACE'] = $this->interfaceSelector_jump;
                }
-               return \TYPO3\CMS\Core\Html\HtmlParser::substituteMarkerArray($content, $markers, '###|###');
+               return HtmlParser::substituteMarkerArray($content, $markers, '###|###');
        }
 
        /**
@@ -292,14 +300,14 @@ class LoginController {
         * @todo Define visibility
         */
        public function wrapLoginForm($content) {
-               $mainContent = \TYPO3\CMS\Core\Html\HtmlParser::getSubpart($GLOBALS['TBE_TEMPLATE']->moduleTemplate, '###PAGE###');
+               $mainContent = HtmlParser::getSubpart($GLOBALS['TBE_TEMPLATE']->moduleTemplate, '###PAGE###');
                if ($GLOBALS['TBE_STYLES']['logo_login']) {
                        $logo = '<img src="' . htmlspecialchars(($GLOBALS['BACK_PATH'] . $GLOBALS['TBE_STYLES']['logo_login'])) . '" alt="" class="t3-login-logo" />';
                } else {
-                       $logo = '<img' . \TYPO3\CMS\Backend\Utility\IconUtility::skinImg($GLOBALS['BACK_PATH'], 'gfx/typo3logo.gif', 'width="123" height="34"') . ' alt="" class="t3-login-logo" />';
+                       $logo = '<img' . IconUtility::skinImg($GLOBALS['BACK_PATH'], 'gfx/typo3logo.gif', 'width="123" height="34"') . ' alt="" class="t3-login-logo" />';
                }
                /** @var $browserWarning \TYPO3\CMS\Core\Messaging\FlashMessage */
-               $browserWarning = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessage', $GLOBALS['LANG']->getLL('warning.incompatibleBrowser') . ' ' . $GLOBALS['LANG']->getLL('warning.incompatibleBrowserInternetExplorer'), $GLOBALS['LANG']->getLL('warning.incompatibleBrowserHeadline'), \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR);
+               $browserWarning = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessage', $GLOBALS['LANG']->getLL('warning.incompatibleBrowser') . ' ' . $GLOBALS['LANG']->getLL('warning.incompatibleBrowserInternetExplorer'), $GLOBALS['LANG']->getLL('warning.incompatibleBrowserHeadline'), FlashMessage::ERROR);
                $browserWarning = $browserWarning->render();
                $additionalCssClasses = array();
                if ($this->isLoginInProgress()) {
@@ -313,7 +321,7 @@ class LoginController {
                        'LOGINBOX_IMAGE' => $this->makeLoginBoxImage(),
                        'FORM' => $content,
                        'NEWS' => $this->makeLoginNews(),
-                       'COPYRIGHT' => \TYPO3\CMS\Backend\Utility\BackendUtility::TYPO3_copyRightNotice($GLOBALS['TYPO3_CONF_VARS']['SYS']['loginCopyrightShowVersion']),
+                       'COPYRIGHT' => BackendUtility::TYPO3_copyRightNotice($GLOBALS['TYPO3_CONF_VARS']['SYS']['loginCopyrightShowVersion']),
                        'CSS_CLASSES' => !empty($additionalCssClasses) ? 'class="' . implode(' ', $additionalCssClasses) . '"' : '',
                        'CSS_OPENIDCLASS' => 't3-login-openid-' . (\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('openid') ? 'enabled' : 'disabled'),
                        // The labels will be replaced later on, thus the other parts above
@@ -342,7 +350,7 @@ class LoginController {
                        'SITENAME' => htmlspecialchars($GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename'])
                );
                $this->emitRenderLoginFormSignal($markers);
-               return \TYPO3\CMS\Core\Html\HtmlParser::substituteMarkerArray($mainContent, $markers, '###|###');
+               return HtmlParser::substituteMarkerArray($mainContent, $markers, '###|###');
        }
 
        /**
@@ -375,21 +383,21 @@ class LoginController {
                        $GLOBALS['BE_USER']->writeUC();
                        // Based on specific setting of interface we set the redirect script:
                        switch ($this->GPinterface) {
-                       case 'backend':
-
-                       case 'backend_old':
-                               $this->redirectToURL = 'backend.php';
-                               break;
-                       case 'frontend':
-                               $this->redirectToURL = '../';
-                               break;
+                               case 'backend':
+
+                               case 'backend_old':
+                                       $this->redirectToURL = 'backend.php';
+                                       break;
+                               case 'frontend':
+                                       $this->redirectToURL = '../';
+                                       break;
                        }
                        /** @var $formProtection \TYPO3\CMS\Core\FormProtection\BackendFormProtection */
                        $formProtection = \TYPO3\CMS\Core\FormProtection\FormProtectionFactory::get();
                        // If there is a redirect URL AND if loginRefresh is not set...
                        if (!$this->loginRefresh) {
                                $formProtection->storeSessionTokenInRegistry();
-                               \TYPO3\CMS\Core\Utility\HttpUtility::redirect($this->redirectToURL);
+                               HttpUtility::redirect($this->redirectToURL);
                        } else {
                                $formProtection->setSessionTokenFromRegistry();
                                $formProtection->persistSessionToken();
@@ -423,7 +431,7 @@ class LoginController {
                $this->interfaceSelector_jump = '';
                // If interfaces are defined AND no input redirect URL in GET vars:
                if ($GLOBALS['TYPO3_CONF_VARS']['BE']['interfaces'] && ($this->isLoginInProgress() || !$this->redirect_url)) {
-                       $parts = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $GLOBALS['TYPO3_CONF_VARS']['BE']['interfaces']);
+                       $parts = GeneralUtility::trimExplode(',', $GLOBALS['TYPO3_CONF_VARS']['BE']['interfaces']);
                        // Only if more than one interface is defined will we show the selector:
                        if (count($parts) > 1) {
                                // Initialize:
@@ -438,7 +446,7 @@ class LoginController {
                                // Traverse the interface keys:
                                foreach ($parts as $valueStr) {
                                        $this->interfaceSelector .= '
-                                                       <option value="' . htmlspecialchars($valueStr) . '"' . (\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('interface') == htmlspecialchars($valueStr) ? ' selected="selected"' : '') . '>' . htmlspecialchars($labels[$valueStr]) . '</option>';
+                                                       <option value="' . htmlspecialchars($valueStr) . '"' . (GeneralUtility::_GP('interface') == htmlspecialchars($valueStr) ? ' selected="selected"' : '') . '>' . htmlspecialchars($labels[$valueStr]) . '</option>';
                                        $this->interfaceSelector_jump .= '
                                                        <option value="' . htmlspecialchars($jumpScript[$valueStr]) . '">' . htmlspecialchars($labels[$valueStr]) . '</option>';
                                }
@@ -470,8 +478,8 @@ class LoginController {
         * @see \TYPO3\CMS\Backend\Utility\BackendUtility::TYPO3_copyRightNotice()
         */
        public function makeCopyrightNotice() {
-               \TYPO3\CMS\Core\Utility\GeneralUtility::logDeprecatedFunction();
-               return \TYPO3\CMS\Backend\Utility\BackendUtility::TYPO3_copyRightNotice();
+               GeneralUtility::logDeprecatedFunction();
+               return BackendUtility::TYPO3_copyRightNotice();
        }
 
        /**
@@ -484,12 +492,12 @@ class LoginController {
                $loginboxImage = '';
                // Look for rotation image folder:
                if ($GLOBALS['TBE_STYLES']['loginBoxImage_rotationFolder']) {
-                       $absPath = \TYPO3\CMS\Core\Utility\GeneralUtility::resolveBackPath(PATH_typo3 . $GLOBALS['TBE_STYLES']['loginBoxImage_rotationFolder']);
+                       $absPath = GeneralUtility::resolveBackPath(PATH_typo3 . $GLOBALS['TBE_STYLES']['loginBoxImage_rotationFolder']);
                        // Get rotation folder:
-                       $dir = \TYPO3\CMS\Core\Utility\GeneralUtility::getFileAbsFileName($absPath);
+                       $dir = GeneralUtility::getFileAbsFileName($absPath);
                        if ($dir && @is_dir($dir)) {
                                // Get files for rotation into array:
-                               $files = \TYPO3\CMS\Core\Utility\GeneralUtility::getFilesInDir($dir, 'png,jpg,gif');
+                               $files = GeneralUtility::getFilesInDir($dir, 'png,jpg,gif');
                                // Pick random file:
                                $randImg = array_rand($files, 1);
                                // Get size of random file:
@@ -510,7 +518,7 @@ class LoginController {
                                $loginImage = 'loginbox_image.jpg';
                                $imagecopy = 'Photo by J.C. Franca (www.digitalphoto.com.br)';
                        }
-                       $loginboxImage = '<img' . \TYPO3\CMS\Backend\Utility\IconUtility::skinImg($GLOBALS['BACK_PATH'], ('gfx/' . $loginImage), 'width="200" height="133"') . ' id="loginbox-image" alt="' . $imagecopy . '" title="' . $imagecopy . '" />';
+                       $loginboxImage = '<img' . IconUtility::skinImg($GLOBALS['BACK_PATH'], ('gfx/' . $loginImage), 'width="200" height="133"') . ' id="loginbox-image" alt="' . $imagecopy . '" title="' . $imagecopy . '" />';
                }
                // Return image tag:
                return $loginboxImage;
@@ -528,12 +536,12 @@ class LoginController {
                $newsContent = '';
                $systemNews = $this->getSystemNews();
                // Traverse news array IF there are records in it:
-               if (is_array($systemNews) && count($systemNews) && !\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('loginRefresh')) {
+               if (is_array($systemNews) && count($systemNews) && !GeneralUtility::_GP('loginRefresh')) {
                        /** @var $htmlParser \TYPO3\CMS\Core\Html\RteHtmlParser */
-                       $htmlParser = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Html\\RteHtmlParser');
+                       $htmlParser = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Html\\RteHtmlParser');
                        // Get the main news template, and replace the subpart after looped through
-                       $newsContent = \TYPO3\CMS\Core\Html\HtmlParser::getSubpart($GLOBALS['TBE_TEMPLATE']->moduleTemplate, '###LOGIN_NEWS###');
-                       $newsItemTemplate = \TYPO3\CMS\Core\Html\HtmlParser::getSubpart($newsContent, '###NEWS_ITEM###');
+                       $newsContent = HtmlParser::getSubpart($GLOBALS['TBE_TEMPLATE']->moduleTemplate, '###LOGIN_NEWS###');
+                       $newsItemTemplate = HtmlParser::getSubpart($newsContent, '###NEWS_ITEM###');
                        $newsItem = '';
                        $count = 1;
                        foreach ($systemNews as $newsItemData) {
@@ -551,11 +559,11 @@ class LoginController {
                                        '###CLASS###' => $additionalClass
                                );
                                $count++;
-                               $newsItem .= \TYPO3\CMS\Core\Html\HtmlParser::substituteMarkerArray($newsItemTemplate, $newsItemMarker);
+                               $newsItem .= HtmlParser::substituteMarkerArray($newsItemTemplate, $newsItemMarker);
                        }
                        $title = $GLOBALS['TYPO3_CONF_VARS']['BE']['loginNewsTitle'] ? $GLOBALS['TYPO3_CONF_VARS']['BE']['loginNewsTitle'] : $GLOBALS['LANG']->getLL('newsheadline');
-                       $newsContent = \TYPO3\CMS\Core\Html\HtmlParser::substituteMarker($newsContent, '###NEWS_HEADLINE###', htmlspecialchars($title));
-                       $newsContent = \TYPO3\CMS\Core\Html\HtmlParser::substituteSubpart($newsContent, '###NEWS_ITEM###', $newsItem);
+                       $newsContent = HtmlParser::substituteMarker($newsContent, '###NEWS_HEADLINE###', htmlspecialchars($title));
+                       $newsContent = HtmlParser::substituteSubpart($newsContent, '###NEWS_ITEM###', $newsItem);
                }
                return $newsContent;
        }
@@ -569,7 +577,7 @@ class LoginController {
        protected function getSystemNews() {