[TASK] Make use of "use"-statement for BackendUtility 82/23182/9
authorStefan Neufeind <typo3.neufeind@speedpartner.de>
Sun, 18 Aug 2013 13:34:04 +0000 (15:34 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Thu, 29 Aug 2013 19:04:07 +0000 (21:04 +0200)
Change-Id: I5d631cf408758e89c69b129bb414d1ee14289bdd
Resolves: #51158
Releases: 6.2
Reviewed-on: https://review.typo3.org/23182
Reviewed-by: Kai Ole Hartwig
Tested-by: Kai Ole Hartwig
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
55 files changed:
typo3/sysext/backend/Classes/Controller/PageLayoutController.php
typo3/sysext/backend/Tests/Unit/Utility/BackendUtilityTest.php
typo3/sysext/cms/layout/db_layout.php
typo3/sysext/core/Classes/Configuration/FlexForm/FlexFormTools.php
typo3/sysext/core/Classes/Database/QueryGenerator.php
typo3/sysext/core/Classes/Database/ReferenceIndex.php
typo3/sysext/core/Classes/Database/RelationHandler.php
typo3/sysext/core/Classes/Html/RteHtmlParser.php
typo3/sysext/core/Classes/Integrity/DatabaseIntegrityCheck.php
typo3/sysext/core/Classes/TypoScript/ExtendedTemplateService.php
typo3/sysext/core/Classes/Utility/File/ExtendedFileUtility.php
typo3/sysext/cshmanual/Classes/Controller/HelpModuleController.php
typo3/sysext/dbal/Classes/Controller/ModuleController.php
typo3/sysext/extbase/Classes/Persistence/Generic/Storage/Typo3DbBackend.php
typo3/sysext/filelist/Classes/Controller/FileListController.php
typo3/sysext/filelist/Classes/FileList.php
typo3/sysext/form/Classes/View/Wizard/WizardView.php
typo3/sysext/frontend/Classes/Controller/PageInformationController.php
typo3/sysext/frontend/Classes/Controller/TranslationStatusController.php
typo3/sysext/frontend/Classes/Hooks/TreelistCacheUpdateHooks.php
typo3/sysext/frontend/Classes/View/AdminPanelView.php
typo3/sysext/func/Classes/Controller/PageFunctionsController.php
typo3/sysext/indexed_search/Classes/Controller/IndexedPagesController.php
typo3/sysext/indexed_search/Classes/Controller/ModuleController.php
typo3/sysext/indexed_search/Classes/Hook/CrawlerHook.php
typo3/sysext/info/Classes/Controller/InfoModuleController.php
typo3/sysext/install/Classes/Updates/FilemountUpdateWizard.php
typo3/sysext/linkvalidator/Classes/LinkAnalyzer.php
typo3/sysext/linkvalidator/Classes/Report/LinkValidatorReport.php
typo3/sysext/linkvalidator/Classes/Task/ValidatorTask.php
typo3/sysext/linkvalidator/Classes/Task/ValidatorTaskAdditionalFieldProvider.php
typo3/sysext/lowlevel/Classes/CleanerCommand.php
typo3/sysext/lowlevel/Classes/VersionsCommand.php
typo3/sysext/lowlevel/Classes/View/ConfigurationView.php
typo3/sysext/perm/Classes/Controller/PermissionAjaxController.php
typo3/sysext/recordlist/Classes/RecordList/AbstractDatabaseRecordList.php
typo3/sysext/recycler/Classes/Controller/DeletedRecordsController.php
typo3/sysext/recycler/Classes/Controller/RecyclerModuleController.php
typo3/sysext/recycler/Classes/Utility/RecyclerUtility.php
typo3/sysext/rtehtmlarea/Classes/Extension/Acronym.php
typo3/sysext/rtehtmlarea/Classes/RteHtmlAreaBase.php
typo3/sysext/setup/Classes/Controller/SetupModuleController.php
typo3/sysext/tstemplate/Classes/Controller/TypoScriptTemplateObjectBrowserModuleFunctionController.php
typo3/sysext/version/Classes/DataHandler/CommandMap.php
typo3/sysext/version/Classes/Utility/WorkspacesUtility.php
typo3/sysext/viewpage/Classes/Controller/ViewModuleController.php
typo3/sysext/wizard_crpages/Classes/Controller/CreatePagesWizardModuleFunctionController.php
typo3/sysext/wizard_sortpages/Classes/View/SortPagesWizardModuleFunction.php
typo3/sysext/workspaces/Classes/Controller/PreviewController.php
typo3/sysext/workspaces/Classes/ExtDirect/ActionHandler.php
typo3/sysext/workspaces/Classes/ExtDirect/ExtDirectServer.php
typo3/sysext/workspaces/Classes/Hook/DataHandlerHook.php
typo3/sysext/workspaces/Classes/Service/GridDataService.php
typo3/sysext/workspaces/Classes/Service/HistoryService.php
typo3/sysext/workspaces/Classes/Service/IntegrityService.php

index 01a12f1..e9c11db 100644 (file)
@@ -1043,15 +1043,16 @@ class PageLayoutController {
                                                'pages_language_overlay',
                                                'pid = ' . intval($this->id) . ' ' .
                                                'AND sys_language_uid = ' . intval($this->current_sys_language) .
-                                               \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause('pages_language_overlay') .
-                                               \TYPO3\CMS\Backend\Utility\BackendUtility::versioningPlaceholderClause('pages_language_overlay'),
+                                               BackendUtility::deleteClause('pages_language_overlay') .
+                                               BackendUtility::versioningPlaceholderClause('pages_language_overlay'),
                                                '',
                                                '',
                                                '',
                                                'sys_language_uid'
                                        );
 
-                                       $editLanguageOnClick = htmlspecialchars(\TYPO3\CMS\Backend\Utility\BackendUtility::editOnClick(
+                                       $editLanguageOnClick = htmlspecialchars(
+                                               BackendUtility::editOnClick(
                                                '&edit[pages_language_overlay][' . $overlayRecord['uid'] . ']=edit',
                                                $GLOBALS['BACK_PATH'])
                                        );
@@ -1064,7 +1065,9 @@ class PageLayoutController {
 
 
                                // Edit page properties
-                               $editPageOnClick = htmlspecialchars(\TYPO3\CMS\Backend\Utility\BackendUtility::editOnClick('&edit[pages][' . $this->id . ']=edit', $GLOBALS['BACK_PATH']));
+                               $editPageOnClick = htmlspecialchars(
+                                       BackendUtility::editOnClick('&edit[pages][' . $this->id . ']=edit', $GLOBALS['BACK_PATH'])
+                               );
                                $buttons['edit_page'] = '<a href="#" ' .
                                        'onclick="' . $editPageOnClick . '"' .
                                        'title="' . $GLOBALS['LANG']->getLL('editPageProperties', TRUE) . '">' .
index d4fb7ea..425c446 100644 (file)
@@ -1,6 +1,5 @@
 <?php
 namespace TYPO3\CMS\Backend\Tests\Unit\Utility;
-use TYPO3\CMS\Backend\Utility;
 
 /***************************************************************
  * Copyright notice
@@ -25,6 +24,8 @@ use TYPO3\CMS\Backend\Utility;
  * This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
 
+use TYPO3\CMS\Backend\Utility\BackendUtility;
+
 /**
  * Testcase for \TYPO3\CMS\Core\Utility\BackendUtility
  *
@@ -38,7 +39,7 @@ class BackendUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
        private $fixture;
 
        public function setUp() {
-               $this->fixture = new Utility\BackendUtility();
+               $this->fixture = new BackendUtility();
        }
 
        public function tearDown() {
@@ -156,7 +157,7 @@ class BackendUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function getProcessedValueForGroupWithOneAllowedTable() {
-               /** @var \PHPUnit_Framework_MockObject_MockObject|Utility\BackendUtility $fixture */
+               /** @var \PHPUnit_Framework_MockObject_MockObject|\TYPO3\CMS\Backend\Utility\BackendUtility $fixture */
                $fixture = $this->getMock('TYPO3\\CMS\\Backend\\Utility\\BackendUtility', array('getRecordWSOL'));
                $fixture->staticExpects($this->at(0))->method('getRecordWSOL')->will($this->returnValue(array('title' => 'Page 1')));
                $fixture->staticExpects($this->at(1))->method('getRecordWSOL')->will($this->returnValue(array('title' => 'Page 2')));
@@ -167,7 +168,7 @@ class BackendUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function getProcessedValueForGroupWithMultipleAllowedTables() {
-               /** @var \PHPUnit_Framework_MockObject_MockObject|Utility\BackendUtility $fixture */
+               /** @var \PHPUnit_Framework_MockObject_MockObject|\TYPO3\CMS\Backend\Utility\BackendUtility $fixture */
                $fixture = $this->getMock('TYPO3\\CMS\\Backend\\Utility\\BackendUtility', array('getRecordWSOL'));
                $fixture->staticExpects($this->at(0))->method('getRecordWSOL')->will($this->returnValue(array('title' => 'Page 1')));
                $fixture->staticExpects($this->at(1))->method('getRecordWSOL')->will($this->returnValue(array('header' => 'Content 2')));
@@ -453,7 +454,7 @@ class BackendUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @test
         */
        public function getFuncCheckReturnsInputTagWithValueAttribute() {
-               $this->assertStringMatchesFormat('<input %Svalue="1"%S/>', Utility\BackendUtility::getFuncCheck('params', 'test', TRUE));
+               $this->assertStringMatchesFormat('<input %Svalue="1"%S/>', BackendUtility::getFuncCheck('params', 'test', TRUE));
        }
 
        /**
@@ -669,7 +670,7 @@ class BackendUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         */
        public function getExcludeFieldsReturnsCorrectFieldList($tca, $expected) {
                $GLOBALS['TCA'] = $tca;
-               $this->assertSame($expected, \TYPO3\CMS\Backend\Utility\BackendUtility::getExcludeFields());
+               $this->assertSame($expected, BackendUtility::getExcludeFields());
        }
 
        /**
@@ -682,7 +683,7 @@ class BackendUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
        public function viewOnClickReturnsOnClickCodeWithAlternativeUrl() {
                $alternativeUrl = 'https://typo3.org/about/typo3-the-cms/the-history-of-typo3/#section';
                $onclickCode = 'var previewWin = window.open(\'' . $alternativeUrl . '\',\'newTYPO3frontendWindow\');';
-               $this->assertStringMatchesFormat($onclickCode, Utility\BackendUtility::viewOnClick(NULL, NULL, NULL, NULL, $alternativeUrl, NULL, FALSE));
+               $this->assertStringMatchesFormat($onclickCode, BackendUtility::viewOnClick(NULL, NULL, NULL, NULL, $alternativeUrl, NULL, FALSE));
        }
 
        /**
@@ -877,7 +878,7 @@ class BackendUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @dataProvider replaceMarkersInWhereClauseDataProvider
         */
        public function replaceMarkersInWhereClauseReturnsValidWhereClause($whereClause, $tsConfig, $expected) {
-               $this->assertSame($expected, Utility\BackendUtility::replaceMarkersInWhereClause($whereClause, 'dummytable', 'dummyfield', $tsConfig));
+               $this->assertSame($expected, BackendUtility::replaceMarkersInWhereClause($whereClause, 'dummytable', 'dummyfield', $tsConfig));
        }
 }
 ?>
index dbf1e9d..254382e 100755 (executable)
@@ -24,6 +24,7 @@
  *
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
+
 /**
  * Module: Web>Page
  *
index 550009d..9c906aa 100644 (file)
@@ -26,11 +26,9 @@ namespace TYPO3\CMS\Core\Configuration\FlexForm;
  *
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
-/**
- * Contains functions for manipulating flex form data
- *
- * @author Kasper Skårhøj <kasperYYYY@typo3.com>
- */
+
+use TYPO3\CMS\Backend\Utility\BackendUtility;
+
 /**
  * Contains functions for manipulating flex form data
  *
@@ -111,7 +109,7 @@ class FlexFormTools {
                }
                $this->callBackObj = $callBackObj;
                // Get Data Structure:
-               $dataStructArray = \TYPO3\CMS\Backend\Utility\BackendUtility::getFlexFormDS($GLOBALS['TCA'][$table]['columns'][$field]['config'], $row, $table, $field);
+               $dataStructArray = BackendUtility::getFlexFormDS($GLOBALS['TCA'][$table]['columns'][$field]['config'], $row, $table, $field);
                // If data structure was ok, proceed:
                if (is_array($dataStructArray)) {
                        // Get flexform XML data:
@@ -253,7 +251,7 @@ class FlexFormTools {
        public function getAvailableLanguages() {
                $isL = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('static_info_tables');
                // Find all language records in the system
-               $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('static_lang_isocode,title,uid', 'sys_language', 'pid=0' . \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause('sys_language'), '', 'title');
+               $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('static_lang_isocode,title,uid', 'sys_language', 'pid=0' . BackendUtility::deleteClause('sys_language'), '', 'title');
                // Traverse them
                $output = array();
                $output[0] = array(
@@ -264,7 +262,7 @@ class FlexFormTools {
                while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
                        $output[$row['uid']] = $row;
                        if ($isL && $row['static_lang_isocode']) {
-                               $rr = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecord('static_languages', $row['static_lang_isocode'], 'lg_iso_2');
+                               $rr = BackendUtility::getRecord('static_languages', $row['static_lang_isocode'], 'lg_iso_2');
                                if ($rr['lg_iso_2']) {
                                        $output[$row['uid']]['ISOcode'] = $rr['lg_iso_2'];
                                }
index 2235f0b..d5b40bd 100644 (file)
@@ -26,6 +26,9 @@ namespace TYPO3\CMS\Core\Database;
  *
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
+
+use TYPO3\CMS\Backend\Utility\BackendUtility;
+
 /**
  * Class for generating front end for building queries
  *
@@ -33,12 +36,6 @@ namespace TYPO3\CMS\Core\Database;
  * @author Kasper Skårhøj <kasperYYYY@typo3.com>
  * @coauthor Jo Hasenau <info@cybercraft.de>
  */
-/**
- * Class for generating front end for building queries
- *
- * @author Christian Jul Jensen <christian@typo3.com>
- * @author Kasper Skårhøj <kasperYYYY@typo3.com>
- */
 class QueryGenerator {
 
        /**
@@ -828,7 +825,7 @@ class QueryGenerator {
                                $from_table_Arr = explode(',', $fieldSetup['allowed']);
                                $useTablePrefix = 1;
                                if (!$fieldSetup['prepend_tname']) {
-                                       $checkres = $GLOBALS['TYPO3_DB']->exec_SELECTquery($fN, $table, \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause($table), ($groupBy = ''), ($orderBy = ''), ($limit = ''));
+                                       $checkres = $GLOBALS['TYPO3_DB']->exec_SELECTquery($fN, $table, BackendUtility::deleteClause($table), ($groupBy = ''), ($orderBy = ''), ($limit = ''));
                                        if ($checkres) {
                                                while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($checkres)) {
                                                        if (stristr($row[$fN], ',')) {
@@ -901,18 +898,18 @@ class QueryGenerator {
                                                if ($from_table == 'pages') {
                                                        $where_clause = 'uid IN (' . $webMountPageTree . ') ';
                                                        if (!$GLOBALS['SOBE']->MOD_SETTINGS['show_deleted']) {
-                                                               $where_clause .= \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause($from_table) . ' AND' . $perms_clause;
+                                                               $where_clause .= BackendUtility::deleteClause($from_table) . ' AND' . $perms_clause;
                                                        }
                                                } else {
                                                        $where_clause = 'pid IN (' . $webMountPageTree . ') ';
                                                        if (!$GLOBALS['SOBE']->MOD_SETTINGS['show_deleted']) {
-                                                               $where_clause .= \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause($from_table);
+                                                               $where_clause .= BackendUtility::deleteClause($from_table);
                                                        }
                                                }
                                        } else {
                                                $where_clause = 'uid';
                                                if (!$GLOBALS['SOBE']->MOD_SETTINGS['show_deleted']) {
-                                                       $where_clause .= \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause($from_table);
+                                                       $where_clause .= BackendUtility::deleteClause($from_table);
                                                }
                                        }
                                        $orderBy = 'uid';
@@ -1402,9 +1399,9 @@ class QueryGenerator {
                        if (in_array('order', $enableArr) && !$GLOBALS['BE_USER']->userTS['mod.']['dbint.']['disableOrderBy']) {
                                $orderByArr = explode(',', $this->extFieldLists['queryOrder']);
                                $orderBy = '';
-                               $orderBy .= $this->mkTypeSelect('SET[queryOrder]', $orderByArr[0], '') . '&nbsp;' . \TYPO3\CMS\Backend\Utility\BackendUtility::getFuncCheck($GLOBALS['SOBE']->id, 'SET[queryOrderDesc]', $modSettings['queryOrderDesc'], '', '', 'id="checkQueryOrderDesc"') . '&nbsp;<label for="checkQueryOrderDesc">Descending</label>';
+                               $orderBy .= $this->mkTypeSelect('SET[queryOrder]', $orderByArr[0], '') . '&nbsp;' . BackendUtility::getFuncCheck($GLOBALS['SOBE']->id, 'SET[queryOrderDesc]', $modSettings['queryOrderDesc'], '', '', 'id="checkQueryOrderDesc"') . '&nbsp;<label for="checkQueryOrderDesc">Descending</label>';
                                if ($orderByArr[0]) {
-                                       $orderBy .= '<BR>' . $this->mkTypeSelect('SET[queryOrder2]', $orderByArr[1], '') . '&nbsp;' . \TYPO3\CMS\Backend\Utility\BackendUtility::getFuncCheck($GLOBALS['SOBE']->id, 'SET[queryOrder2Desc]', $modSettings['queryOrder2Desc'], '', '', 'id="checkQueryOrder2Desc"') . '&nbsp;<label for="checkQueryOrder2Desc">Descending</label>';
+                                       $orderBy .= '<BR>' . $this->mkTypeSelect('SET[queryOrder2]', $orderByArr[1], '') . '&nbsp;' . BackendUtility::getFuncCheck($GLOBALS['SOBE']->id, 'SET[queryOrder2Desc]', $modSettings['queryOrder2Desc'], '', '', 'id="checkQueryOrder2Desc"') . '&nbsp;<label for="checkQueryOrder2Desc">Descending</label>';
                                }
                                $out .= '<tr>
                                        <td' . $TDparams . '><strong>Order By:</strong></td>
@@ -1463,7 +1460,7 @@ class QueryGenerator {
                        $theList = '';
                }
                if ($id && $depth > 0) {
-                       $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('uid', 'pages', 'pid=' . $id . ' ' . \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause('pages') . ' AND ' . $perms_clause);
+                       $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('uid', 'pages', 'pid=' . $id . ' ' . BackendUtility::deleteClause('pages') . ' AND ' . $perms_clause);
                        while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
                                if ($begin <= 0) {
                                        $theList .= ',' . $row['uid'];
@@ -1508,7 +1505,7 @@ class QueryGenerator {
                }
                $fieldlist = $this->extFieldLists['queryFields'] . ',pid' . ($GLOBALS['TCA'][$this->table]['ctrl']['delete'] ? ',' . $GLOBALS['TCA'][$this->table]['ctrl']['delete'] : '');
                if (!$GLOBALS['SOBE']->MOD_SETTINGS['show_deleted']) {
-                       $qString .= \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause($this->table);
+                       $qString .= BackendUtility::deleteClause($this->table);
                }
                $query = $GLOBALS['TYPO3_DB']->SELECTquery($fieldlist, $this->table, $qString, trim($this->extFieldLists['queryGroup']), $this->extFieldLists['queryOrder'] ? trim($this->extFieldLists['queryOrder_SQL']) : '', $this->extFieldLists['queryLimit']);
                return $query;
index 452df60..cbc9425 100644 (file)
@@ -27,6 +27,7 @@ namespace TYPO3\CMS\Core\Database;
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
 
+use TYPO3\CMS\Backend\Utility\BackendUtility;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 
 /**
@@ -101,7 +102,7 @@ class ReferenceIndex {
                // Get current index from Database:
                $currentRels = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('*', 'sys_refindex', 'tablename=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($table, 'sys_refindex') . ' AND recuid=' . intval($uid), '', '', '', 'hash');
                // First, test to see if the record exists (including deleted-flagged)
-               if (\TYPO3\CMS\Backend\Utility\BackendUtility::getRecordRaw($table, 'uid=' . intval($uid), 'uid')) {
+               if (BackendUtility::getRecordRaw($table, 'uid=' . intval($uid), 'uid')) {
                        // Then, get relations:
                        $relations = $this->generateRefIndexData($table, $uid);
                        if (is_array($relations)) {
@@ -370,7 +371,7 @@ class ReferenceIndex {
                                if ($conf['type'] == 'flex') {
                                        // Get current value array:
                                        // NOTICE: failure to resolve Data Structures can lead to integrity problems with the reference index. Please look up the note in the JavaDoc documentation for the function \TYPO3\CMS\Backend\Utility\BackendUtility::getFlexFormDS()
-                                       $dataStructArray = \TYPO3\CMS\Backend\Utility\BackendUtility::getFlexFormDS($conf, $row, $table, $field, $this->WSOL);
+                                       $dataStructArray = BackendUtility::getFlexFormDS($conf, $row, $table, $field, $this->WSOL);
                                        $currentValueArray = GeneralUtility::xml2array($value);
                                        // Traversing the XML structure, processing files:
                                        if (is_array($currentValueArray)) {
@@ -390,10 +391,10 @@ class ReferenceIndex {
                                        }
                                }
                                // Soft References:
-                               if (strlen($value) && ($softRefs = \TYPO3\CMS\Backend\Utility\BackendUtility::explodeSoftRefParserList($conf['softref']))) {
+                               if (strlen($value) && ($softRefs = BackendUtility::explodeSoftRefParserList($conf['softref']))) {
                                        $softRefValue = $value;
                                        foreach ($softRefs as $spKey => $spParams) {
-                                               $softRefObj = \TYPO3\CMS\Backend\Utility\BackendUtility::softRefParserObj($spKey);
+                                               $softRefObj = BackendUtility::softRefParserObj($spKey);
                                                if (is_object($softRefObj)) {
                                                        $resultArray = $softRefObj->findRef($table, $field, $uid, $softRefValue, $spKey, $spParams);
                                                        if (is_array($resultArray)) {
@@ -442,10 +443,10 @@ class ReferenceIndex {
                        $this->temp_flexRelations['db'][$structurePath] = $result;
                }
                // Soft References:
-               if (strlen($dataValue) && ($softRefs = \TYPO3\CMS\Backend\Utility\BackendUtility::explodeSoftRefParserList($dsConf['softref']))) {
+               if (strlen($dataValue) && ($softRefs = BackendUtility::explodeSoftRefParserList($dsConf['softref']))) {
                        $softRefValue = $dataValue;
                        foreach ($softRefs as $spKey => $spParams) {
-                               $softRefObj = \TYPO3\CMS\Backend\Utility\BackendUtility::softRefParserObj($spKey);
+                               $softRefObj = BackendUtility::softRefParserObj($spKey);
                                if (is_object($softRefObj)) {
                                        $resultArray = $softRefObj->findRef($table, $field, $uid, $softRefValue, $spKey, $spParams, $structurePath);
                                        if (is_array($resultArray) && is_array($resultArray['elements'])) {
index a0474c7..622fd2d 100644 (file)
@@ -27,6 +27,8 @@ namespace TYPO3\CMS\Core\Database;
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
 
+use TYPO3\CMS\Backend\Utility\BackendUtility;
+
 /**
  * Load database groups (relations)
  * Used to process the relations created by the TCA element types "group" and "select" for database records. Manages MM-relations as well.
@@ -617,7 +619,7 @@ class RelationHandler {
                }
                // Use the deleteClause (e.g. "deleted=0") on this table
                if ($useDeleteClause) {
-                       $whereClause .= \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause($foreign_table);
+                       $whereClause .= BackendUtility::deleteClause($foreign_table);
                }
                // If it's requested to look for the parent uid AND the parent table,
                // add an additional SQL-WHERE clause
@@ -629,9 +631,9 @@ class RelationHandler {
                        $whereClause .= ' AND ' . $field . '=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($value, $foreign_table);
                }
                // Select children in the same workspace:
-               if (\TYPO3\CMS\Backend\Utility\BackendUtility::isTableWorkspaceEnabled($this->currentTable) && \TYPO3\CMS\Backend\Utility\BackendUtility::isTableWorkspaceEnabled($foreign_table)) {
-                       $currentRecord = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecord($this->currentTable, $uid, 't3ver_wsid', '', $useDeleteClause);
-                       $whereClause .= \TYPO3\CMS\Backend\Utility\BackendUtility::getWorkspaceWhereClause($foreign_table, $currentRecord['t3ver_wsid']);
+               if (BackendUtility::isTableWorkspaceEnabled($this->currentTable) && BackendUtility::isTableWorkspaceEnabled($foreign_table)) {
+                       $currentRecord = BackendUtility::getRecord($this->currentTable, $uid, 't3ver_wsid', '', $useDeleteClause);
+                       $whereClause .= BackendUtility::getWorkspaceWhereClause($foreign_table, $currentRecord['t3ver_wsid']);
                }
                // Get the correct sorting field
                // Specific manual sortby for data handled by this field
@@ -695,7 +697,7 @@ class RelationHandler {
                        if (!(\TYPO3\CMS\Core\Utility\MathUtility::canBeInterpretedAsInteger($updateToUid) && $updateToUid > 0)) {
                                $updateToUid = 0;
                        }
-                       $considerWorkspaces = $GLOBALS['BE_USER']->workspace !== 0 && \TYPO3\CMS\Backend\Utility\BackendUtility::isTableWorkspaceEnabled($foreign_table);
+                       $considerWorkspaces = $GLOBALS['BE_USER']->workspace !== 0 && BackendUtility::isTableWorkspaceEnabled($foreign_table);
                        $fields = 'uid,' . $foreign_field;
                        // Consider the symmetric field if defined:
                        if ($symmetric_field) {
@@ -711,7 +713,7 @@ class RelationHandler {
                                $table = $val['table'];
                                // Fetch the current (not overwritten) relation record if we should handle symmetric relations
                                if ($symmetric_field || $considerWorkspaces) {
-                                       $row = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecord($table, $uid, $fields, '', FALSE);
+                                       $row = BackendUtility::getRecord($table, $uid, $fields, '', FALSE);
                                }
                                if ($symmetric_field) {
                                        $isOnSymmetricSide = self::isOnSymmetricSide($parentUid, $conf, $row);
@@ -879,7 +881,8 @@ class RelationHandler {
                foreach ($this->itemArray as $key => $val) {
                        $theRow = $this->results[$val['table']][$val['id']];
                        if ($theRow && is_array($GLOBALS['TCA'][$val['table']])) {
-                               $label = \TYPO3\CMS\Core\Utility\GeneralUtility::fixed_lgd_cs(strip_tags(\TYPO3\CMS\Backend\Utility\BackendUtility::getRecordTitle($val['table'], $theRow)), $titleLen);
+                               $label = \TYPO3\CMS\Core\Utility\GeneralUtility::fixed_lgd_cs(strip_tags(
+                                               BackendUtility::getRecordTitle($val['table'], $theRow)), $titleLen);
                                $label = $label ? $label : '[...]';
                                $output[] = str_replace(',', '', $val['table'] . '_' . $val['id'] . '|' . rawurlencode($label));
                        }
index 4dc7777..8233210 100644 (file)
@@ -27,6 +27,7 @@ namespace TYPO3\CMS\Core\Html;
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
 
+use TYPO3\CMS\Backend\Utility\BackendUtility;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 
 /**
@@ -210,7 +211,7 @@ class RteHtmlParser extends \TYPO3\CMS\Core\Html\HtmlParser {
                        $this->blockElementList = $this->procOptions['blockElementList'];
                }
                // Get parameters for rte_transformation:
-               $p = ($this->rte_p = \TYPO3\CMS\Backend\Utility\BackendUtility::getSpecConfParametersFromArray($specConf['rte_transform']['parameters']));
+               $p = ($this->rte_p = BackendUtility::getSpecConfParametersFromArray($specConf['rte_transform']['parameters']));
                // Setting modes:
                if (strcmp($this->procOptions['overruleMode'], '')) {
                        $modes = array_unique(GeneralUtility::trimExplode(',', $this->procOptions['overruleMode']));
@@ -808,10 +809,10 @@ class RteHtmlParser extends \TYPO3\CMS\Core\Html\HtmlParser {
                                                        // If no id or alias is given, set it to class record pid
                                                        // Checking if the id-parameter is an alias.
                                                        if (!\TYPO3\CMS\Core\Utility\MathUtility::canBeInterpretedAsInteger($idPart)) {
-                                                               list($idPartR) = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecordsByField('pages', 'alias', $idPart);
+                                                               list($idPartR) = BackendUtility::getRecordsByField('pages', 'alias', $idPart);
                                                                $idPart = intval($idPartR['uid']);
                                                        }
-                                                       $page = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecord('pages', $idPart);
+                                                       $page = BackendUtility::getRecord('pages', $idPart);
                                                        if (is_array($page)) {
                                                                // Page must exist...
                                                                $href = $siteUrl . '?id=' . $idPart . ($pairParts[2] ? $pairParts[2] : '') . ($sectionMark ? '#' . $sectionMark : '');
index 67d413f..ded0804 100644 (file)
@@ -27,6 +27,8 @@ namespace TYPO3\CMS\Core\Integrity;
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
 
+use TYPO3\CMS\Backend\Utility\BackendUtility;
+
 /**
  * This class holds functions used by the TYPO3 backend to check the integrity of the database (The DBint module, 'lowlevel' extension)
  *
@@ -217,10 +219,18 @@ class DatabaseIntegrityCheck {
        public function genTree_records($theID, $depthData, $table = '', $versions = FALSE) {
                if ($versions) {
                        // Select all records from table pointing to this page:
-                       $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(\TYPO3\CMS\Backend\Utility\BackendUtility::getCommonSelectFields($table), $table, 'pid=-1 AND t3ver_oid=' . intval($theID) . (!$this->genTree_includeDeleted ? \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause($table) : ''));
+                       $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
+                               BackendUtility::getCommonSelectFields($table),
+                               $table,
+                               'pid=-1 AND t3ver_oid=' . intval($theID) . (!$this->genTree_includeDeleted ? BackendUtility::deleteClause($table) : '')
+                       );
                } else {
                        // Select all records from table pointing to this page:
-                       $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(\TYPO3\CMS\Backend\Utility\BackendUtility::getCommonSelectFields($table), $table, 'pid=' . intval($theID) . (!$this->genTree_includeDeleted ? \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause($table) : ''));
+                       $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
+                               BackendUtility::getCommonSelectFields($table),
+                               $table,
+                               'pid=' . intval($theID) . (!$this->genTree_includeDeleted ? BackendUtility::deleteClause($table) : '')
+                       );
                }
                // Traverse selected:
                $a = 0;
@@ -240,7 +250,7 @@ class DatabaseIntegrityCheck {
                                $PM = 'join';
                                $LN = $a == $c ? 'blank' : 'line';
                                $BTM = $a == $c ? 'bottom' : '';
-                               $this->genTree_HTML .= $depthData . '<img' . \TYPO3\CMS\Backend\Utility\IconUtility::skinImg($this->backPath, ('gfx/ol/' . $PM . $BTM . '.gif'), 'width="18" height="16"') . ' align="top" alt="" />' . $versionLabel . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIconForRecord($table, $row, array('title' => $table)) . htmlspecialchars(($row['uid'] . ': ' . \TYPO3\CMS\Backend\Utility\BackendUtility::getRecordTitle($table, $row))) . '</span></div>';
+                               $this->genTree_HTML .= $depthData . '<img' . \TYPO3\CMS\Backend\Utility\IconUtility::skinImg($this->backPath, ('gfx/ol/' . $PM . $BTM . '.gif'), 'width="18" height="16"') . ' align="top" alt="" />' . $versionLabel . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIconForRecord($table, $row, array('title' => $table)) . htmlspecialchars(($row['uid'] . ': ' . BackendUtility::getRecordTitle($table, $row))) . '</span></div>';
                        }
                        // Register various data for this item:
                        $this->rec_idArray[$table][$newID] = $row;
@@ -306,7 +316,7 @@ class DatabaseIntegrityCheck {
                                        $this->lRecords[$table][$row['uid']] = array(
                                                'uid' => $row['uid'],
                                                'pid' => $row['pid'],
-                                               'title' => strip_tags(\TYPO3\CMS\Backend\Utility\BackendUtility::getRecordTitle($table, $row))
+                                               'title' => strip_tags(BackendUtility::getRecordTitle($table, $row))
                                        );
                                        $lostIdList[] = $row['uid'];
                                }
@@ -363,7 +373,7 @@ class DatabaseIntegrityCheck {
                                if ($count) {
                                        $list[$table] = $count;
                                }
-                               $count = $GLOBALS['TYPO3_DB']->exec_SELECTcountRows('uid', $table, 'pid IN (' . $pid_list_tmp . ')' . \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause($table));
+                               $count = $GLOBALS['TYPO3_DB']->exec_SELECTcountRows('uid', $table, 'pid IN (' . $pid_list_tmp . ')' . BackendUtility::deleteClause($table));
                                if ($count) {
                                        $list_n[$table] = $count;
                                }
@@ -615,7 +625,7 @@ class DatabaseIntegrityCheck {
                                $idlist = array_keys($dbArr);
                                $theList = implode(',', $idlist);
                                if ($theList) {
-                                       $mres = $GLOBALS['TYPO3_DB']->exec_SELECTquery('uid', $table, 'uid IN (' . $theList . ')' . \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause($table));
+                                       $mres = $GLOBALS['TYPO3_DB']->exec_SELECTquery('uid', $table, 'uid IN (' . $theList . ')' . BackendUtility::deleteClause($table));
                                        while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($mres)) {
                                                if (isset($dbArr[$row['uid']])) {
                                                        unset($dbArr[$row['uid']]);
index 498f72f..51be62a 100644 (file)
@@ -27,6 +27,7 @@ namespace TYPO3\CMS\Core\TypoScript;
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
 
+use TYPO3\CMS\Backend\Utility\BackendUtility;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 
 /**
@@ -429,7 +430,7 @@ class ExtendedTemplateService extends \TYPO3\CMS\Core\TypoScript\TemplateService
                                        if (GeneralUtility::_GP('breakPointLN')) {
                                                $urlParameters['breakPointLN'] = GeneralUtility::_GP('breakPointLN');
                                        }
-                                       $aHref = \TYPO3\CMS\Backend\Utility\BackendUtility::getModuleUrl('web_ts', $urlParameters) . '#' . $goto;
+                                       $aHref = BackendUtility::getModuleUrl('web_ts', $urlParameters) . '#' . $goto;
                                        $HTML .= '<a name="' . $goto . '" href="' . htmlspecialchars($aHref) . '">' . $theIcon . '</a>';
                                }
                                $label = $key;
@@ -445,7 +446,7 @@ class ExtendedTemplateService extends \TYPO3\CMS\Core\TypoScript\TemplateService
                                                if (GeneralUtility::_GP('breakPointLN')) {
                                                        $urlParameters['breakPointLN'] = GeneralUtility::_GP('breakPointLN');
                                                }
-                                               $aHref = \TYPO3\CMS\Backend\Utility\BackendUtility::getModuleUrl('web_ts', $urlParameters);
+                                               $aHref = BackendUtility::getModuleUrl('web_ts', $urlParameters);
                                                if ($this->bType != 'const') {
                                                        $ln = is_array($arr[$key . '.ln..']) ? 'Defined in: ' . $this->lineNumberToScript($arr[($key . '.ln..')]) : 'N/A';
                                                } else {
@@ -649,14 +650,14 @@ class ExtendedTemplateService extends \TYPO3\CMS\Core\TypoScript\TemplateService
                        $PM = 'join';
                        $HTML .= $depthData;
                        $alttext = '[' . $row['templateID'] . ']';
-                       $alttext .= $row['pid'] ? ' - ' . \TYPO3\CMS\Backend\Utility\BackendUtility::getRecordPath($row['pid'], $GLOBALS['SOBE']->perms_clause, 20) : '';
+                       $alttext .= $row['pid'] ? ' - ' . BackendUtility::getRecordPath($row['pid'], $GLOBALS['SOBE']->perms_clause, 20) : '';
                        $icon = substr($row['templateID'], 0, 3) == 'sys' ? \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIconForRecord('sys_template', $row, array('title' => $alttext)) : \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('mimetypes-x-content-template-static', array('title' => $alttext));
                        if (in_array($row['templateID'], $this->clearList_const) || in_array($row['templateID'], $this->clearList_setup)) {
                                $urlParameters = array(
                                        'id' => $GLOBALS['SOBE']->id,
                                        'template' => $row['templateID']
                                );
-                               $aHref = \TYPO3\CMS\Backend\Utility\BackendUtility::getModuleUrl('web_ts', $urlParameters);
+                               $aHref = BackendUtility::getModuleUrl('web_ts', $urlParameters);
                                $A_B = '<a href="' . htmlspecialchars($aHref) . '">';
                                $A_E = '</a>';
                                if (GeneralUtility::_GP('template') == $row['templateID']) {
@@ -832,7 +833,7 @@ class ExtendedTemplateService extends \TYPO3\CMS\Core\TypoScript\TemplateService
                        }
                        $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'sys_template', 'pid=' . intval($id) . $addC . ' ' . $this->whereClause, '', 'sorting', '1');
                        $row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res);
-                       \TYPO3\CMS\Backend\Utility\BackendUtility::workspaceOL('sys_template', $row);
+                       BackendUtility::workspaceOL('sys_template', $row);
                        $GLOBALS['TYPO3_DB']->sql_free_result($res);
                        // Returns the template row if found.
                        return $row;
@@ -852,7 +853,7 @@ class ExtendedTemplateService extends \TYPO3\CMS\Core\TypoScript\TemplateService
                        $outRes = array();
                        $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'sys_template', 'pid=' . intval($id) . ' ' . $this->whereClause, '', 'sorting');
                        while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
-                               \TYPO3\CMS\Backend\Utility\BackendUtility::workspaceOL('sys_template', $row);
+                               BackendUtility::workspaceOL('sys_template', $row);
                                if (is_array($row)) {
                                        $outRes[] = $row;
                                }
@@ -1578,7 +1579,7 @@ class ExtendedTemplateService extends \TYPO3\CMS\Core\TypoScript\TemplateService
         * @todo Define visibility
         */
        public function ext_prevPageWithTemplate($id, $perms_clause) {
-               $rootLine = \TYPO3\CMS\Backend\Utility\BackendUtility::BEgetRootLine($id, $perms_clause ? ' AND ' . $perms_clause : '');
+               $rootLine = BackendUtility::BEgetRootLine($id, $perms_clause ? ' AND ' . $perms_clause : '');
                foreach ($rootLine as $p) {
                        if ($this->ext_getFirstTemplate($p['uid'])) {
                                return $p;
index 28d7222..270f2dc 100644 (file)
@@ -27,6 +27,7 @@ namespace TYPO3\CMS\Core\Utility\File;
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
 
+use TYPO3\CMS\Backend\Utility\BackendUtility;
 use TYPO3\CMS\Core\Resource\File;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 
@@ -412,10 +413,10 @@ class ExtendedFileUtility extends \TYPO3\CMS\Core\Utility\File\BasicFileUtility
                                foreach ($refIndexRecords as $fileReferenceRow) {
                                        if ($fileReferenceRow['tablename'] === 'sys_file_reference') {
                                                $row = $this->transformFileReferenceToRecordReference($fileReferenceRow);
-                                               $shortcutRecord = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecord($row['tablename'], $row['recuid']);
+                                               $shortcutRecord = BackendUtility::getRecord($row['tablename'], $row['recuid']);
                                                $icon = \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIconForRecord($row['tablename'], $shortcutRecord);
                                                $onClick = 'Clickmenu.show("' . $row['tablename'] . '", "' . $row['recuid'] . '", "1", "+info,history,edit", "|", "");return false;';
-                                               $shortcutContent[] = '<a href="#" oncontextmenu="' . htmlspecialchars($onClick) . '" onclick="' . htmlspecialchars($onClick) . '">' . $icon . '</a>' . htmlspecialchars((\TYPO3\CMS\Backend\Utility\BackendUtility::getRecordTitle($row['tablename'], $shortcutRecord) . '  [' . \TYPO3\CMS\Backend\Utility\BackendUtility::getRecordPath($shortcutRecord['pid'], '', 80) . ']'));
+                                               $shortcutContent[] = '<a href="#" oncontextmenu="' . htmlspecialchars($onClick) . '" onclick="' . htmlspecialchars($onClick) . '">' . $icon . '</a>' . htmlspecialchars((BackendUtility::getRecordTitle($row['tablename'], $shortcutRecord) . '  [' . BackendUtility::getRecordPath($shortcutRecord['pid'], '', 80) . ']'));
                                        }
                                }
 
index 86f36bd..9faadbe 100644 (file)
@@ -27,6 +27,8 @@ namespace TYPO3\CMS\Cshmanual\Controller;
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
 
+use TYPO3\CMS\Backend\Utility\BackendUtility;
+
 /**
  * Script Class for rendering the Context Sensitive Help documents, either the single display in the small pop-up window or the full-table view in the larger window.
  *
@@ -148,7 +150,7 @@ class HelpModuleController {
                        $this->field = $flexFormField;
                }
                // limitAccess is checked if the $this->table really IS a table (and if the user is NOT a translator who should see all!)
-               $showAllToUser = \TYPO3\CMS\Backend\Utility\BackendUtility::isModuleSetInTBE_MODULES('txllxmltranslateM1') && $GLOBALS['BE_USER']->check('modules', 'txllxmltranslateM1');
+               $showAllToUser = BackendUtility::isModuleSetInTBE_MODULES('txllxmltranslateM1') && $GLOBALS['BE_USER']->check('modules', 'txllxmltranslateM1');
                $this->limitAccess = isset($GLOBALS['TCA'][$this->table]) ? !$showAllToUser : FALSE;
                $GLOBALS['LANG']->includeLLFile('EXT:lang/locallang_view_help.xlf', 1);
        }
@@ -278,7 +280,7 @@ class HelpModuleController {
                                <!-- NEW SECTION: -->
                                ', $outputSections);
                }
-               $output .= '<hr /><p class="manual-title">' . \TYPO3\CMS\Backend\Utility\BackendUtility::TYPO3_copyRightNotice() . '</p>';
+               $output .= '<hr /><p class="manual-title">' . BackendUtility::TYPO3_copyRightNotice() . '</p>';
                return $output;
        }
 
@@ -634,7 +636,7 @@ class HelpModuleController {
        public function createGlossaryIndex() {
                // Create hash string and try to retrieve glossary array:
                $hash = md5('typo3/mod.php?M=help_cshmanual:glossary');
-               list($this->glossaryWords, $this->substWords) = unserialize(\TYPO3\CMS\Backend\Utility\BackendUtility::getHash($hash));
+               list($this->glossaryWords, $this->substWords) = unserialize(BackendUtility::getHash($hash));
                // Generate glossary words if not found:
                if (!is_array($this->glossaryWords)) {
                        // Initialize:
@@ -668,7 +670,7 @@ class HelpModuleController {
                                }
                        }
                        krsort($this->substWords);
-                       \TYPO3\CMS\Backend\Utility\BackendUtility::storeHash($hash, serialize(array($this->glossaryWords, $this->substWords)), 'Glossary');
+                       BackendUtility::storeHash($hash, serialize(array($this->glossaryWords, $this->substWords)), 'Glossary');
                }
        }
 
index 6580699..5d91b87 100644 (file)
@@ -25,6 +25,8 @@ namespace TYPO3\CMS\Dbal\Controller;
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
 
+use TYPO3\CMS\Backend\Utility\BackendUtility;
+
 /**
  * Script class; Backend module for DBAL extension
  *
@@ -62,7 +64,7 @@ class ModuleController extends \TYPO3\CMS\Backend\Module\BaseScriptClass {
        public function main() {
                $this->thisScript = 'mod.php?M=' . $this->MCONF['name'];
                // Clean up 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, \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('SET'), $this->MCONF['name']);
                // Draw the header
                $this->doc = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Template\\DocumentTemplate');
                $this->doc->backPath = $GLOBALS['BACK_PATH'];
@@ -78,7 +80,7 @@ class ModuleController extends \TYPO3\CMS\Backend\Module\BaseScriptClass {
                $this->content .= $this->doc->startPage($GLOBALS['LANG']->getLL('title'));
                $this->content .= $this->doc->header($GLOBALS['LANG']->getLL('title'));
                $this->content .= $this->doc->spacer(5);
-               $this->content .= $this->doc->section('', $this->doc->funcMenu('', \TYPO3\CMS\Backend\Utility\BackendUtility::getFuncMenu(0, 'SET[function]', $this->MOD_SETTINGS['function'], $this->MOD_MENU['function'])));
+               $this->content .= $this->doc->section('', $this->doc->funcMenu('', BackendUtility::getFuncMenu(0, 'SET[function]', $this->MOD_SETTINGS['function'], $this->MOD_MENU['function'])));
                // Debug log:
                switch ($this->MOD_SETTINGS['function']) {
                        case 'info':
@@ -462,7 +464,7 @@ updateQryForm(\'' . $input['QUERY'] . '\');
                                while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
                                        $tRows[] = '
                                                        <tr>
-                                                               <td>' . \TYPO3\CMS\Backend\Utility\BackendUtility::datetime($row['tstamp']) . '</td>
+                                                               <td>' . BackendUtility::datetime($row['tstamp']) . '</td>
                                                                <td>' . htmlspecialchars($row['script']) . '</td>
                                                                <td>' . htmlspecialchars($row['tablename']) . '</td>
                                                                        <td>' . str_replace(array('\'\'', '""', 'IS NULL', 'IS NOT NULL'), array('<span style="background-color:#ff0000;color:#ffffff;padding:2px;font-weight:bold;">\'\'</span>', '<span style="background-color:#ff0000;color:#ffffff;padding:2px;font-weight:bold;">""</span>', '<span style="background-color:#00ff00;color:#ffffff;padding:2px;font-weight:bold;">IS NULL</span>', '<span style="background-color:#00ff00;color:#ffffff;padding:2px;font-weight:bold;">IS NOT NULL</span>'), htmlspecialchars($row['whereclause'])) . '</td>
@@ -510,7 +512,7 @@ updateQryForm(\'' . $input['QUERY'] . '\');
                                        while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
                                                $tRows[] = '
                                                                <tr>
-                                                                       <td>' . \TYPO3\CMS\Backend\Utility\BackendUtility::datetime($row['tstamp']) . '</td>
+                                                                       <td>' . BackendUtility::datetime($row['tstamp']) . '</td>
                                                                        <td>' . htmlspecialchars($row['qrycount']) . '</td>
                                                                        <td>' . ($row['error'] ? '<strong style="color:#f00">ERR</strong>' : '') . '</td>
                                                                        <td>' . htmlspecialchars($row['calc_sum']) . '</td>
index 7aa215d..c80cee2 100644 (file)
@@ -27,6 +27,9 @@ namespace TYPO3\CMS\Extbase\Persistence\Generic\Storage;
  *
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
+
+use TYPO3\CMS\Backend\Utility\BackendUtility;
+
 /**
  * A Storage backend
  */
@@ -890,8 +893,8 @@ class Typo3DbBackend implements \TYPO3\CMS\Extbase\Persistence\Generic\Storage\B
                                $statement = $this->getPageRepository()->enableFields($tableName);
                        } else {
                                // TYPO3_MODE === 'BE'
-                               $statement = \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause($tableName);
-                               $statement .= \TYPO3\CMS\Backend\Utility\BackendUtility::BEenableFields($tableName);
+                               $statement = BackendUtility::deleteClause($tableName);
+                               $statement .= BackendUtility::BEenableFields($tableName);
                        }
                        if (!empty($statement)) {
                                $statement = substr($statement, 5);
@@ -965,10 +968,10 @@ class Typo3DbBackend implements \TYPO3\CMS\Extbase\Persistence\Generic\Storage\B
        protected function getBackendConstraintStatement($tableName, $ignoreEnableFields, $includeDeleted) {
                $statement = '';
                if (!$ignoreEnableFields) {
-                       $statement .= \TYPO3\CMS\Backend\Utility\BackendUtility::BEenableFields($tableName);
+                       $statement .= BackendUtility::BEenableFields($tableName);
                }
                if (!$includeDeleted) {
-                       $statement .= \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause($tableName);
+                       $statement .= BackendUtility::deleteClause($tableName);
                }
                return $statement;
        }
@@ -1252,7 +1255,7 @@ class Typo3DbBackend implements \TYPO3\CMS\Extbase\Persistence\Generic\Storage\B
                        return;
                }
                if (!isset($this->pageTSConfigCache[$storagePage])) {
-                       $this->pageTSConfigCache[$storagePage] = \TYPO3\CMS\Backend\Utility\BackendUtility::getPagesTSconfig($storagePage);
+                       $this->pageTSConfigCache[$storagePage] = BackendUtility::getPagesTSconfig($storagePage);
                }
                if (isset($this->pageTSConfigCache[$storagePage]['TCEMAIN.']['clearCacheCmd'])) {
                        $clearCacheCommands = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', strtolower($this->pageTSConfigCache[$storagePage]['TCEMAIN.']['clearCacheCmd']), TRUE);
index d8897ef..a4d84e6 100644 (file)
@@ -27,6 +27,7 @@ namespace TYPO3\CMS\Filelist\Controller;
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
 
+use TYPO3\CMS\Backend\Utility\BackendUtility;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 
 /**
@@ -197,7 +198,7 @@ class FileListController {
                        'bigControlPanel' => ''
                );
                // CLEANSE SETTINGS
-               $this->MOD_SETTINGS = \TYPO3\CMS\Backend\Utility\BackendUtility::getModuleData(
+               $this->MOD_SETTINGS = BackendUtility::getModuleData(
                        $this->MOD_MENU,
                        GeneralUtility::_GP('SET'),
                        $this->MCONF['name']
@@ -333,15 +334,15 @@ class FileListController {
                                ';
                                // Add "display bigControlPanel" checkbox:
                                if ($GLOBALS['BE_USER']->getTSConfigVal('options.file_list.enableDisplayBigControlPanel') === 'selectable') {
-                                       $pageContent .= \TYPO3\CMS\Backend\Utility\BackendUtility::getFuncCheck($this->id, 'SET[bigControlPanel]', $this->MOD_SETTINGS['bigControlPanel'], '', '', 'id="bigControlPanel"') . '<label for="bigControlPanel"> ' . $GLOBALS['LANG']->getLL('bigControlPanel', TRUE) . '</label><br />';
+                                       $pageContent .= BackendUtility::getFuncCheck($this->id, 'SET[bigControlPanel]', $this->MOD_SETTINGS['bigControlPanel'], '', '', 'id="bigControlPanel"') . '<label for="bigControlPanel"> ' . $GLOBALS['LANG']->getLL('bigControlPanel', TRUE) . '</label><br />';
                                }
                                // Add "display thumbnails" checkbox:
                                if ($GLOBALS['BE_USER']->getTSConfigVal('options.file_list.enableDisplayThumbnails') === 'selectable') {
-                                       $pageContent .= \TYPO3\CMS\Backend\Utility\BackendUtility::getFuncCheck($this->id, 'SET[displayThumbs]', $this->MOD_SETTINGS['displayThumbs'], '', '', 'id="checkDisplayThumbs"') . ' <label for="checkDisplayThumbs">' . $GLOBALS['LANG']->getLL('displayThumbs', TRUE) . '</label><br />';
+                                       $pageContent .= BackendUtility::getFuncCheck($this->id, 'SET[displayThumbs]', $this->MOD_SETTINGS['displayThumbs'], '', '', 'id="checkDisplayThumbs"') . ' <label for="checkDisplayThumbs">' . $GLOBALS['LANG']->getLL('displayThumbs', TRUE) . '</label><br />';
                                }
                                // Add "clipboard" checkbox:
                                if ($GLOBALS['BE_USER']->getTSConfigVal('options.file_list.enableClipBoard') === 'selectable') {
-                                       $pageContent .= \TYPO3\CMS\Backend\Utility\BackendUtility::getFuncCheck($this->id, 'SET[clipBoard]', $this->MOD_SETTINGS['clipBoard'], '', '', 'id="checkClipBoard"') . ' <label for="checkClipBoard">' . $GLOBALS['LANG']->getLL('clipBoard', TRUE) . '</label>';
+                                       $pageContent .= BackendUtility::getFuncCheck($this->id, 'SET[clipBoard]', $this->MOD_SETTINGS['clipBoard'], '', '', 'id="checkClipBoard"') . ' <label for="checkClipBoard">' . $GLOBALS['LANG']->getLL('clipBoard', TRUE) . '</label>';
                                }
                                $pageContent .= '
                                        </div>
@@ -349,12 +350,12 @@ class FileListController {
                                // Set clipboard:
                                if ($this->MOD_SETTINGS['clipBoard']) {
                                        $pageContent .= $this->filelist->clipObj->printClipboard();
-                                       $pageContent .= \TYPO3\CMS\Backend\Utility\BackendUtility::cshItem('xMOD_csh_corebe', 'filelist_clipboard', $GLOBALS['BACK_PATH']);
+                                       $pageContent .= BackendUtility::cshItem('xMOD_csh_corebe', 'filelist_clipboard', $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' => ($this->errorMessage ? $this->errorMessage->render() : '') . $pageContent,
                                'FOLDER_IDENTIFIER' => $this->folderObject->getCombinedIdentifier(),
                                'FILEDENYPATERN' => $GLOBALS['TYPO3_CONF_VARS']['BE']['fileDenyPattern'],
@@ -424,7 +425,7 @@ class FileListController {
                        $buttons['shortcut'] = $this->doc->makeShortcutIcon('pointer,id,target,table', implode(',', array_keys($this->MOD_MENU)), $this->MCONF['name']);
                }
                // FileList Module CSH:
-               $buttons['csh'] = \TYPO3\CMS\Backend\Utility\BackendUtility::cshItem('xMOD_csh_corebe', 'filelist_module', $GLOBALS['BACK_PATH'], '', TRUE);
+               $buttons['csh'] = BackendUtility::cshItem('xMOD_csh_corebe', 'filelist_module', $GLOBALS['BACK_PATH'], '', TRUE);
                // Upload button (only if upload to this directory is allowed)
                if ($this->folderObject && $this->folderObject->getStorage()->checkUserActionPermission('upload', 'File') && $this->folderObject->checkActionPermission('write')) {
                        $buttons['upload'] = '<a href="' . $GLOBALS['BACK_PATH'] . 'file_upload.php?target=' . rawurlencode($this->folderObject->getCombinedIdentifier()) . '&amp;returnUrl=' . rawurlencode($this->filelist->listURL()) . '" id="button-upload" title="' . $GLOBALS['LANG']->makeEntities($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:cm.upload', TRUE)) . '">' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-edit-upload') . '</a>';
index 42f7e85..4e505a8 100644 (file)
@@ -27,9 +27,10 @@ namespace TYPO3\CMS\Filelist;
  *  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;
 use TYPO3\CMS\Core\Resource\FolderInterface;
-use TYPO3\CMS\Backend\Utility\IconUtility;
 
 /**
  * Class for rendering of File>Filelist
@@ -174,7 +175,7 @@ class FileList extends \TYPO3\CMS\Backend\RecordList\AbstractRecordList {
         * @todo Define visibility
         */
        public function start(\TYPO3\CMS\Core\Resource\Folder $folderObject, $pointer, $sort, $sortRev, $clipBoard = FALSE, $bigControlPanel = FALSE) {
-               $this->script = \TYPO3\CMS\Backend\Utility\BackendUtility::getModuleUrl('file_list');
+               $this->script = BackendUtility::getModuleUrl('file_list');
                $this->folderObject = $folderObject;
                $this->counter = 0;
                $this->totalbytes = 0;
@@ -603,7 +604,7 @@ class FileList extends \TYPO3\CMS\Backend\RecordList\AbstractRecordList {
                                                        $theData[$field] = strtoupper($ext);
                                                        break;
                                                case 'tstamp':
-                                                       $theData[$field] = \TYPO3\CMS\Backend\Utility\BackendUtility::date($fileInfo['mtime']);
+                                                       $theData[$field] = BackendUtility::date($fileInfo['mtime']);
                                                        break;
                                                case '_CLIPBOARD_':
                                                        $temp = '';
@@ -728,7 +729,7 @@ class FileList extends \TYPO3\CMS\Backend\RecordList\AbstractRecordList {
                                $data = array(
                                        'sys_file' => array($fileOrFolderObject->getUid() => 'edit')
                                );
-                               $editOnClick = \TYPO3\CMS\Backend\Utility\BackendUtility::editOnClick(GeneralUtility::implodeArrayForUrl('edit', $data), $GLOBALS['BACK_PATH'], $this->listUrl());
+                               $editOnClick = BackendUtility::editOnClick(GeneralUtility::implodeArrayForUrl('edit', $data), $GLOBALS['BACK_PATH'], $this->listUrl());
                                $cells['editmetadata'] = '<a href="#" onclick="' . $editOnClick . '" title="Edit Metadata of this file">' . IconUtility::getSpriteIcon('actions-document-open') . '</a>';
                        } else {
                                $cells['editmetadata'] = IconUtility::getSpriteIcon('empty-empty');
@@ -761,9 +762,9 @@ class FileList extends \TYPO3\CMS\Backend\RecordList\AbstractRecordList {
                if ($fileOrFolderObject->checkActionPermission('remove')) {
                        $identifier = $fileOrFolderObject->getIdentifier();
                        if ($fileOrFolderObject instanceof TYPO3\CMS\Core\Resource\Folder) {
-                               $referenceCountText = \TYPO3\CMS\Backend\Utility\BackendUtility::referenceCount('_FILE', $identifier, ' (There are %s reference(s) to this folder!)');
+                               $referenceCountText = BackendUtility::referenceCount('_FILE', $identifier, ' (There are %s reference(s) to this folder!)');
                        } else {
-                               $referenceCountText = \TYPO3\CMS\Backend\Utility\BackendUtility::referenceCount('sys_file', $identifier, ' (There are %s reference(s) to this file!)');
+                               $referenceCountText = BackendUtility::referenceCount('sys_file', $identifier, ' (There are %s reference(s) to this file!)');
                        }
 
                        if ($GLOBALS['BE_USER']->jsConfirmation(4)) {
index e38b9bb..5a50476 100644 (file)
@@ -24,6 +24,8 @@ namespace TYPO3\CMS\Form\View\Wizard;
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
 
+use TYPO3\CMS\Backend\Utility\BackendUtility;
+
 /**
  * The form wizard view
  *
@@ -256,7 +258,7 @@ class WizardView extends \TYPO3\CMS\Form\View\Wizard\AbstractWizardView {
        protected function loadSettings() {
                $record = $this->repository->getRecord();
                $pageId = $record->getPageId();
-               $modTSconfig = \TYPO3\CMS\Backend\Utility\BackendUtility::getModTSconfig($pageId, 'mod.wizards.form');
+               $modTSconfig = BackendUtility::getModTSconfig($pageId, 'mod.wizards.form');
                $settings = $modTSconfig['properties'];
                $this->removeTrailingDotsFromTyposcript($settings);
                $this->doc->JScode .= $this->doc->wrapScriptTags('TYPO3.Form.Wizard.Settings = ' . json_encode($settings) . ';');
@@ -326,9 +328,9 @@ class WizardView extends \TYPO3\CMS\Form\View\Wizard\AbstractWizardView {
                        'reload' => ''
                );
                // CSH
-               $buttons['csh'] = \TYPO3\CMS\Backend\Utility\BackendUtility::cshItem('xMOD_csh_corebe', 'wizard_forms_wiz', $GLOBALS['BACK_PATH'], '');
+               $buttons['csh'] = BackendUtility::cshItem('xMOD_csh_corebe', 'wizard_forms_wiz', $GLOBALS['BACK_PATH'], '');
                // CSH Buttons
-               $buttons['csh_buttons'] = \TYPO3\CMS\Backend\Utility\BackendUtility::cshItem('xMOD_csh_corebe', 'wizard_forms_wiz_buttons', $GLOBALS['BACK_PATH'], '');
+               $buttons['csh_buttons'] = BackendUtility::cshItem('xMOD_csh_corebe', 'wizard_forms_wiz_buttons', $GLOBALS['BACK_PATH'], '');
                // Close
                $getPostVariables = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('P');
                $buttons['close'] = '<a href="#" onclick="' . htmlspecialchars(('jumpToUrl(unescape(\'' . rawurlencode(\TYPO3\CMS\Core\Utility\GeneralUtility::sanitizeLocalUrl($getPostVariables['returnUrl'])) . '\')); return false;')) . '">' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-document-close', array(
index c0acce5..c670613 100644 (file)
@@ -27,6 +27,8 @@ namespace TYPO3\CMS\Frontend\Controller;
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
 
+use TYPO3\CMS\Backend\Utility\BackendUtility;
+
 /**
  * Class for displaying page information (records, page record properties)
  *
@@ -83,13 +85,13 @@ class PageInformationController extends \TYPO3\CMS\Backend\Module\AbstractFuncti
                // PAGES:
                $this->pObj->MOD_SETTINGS['pages_levels'] = $this->pObj->MOD_SETTINGS['depth'];
                // ONLY for the sake of dblist module which uses this value.
-               $h_func = \TYPO3\CMS\Backend\Utility\BackendUtility::getFuncMenu($this->pObj->id, 'SET[depth]', $this->pObj->MOD_SETTINGS['depth'], $this->pObj->MOD_MENU['depth'], 'index.php');
-               $h_func .= \TYPO3\CMS\Backend\Utility\BackendUtility::getFuncMenu($this->pObj->id, 'SET[pages]', $this->pObj->MOD_SETTINGS['pages'], $this->pObj->MOD_MENU['pages'], 'index.php');
+               $h_func = BackendUtility::getFuncMenu($this->pObj->id, 'SET[depth]', $this->pObj->MOD_SETTINGS['depth'], $this->pObj->MOD_MENU['depth'], 'index.php');
+               $h_func .= BackendUtility::getFuncMenu($this->pObj->id, 'SET[pages]', $this->pObj->MOD_SETTINGS['pages'], $this->pObj->MOD_MENU['pages'], 'index.php');
                $dblist->start($this->pObj->id, 'pages', 0);
                $dblist->generateList();
                // CSH
                $theOutput .= $this->pObj->doc->header($LANG->getLL('page_title'));
-               $theOutput .= $this->pObj->doc->section('', \TYPO3\CMS\Backend\Utility\BackendUtility::cshItem($dblist->descrTable, 'pagetree_overview', $GLOBALS['BACK_PATH'], '|<br />') . $h_func . $dblist->HTMLcode, 0, 1);
+               $theOutput .= $this->pObj->doc->section('', BackendUtility::cshItem($dblist->descrTable, 'pagetree_overview', $GLOBALS['BACK_PATH'], '|<br />') . $h_func . $dblist->HTMLcode, 0, 1);
                // Additional footer content
                $footerContentHook = $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms/web_info/class.tx_cms_webinfo.php']['drawFooterHook'];
                if (is_array($footerContentHook)) {
index 6d07388..838206b 100644 (file)
@@ -27,6 +27,7 @@ namespace TYPO3\CMS\Frontend\Controller;
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
 
+use TYPO3\CMS\Backend\Utility\BackendUtility;
 use TYPO3\CMS\Backend\Utility\IconUtility;
 
 /**
@@ -75,15 +76,15 @@ class TranslationStatusController extends \TYPO3\CMS\Backend\Module\AbstractFunc
                $theOutput = $this->pObj->doc->header($GLOBALS['LANG']->getLL('lang_title'));
                if ($this->pObj->id) {
                        // Depth selector:
-                       $h_func = \TYPO3\CMS\Backend\Utility\BackendUtility::getFuncMenu($this->pObj->id, 'SET[depth]', $this->pObj->MOD_SETTINGS['depth'], $this->pObj->MOD_MENU['depth'], 'index.php');
-                       $h_func .= \TYPO3\CMS\Backend\Utility\BackendUtility::getFuncMenu($this->pObj->id, 'SET[lang]', $this->pObj->MOD_SETTINGS['lang'], $this->pObj->MOD_MENU['lang'], 'index.php');
+                       $h_func = BackendUtility::getFuncMenu($this->pObj->id, 'SET[depth]', $this->pObj->MOD_SETTINGS['depth'], $this->pObj->MOD_MENU['depth'], 'index.php');
+                       $h_func .= BackendUtility::getFuncMenu($this->pObj->id, 'SET[lang]', $this->pObj->MOD_SETTINGS['lang'], $this->pObj->MOD_MENU['lang'], 'index.php');
                        $theOutput .= $h_func;
                        // Add CSH:
-                       $theOutput .= \TYPO3\CMS\Backend\Utility\BackendUtility::cshItem('_MOD_web_info', 'lang', $GLOBALS['BACK_PATH'], '|<br />');
+                       $theOutput .= BackendUtility::cshItem('_MOD_web_info', 'lang', $GLOBALS['BACK_PATH'], '|<br />');
                        // Showing the tree:
                        // Initialize starting point of page tree:
                        $treeStartingPoint = intval($this->pObj->id);
-                       $treeStartingRecord = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecordWSOL('pages', $treeStartingPoint);
+                       $treeStartingRecord = BackendUtility::getRecordWSOL('pages', $treeStartingPoint);
                        $depth = $this->pObj->MOD_SETTINGS['depth'];
                        // Initialize tree object:
                        $tree = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Tree\\View\\PageTreeView');
@@ -129,13 +130,15 @@ class TranslationStatusController extends \TYPO3\CMS\Backend\Module\AbstractFunc
                        $tCells[] = '<td' . ($data['row']['_CSSCLASS'] ? ' class="' . $data['row']['_CSSCLASS'] . '"' : '') . '>' . $data['HTML'] . htmlspecialchars(\TYPO3\CMS\Core\Utility\GeneralUtility::fixed_lgd_cs($data['row']['title'], $titleLen)) . (strcmp($data['row']['nav_title'], '') ? ' [Nav: <em>' . htmlspecialchars(\TYPO3\CMS\Core\Utility\GeneralUtility::fixed_lgd_cs($data['row']['nav_title'], $titleLen)) . '</em>]' : '') . '</td>';
                        // DEFAULT language:
                        // "View page" link is created:
-                       $viewPageLink = '<a href="#" onclick="' . htmlspecialchars(\TYPO3\CMS\Backend\Utility\BackendUtility::viewOnClick($data['row']['uid'], $GLOBALS['BACK_PATH'], '', '', '', '&L=###LANG_UID###')) . '" title="' . $LANG->getLL('lang_renderl10n_viewPage', TRUE) . '">' . IconUtility::getSpriteIcon('actions-document-view') . '</a>';
+                       $viewPageLink = '<a href="#" onclick="' . htmlspecialchars(
+                                       BackendUtility::viewOnClick($data['row']['uid'], $GLOBALS['BACK_PATH'], '', '', '', '&L=###LANG_UID###')) . '" title="' . $LANG->getLL('lang_renderl10n_viewPage', TRUE) . '">' . IconUtility::getSpriteIcon('actions-document-view') . '</a>';
                        $status = $data['row']['l18n_cfg'] & 1 ? 'c-blocked' : 'c-ok';
                        // Create links:
                        $info = '';
                        $editUid = $data['row']['uid'];
                        $params = '&edit[pages][' . $editUid . ']=edit';
-                       $info .= '<a href="#" onclick="' . htmlspecialchars(\TYPO3\CMS\Backend\Utility\BackendUtility::editOnClick($params, $GLOBALS['BACK_PATH'])) . '" title="' . $LANG->getLL('lang_renderl10n_editDefaultLanguagePage', TRUE) . '">' . IconUtility::getSpriteIcon('actions-document-open') . '</a>';
+                       $info .= '<a href="#" onclick="' . htmlspecialchars(
+                                       BackendUtility::editOnClick($params, $GLOBALS['BACK_PATH'])) . '" title="' . $LANG->getLL('lang_renderl10n_editDefaultLanguagePage', TRUE) . '">' . IconUtility::getSpriteIcon('actions-document-open') . '</a>';
                        $info .= '<a href="#" onclick="' . htmlspecialchars(('top.loadEditId(' . intval($data['row']['uid']) . ',"&SET[language]=0"); return false;')) . '" title="' . $LANG->getLL('lang_renderl10n_editPage', TRUE) . '">' . IconUtility::getSpriteIcon('actions-page-open') . '</a>';
                        $info .= str_replace('###LANG_UID###', '0', $viewPageLink);
                        $info .= '&nbsp;';
@@ -144,7 +147,7 @@ class TranslationStatusController extends \TYPO3\CMS\Backend\Module\AbstractFunc
                        // Put into cell:
                        $tCells[] = '<td class="' . $status . ' c-leftLine">' . $info . '</td>';
                        $tCells[] = '<td class="' . $status . '" title="' . $LANG->getLL('lang_renderl10n_CEcount', TRUE) . '" align="center">' . $this->getContentElementCount($data['row']['uid'], 0) . '</td>';
-                       $modSharedTSconfig = \TYPO3\CMS\Backend\Utility\BackendUtility::getModTSconfig($data['row']['uid'], 'mod.SHARED');
+                       $modSharedTSconfig = BackendUtility::getModTSconfig($data['row']['uid'], 'mod.SHARED');
                        $disableLanguages = isset($modSharedTSconfig['properties']['disableLanguages']) ? \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $modSharedTSconfig['properties']['disableLanguages'], TRUE) : array();
                        // Traverse system languages:
                        foreach ($languages as $langRow) {
@@ -165,7 +168,8 @@ class TranslationStatusController extends \TYPO3\CMS\Backend\Module\AbstractFunc
                                                $info = '';
                                                $editUid = $row['uid'];
                                                $params = '&edit[pages_language_overlay][' . $editUid . ']=edit';
-                                               $info .= '<a href="#" onclick="' . htmlspecialchars(\TYPO3\CMS\Backend\Utility\BackendUtility::editOnClick($params, $GLOBALS['BACK_PATH'])) . '" title="' . $LANG->getLL('lang_renderl10n_editLanguageOverlayRecord', TRUE) . '">' . IconUtility::getSpriteIcon('actions-document-open') . '</a>';
+                                               $info .= '<a href="#" onclick="' . htmlspecialchars(
+                                                               BackendUtility::editOnClick($params, $GLOBALS['BACK_PATH'])) . '" title="' . $LANG->getLL('lang_renderl10n_editLanguageOverlayRecord', TRUE) . '">' . IconUtility::getSpriteIcon('actions-document-open') . '</a>';
                                                $info .= '<a href="#" onclick="' . htmlspecialchars(('top.loadEditId(' . intval($data['row']['uid']) . ',"&SET[language]=' . $langRow['uid'] . '"); return false;')) . '" title="' . $LANG->getLL('lang_renderl10n_editPageLang', TRUE) . '">' . IconUtility::getSpriteIcon('actions-page-open') . '</a>';
                                                $info .= str_replace('###LANG_UID###', $langRow['uid'], $viewPageLink);
                                                $tCells[] = '<td class="' . $status . '">' . $info . '</td>';
@@ -199,7 +203,8 @@ class TranslationStatusController extends \TYPO3\CMS\Backend\Module\AbstractFunc
                $tCells[] = '<td>' . $LANG->getLL('lang_renderl10n_page', TRUE) . ':</td>';
                if (is_array($langRecUids[0])) {
                        $params = '&edit[pages][' . implode(',', $langRecUids[0]) . ']=edit&columnsOnly=title,nav_title,l18n_cfg,hidden';
-                       $editIco = '<a href="#" onclick="' . htmlspecialchars(\TYPO3\CMS\Backend\Utility\BackendUtility::editOnClick($params, $GLOBALS['BACK_PATH'])) . '" title="' . $LANG->getLL('lang_renderl10n_editPageProperties', TRUE) . '">' . IconUtility::getSpriteIcon('actions-document-new') . '</a>';
+                       $editIco = '<a href="#" onclick="' . htmlspecialchars(
+                                       BackendUtility::editOnClick($params, $GLOBALS['BACK_PATH'])) . '" title="' . $LANG->getLL('lang_renderl10n_editPageProperties', TRUE) . '">' . IconUtility::getSpriteIcon('actions-document-new') . '</a>';
                } else {
                        $editIco = '';
                }
@@ -213,7 +218,8 @@ class TranslationStatusController extends \TYPO3\CMS\Backend\Module\AbstractFunc
                                        $params = '&edit[pages_language_overlay][' .
                                                implode(',', $langRecUids[$langRow['uid']]) .
                                                ']=edit&columnsOnly=title,nav_title,hidden';
-                                       $tCells[] = '<td><a href="#" onclick="' . htmlspecialchars(\TYPO3\CMS\Backend\Utility\BackendUtility::editOnClick($params, $GLOBALS['BACK_PATH'])) . '" title="' . $LANG->getLL('lang_renderl10n_editLangOverlays', TRUE) . '">' . IconUtility::getSpriteIcon('actions-document-open') . '</a></td>';
+                                       $tCells[] = '<td><a href="#" onclick="' . htmlspecialchars(
+                                                       BackendUtility::editOnClick($params, $GLOBALS['BACK_PATH'])) . '" title="' . $LANG->getLL('lang_renderl10n_editLangOverlays', TRUE) . '">' . IconUtility::getSpriteIcon('actions-document-open') . '</a></td>';
                                } else {
                                        $tCells[] = '<td>&nbsp;</td>';
                                }
@@ -222,7 +228,8 @@ class TranslationStatusController extends \TYPO3\CMS\Backend\Module\AbstractFunc
                                        $newOL_js[$langRow['uid']] .
                                        '+\'&columnsOnly=title,hidden,sys_language_uid&defVals[pages_language_overlay][sys_language_uid]=' .
                                        $langRow['uid'];
-                               $tCells[] = '<td><a href="#" onclick="' . htmlspecialchars(\TYPO3\CMS\Backend\Utility\BackendUtility::editOnClick($params, $GLOBALS['BACK_PATH'])) . '" title="' . $LANG->getLL('lang_getlangsta_createNewTranslationHeaders', TRUE) . '">' . IconUtility::getSpriteIcon('actions-document-new') . '</a></td>';
+                               $tCells[] = '<td><a href="#" onclick="' . htmlspecialchars(
+                                               BackendUtility::editOnClick($params, $GLOBALS['BACK_PATH'])) . '" title="' . $LANG->getLL('lang_getlangsta_createNewTranslationHeaders', TRUE) . '">' . IconUtility::getSpriteIcon('actions-document-new') . '</a></td>';
                        }
                }
                $output = '
@@ -247,7 +254,7 @@ class TranslationStatusController extends \TYPO3\CMS\Backend\Module\AbstractFunc
                if (!$GLOBALS['BE_USER']->user['admin'] && strlen($GLOBALS['BE_USER']->groupData['allowed_languages'])) {
                        $allowed_languages = array_flip(explode(',', $GLOBALS['BE_USER']->groupData['allowed_languages']));
                }
-               $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'sys_language', '1=1' . \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause('sys_language'));
+               $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'sys_language', '1=1' . BackendUtility::deleteClause('sys_language'));
                $outputArray = array();
                while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
                        if (is_array($allowed_languages) && count($allowed_languages)) {
@@ -275,11 +282,11 @@ class TranslationStatusController extends \TYPO3\CMS\Backend\Module\AbstractFunc
                        'pages_language_overlay',
                        'pid=' . intval($pageId) .
                                ' AND sys_language_uid=' . intval($langId) .
-                               \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause('pages_language_overlay') .
-                               \TYPO3\CMS\Backend\Utility\BackendUtility::versioningPlaceholderClause('pages_language_overlay')
+                               BackendUtility::deleteClause('pages_language_overlay') .
+                               BackendUtility::versioningPlaceholderClause('pages_language_overlay')
                );
                $row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res);
-               \TYPO3\CMS\Backend\Utility\BackendUtility::workspaceOL('pages_language_overlay', $row);
+               BackendUtility::workspaceOL('pages_language_overlay', $row);
                if (is_array($row)) {
                        $row['_COUNT'] = $GLOBALS['TYPO3_DB']->sql_num_rows($res);
                        $row['_HIDDEN'] = $row['hidden'] || intval($row['endtime']) > 0 && intval($row['endtime']) < $GLOBALS['EXEC_TIME'] || $GLOBALS['EXEC_TIME'] < intval($row['starttime']);
@@ -296,7 +303,7 @@ class TranslationStatusController extends \TYPO3\CMS\Backend\Module\AbstractFunc
         * @todo Define visibility
         */
        public function getContentElementCount($pageId, $sysLang) {
-               $count = $GLOBALS['TYPO3_DB']->exec_SELECTcountRows('uid', 'tt_content', 'pid=' . intval($pageId) . ' AND sys_language_uid=' . intval($sysLang) . \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause('tt_content') . \TYPO3\CMS\Backend\Utility\BackendUtility::versioningPlaceholderClause('tt_content'));
+               $count = $GLOBALS['TYPO3_DB']->exec_SELECTcountRows('uid', 'tt_content', 'pid=' . intval($pageId) . ' AND sys_language_uid=' . intval($sysLang) . BackendUtility::deleteClause('tt_content') . BackendUtility::versioningPlaceholderClause('tt_content'));
                return $count ? $count : '-';
        }
 
index 1ad3e3b..a737b88 100644 (file)
@@ -26,6 +26,9 @@ namespace TYPO3\CMS\Frontend\Hooks;
  *
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
+
+use TYPO3\CMS\Backend\Utility\BackendUtility;
+
 /**
  * Class that hooks into TCEmain and listens for updates to pages to update the
  * treelist cache
@@ -86,7 +89,7 @@ class TreelistCacheUpdateHooks {
                                $affectedPageUid = $recordId;
                                // When updating a page the pid is not directly available so we
                                // need to retrieve it ourselves.
-                               $fullPageRecord = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecord($table, $recordId);
+                               $fullPageRecord = BackendUtility::getRecord($table, $recordId);
                                $affectedPagePid = $fullPageRecord['pid'];
                        }
                        $clearCacheActions = $this->determineClearCacheActions($status, $updatedFields);
@@ -107,7 +110,7 @@ class TreelistCacheUpdateHooks {
         */
        public function processCmdmap_postProcess($command, $table, $recordId, $commandValue, \TYPO3\CMS\Core\DataHandling\DataHandler $tceMain) {
                if ($table == 'pages' && $command == 'delete') {
-                       $deletedRecord = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecord($table, $recordId, '*', '', FALSE);
+                       $deletedRecord = BackendUtility::getRecord($table, $recordId, '*', '', FALSE);
                        $affectedPageUid = $deletedRecord['uid'];
                        $affectedPagePid = $deletedRecord['pid'];
                        // Faking the updated fields
@@ -228,7 +231,7 @@ class TreelistCacheUpdateHooks {
         * @return void
         */
        protected function clearCacheForAllParents($affectedParentPage) {
-               $rootline = \TYPO3\CMS\Backend\Utility\BackendUtility::BEgetRootLine($affectedParentPage);
+               $rootline = BackendUtility::BEgetRootLine($affectedParentPage);
                $rootlineIds = array();
                foreach ($rootline as $page) {
                        if ($page['uid'] != 0) {
index 4adac5e..abf29d5 100644 (file)
@@ -28,6 +28,7 @@ namespace TYPO3\CMS\Frontend\View;
  *  This copyright notice MUST APPEAR in all copies of the scri.pt!
  ***************************************************************/
 
+use TYPO3\CMS\Backend\Utility\BackendUtility;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 
 /**
@@ -372,7 +373,7 @@ class AdminPanelView {
                        $this->extJSCODE .= 'TSFEtypo3FormFieldSet("TSFE_ADMIN_PANEL[preview_simulateDate]", "datetime", "", 0, 0);';
                        // Simulate fe_user:
                        $options = '<option value="0">&nbsp;</option>';
-                       $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('fe_groups.uid, fe_groups.title', 'fe_groups,pages', 'pages.uid=fe_groups.pid AND pages.deleted=0 ' . \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause('fe_groups') . ' AND ' . $GLOBALS['BE_USER']->getPagePermsClause(1));
+                       $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('fe_groups.uid, fe_groups.title', 'fe_groups,pages', 'pages.uid=fe_groups.pid AND pages.deleted=0 ' . BackendUtility::deleteClause('fe_groups') . ' AND ' . $GLOBALS['BE_USER']->getPagePermsClause(1));
                        while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
                                $options .= '<option value="' . $row['uid'] . '"' . ($GLOBALS['BE_USER']->uc['TSFE_adminConfig']['preview_simulateUserGroup'] == $row['uid'] ? ' selected="selected"' : '') . '>' . htmlspecialchars(('[' . $row['uid'] . '] ' . $row['title'])) . '</option>';
                        }
@@ -425,7 +426,7 @@ class AdminPanelView {
                if ($GLOBALS['BE_USER']->uc['TSFE_adminConfig']['display_edit']) {
                        // 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';
                        $this->extNeedUpdate = TRUE;
                        $out .= $this->extGetItem('edit_displayFieldIcons', '', '<input type="hidden" name="TSFE_ADMIN_PANEL[edit_displayFieldIcons]" value="0" /><input type="checkbox" id="edit_displayFieldIcons" name="TSFE_ADMIN_PANEL[edit_displayFieldIcons]" value="1"' . ($GLOBALS['BE_USER']->uc['TSFE_adminConfig']['edit_displayFieldIcons'] ? ' checked="checked"' : '') . ' />');
                        $out .= $this->extGetItem('edit_displayIcons', '', '<input type="hidden" name="TSFE_ADMIN_PANEL[edit_displayIcons]" value="0" /><input type="checkbox" id="edit_displayIcons" name="TSFE_ADMIN_PANEL[edit_displayIcons]" value="1"' . ($GLOBALS['BE_USER']->uc['TSFE_adminConfig']['edit_displayIcons'] ? ' checked="checked"' : '') . ' />');
@@ -442,7 +443,7 @@ class AdminPanelView {
                                                        parent.opener.top.goToModule("' . $pageModule . '");
                                                        parent.opener.top.focus();
                                                } else {
-                                                       vHWin=window.open(\'' . TYPO3_mainDir . \TYPO3\CMS\Backend\Utility\BackendUtility::getBackendScript() . '\',\'' . md5(('Typo3Backend-' . $GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename'])) . '\',\'status=1,menubar=1,scrollbars=1,resizable=1\');
+                                                       vHWin=window.open(\'' . TYPO3_mainDir . BackendUtility::getBackendScript() . '\',\'' . md5(('Typo3Backend-' . $GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename'])) . '\',\'status=1,menubar=1,scrollbars=1,resizable=1\');
                                                        vHWin.focus();
                                                }
                                                return false;
@@ -596,7 +597,7 @@ class AdminPanelView {
         */
        public function ext_makeToolBar() {
                //  If mod.web_list.newContentWiz.overrideWithExtension is set, use that extension's create new content wizard instead:
-               $tsConfig = \TYPO3\CMS\Backend\Utility\BackendUtility::getModTSconfig($this->pageinfo['uid'], 'mod.web_list');
+               $tsConfig = BackendUtility::getModTSconfig($this->pageinfo['uid'], 'mod.web_list');
                $tsConfig = $tsConfig['properties']['newContentWiz.']['overrideWithExtension'];
                $newContentWizScriptPath = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded($tsConfig) ? \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath($tsConfig) . 'mod1/db_new_content_el.php' : TYPO3_mainDir . 'sysext/cms/layout/db_new_content_el.php';
                $perms = $GLOBALS['BE_USER']->calcPerms($GLOBALS['TSFE']->page);
@@ -642,7 +643,7 @@ class AdminPanelView {
                        $urlParams = array();
                        $urlParams['id'] = $id;
                        $urlParams['returnUrl'] = GeneralUtility::getIndpEnv('REQUEST_URI');
-                       $toolBar .= '<a href="' . htmlspecialchars((TYPO3_mainDir . \TYPO3\CMS\Backend\Utility\BackendUtility::getModuleUrl('web_list', $urlParams))) . '">' . '<img ' . \TYPO3\CMS\Backend\Utility\IconUtility::skinImg(TYPO3_mainDir, 'gfx/list.gif', 'width="11" height="11"') . ' hspace="2" border="0" align="top" title="' . $this->extGetLL('edit_db_list') . '" alt="" /></a>';
+                       $toolBar .= '<a href="' . htmlspecialchars((TYPO3_mainDir . BackendUtility::getModuleUrl('web_list', $urlParams))) . '">' . '<img ' . \TYPO3\CMS\Backend\Utility\IconUtility::skinImg(TYPO3_mainDir, 'gfx/list.gif', 'width="11" height="11"') . ' hspace="2" border="0" align="top" title="' . $this->extGetLL('edit_db_list') . '" alt="" /></a>';
                }
                return $toolBar;
        }
index 3e7ceda..1f4e9c0 100644 (file)
@@ -27,6 +27,8 @@ namespace TYPO3\CMS\Func\Controller;
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
 
+use TYPO3\CMS\Backend\Utility\BackendUtility;
+
 /**
  * Script Class for the Web > Functions module
  * This class creates the framework to which other extensions can connect their sub-modules
@@ -70,7 +72,7 @@ class PageFunctionsController extends \TYPO3\CMS\Backend\Module\BaseScriptClass
        public function main() {
                // 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->id, $this->perms_clause);
+               $this->pageinfo = BackendUtility::readPageAccess($this->id, $this->perms_clause);
                $access = is_array($this->pageinfo);
                // Template markers
                $markers = array(
@@ -105,7 +107,7 @@ class PageFunctionsController extends \TYPO3\CMS\Backend\Module\BaseScriptClass
                        // Setting up the buttons and markers for docheader
                        $docHeaderButtons = $this->getButtons();
                        $markers['CSH'] = $docHeaderButtons['csh'];
-                       $markers['FUNC_MENU'] = \TYPO3\CMS\Backend\Utility\BackendUtility::getFuncMenu(
+                       $markers['FUNC_MENU'] = BackendUtility::getFuncMenu(
                                $this->id,
                                'SET[function]',
                                $this->MOD_SETTINGS['function'],
@@ -153,13 +155,13 @@ class PageFunctionsController extends \TYPO3\CMS\Backend\Module\BaseScriptClass
                        'shortcut' => ''
                );
                // CSH
-               $buttons['csh'] = \TYPO3\CMS\Backend\Utility\BackendUtility::cshItem('_MOD_web_func', '', $GLOBALS['BACK_PATH'], '', TRUE);
+               $buttons['csh'] = BackendUtility::cshItem('_MOD_web_func', '', $GLOBALS['BACK_PATH'], '', TRUE);
                if ($this->id && is_array($this->pageinfo)) {
                        // View page
-                       $buttons['view'] = '<a href="#"
-                                       onclick="' . htmlspecialchars(\TYPO3\CMS\Backend\Utility\BackendUtility::viewOnClick($this->pageinfo['uid'], $GLOBALS['BACK_PATH'], \TYPO3\CMS\Backend\Utility\BackendUtility::BEgetRootLine($this->pageinfo['uid']))) . '"
-                                       title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:labels.showPage', TRUE) . '
-                               ">' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-document-view') . '</a>';
+                       $buttons['view'] = '<a href="#" '
+                               . 'onclick="' . htmlspecialchars(BackendUtility::viewOnClick($this->pageinfo['uid'], $GLOBALS['BACK_PATH'], BackendUtility::BEgetRootLine($this->pageinfo['uid']))) . '" '
+                               . 'title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:labels.showPage', TRUE) . '">'
+                               . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-document-view') . '</a>';
                        // Shortcut
                        if ($GLOBALS['BE_USER']->mayMakeShortcut()) {
                                $buttons['shortcut'] = $this->doc->makeShortcutIcon('id, edit_record, pointer, new_unique_uid, search_field, search_levels, showLimit', implode(',', array_keys($this->MOD_MENU)), $this->MCONF['name']);
index e1020c7..6b74ba5 100644 (file)
@@ -24,6 +24,7 @@ namespace TYPO3\CMS\IndexedSearch\Controller;
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
 
+use TYPO3\CMS\Backend\Utility\BackendUtility;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 
 /**
@@ -163,8 +164,8 @@ class IndexedPagesController extends \TYPO3\CMS\Backend\Module\AbstractFunctionM
                } else {
                        // Detail listings:
                        // Depth function menu:
-                       $h_func = \TYPO3\CMS\Backend\Utility\BackendUtility::getFuncMenu($this->pObj->id, 'SET[type]', $this->pObj->MOD_SETTINGS['type'], $this->pObj->MOD_MENU['type'], 'index.php');
-                       $h_func .= \TYPO3\CMS\Backend\Utility\BackendUtility::getFuncMenu($this->pObj->id, 'SET[depth]', $this->pObj->MOD_SETTINGS['depth'], $this->pObj->MOD_MENU['depth'], 'index.php');
+                       $h_func = BackendUtility::getFuncMenu($this->pObj->id, 'SET[type]', $this->pObj->MOD_SETTINGS['type'], $this->pObj->MOD_MENU['type'], 'index.php');
+                       $h_func .= BackendUtility::getFuncMenu($this->pObj->id, 'SET[depth]', $this->pObj->MOD_SETTINGS['depth'], $this->pObj->MOD_MENU['depth'], 'index.php');
                        // Show title / function menu:
                        $theOutput .= $this->pObj->doc->header($LANG->getLL('title'));
                        $theOutput .= $this->pObj->doc->section('', $h_func, 0, 1);
@@ -201,7 +202,8 @@ class IndexedPagesController extends \TYPO3\CMS\Backend\Module\AbstractFunctionM
                // Traverse page tree:
                $code = '';
                foreach ($tree->tree as $data) {
-                       $code .= $this->indexed_info($data['row'], $data['HTML'] . $this->showPageDetails(\TYPO3\CMS\Backend\Utility\BackendUtility::getRecordTitlePrep($data['row']['title']), $data['row']['uid']));
+                       $code .= $this->indexed_info($data['row'], $data['HTML'] . $this->showPageDetails(
+                                       BackendUtility::getRecordTitlePrep($data['row']['title']), $data['row']['uid']));
                }
                if ($code) {
                        $code = '<br /><br />
@@ -395,7 +397,7 @@ class IndexedPagesController extends \TYPO3\CMS\Backend\Module\AbstractFunctionM
                                $lines[] = '<td>' . $cmdLinks . '</td>';
                                $lines[] = '<td style="white-space: normal;">' . htmlspecialchars($row['item_description']) . '...</td>';
                                $lines[] = '<td>' . GeneralUtility::formatSize($row['item_size']) . '</td>';
-                               $lines[] = '<td>' . \TYPO3\CMS\Backend\Utility\BackendUtility::dateTimeAge($row['tstamp']) . '</td>';
+                               $lines[] = '<td>' . BackendUtility::dateTimeAge($row['tstamp']) . '</td>';
                }
                return $lines;
        }
@@ -502,7 +504,7 @@ class IndexedPagesController extends \TYPO3\CMS\Backend\Module\AbstractFunctionM
                        $content .= '<h3>Word statistics</h3>';
                        // Finding all words for this phash:
                        $ftrows = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('index_words.*, index_rel.*', 'index_rel, index_words', 'index_rel.phash = ' . intval($phash) . ' AND index_words.wid = index_rel.wid', '', 'index_words.baseword', '');
-                       $pageRec = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecord('pages', $phashRecord['data_page_id']);
+                       $pageRec = BackendUtility::getRecord('pages', $phashRecord['data_page_id']);
                        $showStopWordCheckBox = $GLOBALS['BE_USER']->isAdmin();
                        $content .= $this->listWords($ftrows, 'All words found on page (' . count($ftrows) . '):', $showStopWordCheckBox, $pageRec);
                        if ($this->enableMetaphoneSearch) {
@@ -1048,7 +1050,7 @@ class IndexedPagesController extends \TYPO3\CMS\Backend\Module\AbstractFunctionM
         */
        public function processPageKeywords($pageKeywords, $pageUid) {
                // Get pages current keywords
-               $pageRec = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecord('pages', $pageUid);
+               $pageRec = BackendUtility::getRecord('pages', $pageUid);
                $keywords = array_flip(GeneralUtility::trimExplode(',', $pageRec['keywords'], TRUE));
                // Merge keywords:
                foreach ($pageKeywords as $key => $v) {
index b9fd7ee..15a74c9 100644 (file)
@@ -27,6 +27,8 @@ namespace TYPO3\CMS\IndexedSearch\Controller;
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
 
+use TYPO3\CMS\Backend\Utility\BackendUtility;
+
 /**
  * Backend module providing boring statistics of the index-tables.
  *
@@ -114,7 +116,7 @@ class ModuleController {
                        )
                );
                // cleanse settings
-               $this->MOD_SETTINGS = \TYPO3\CMS\Backend\Utility\BackendUtility::getModuleData($this->MOD_MENU, \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('SET'), $this->MCONF['name'], 'ses');
+               $this->MOD_SETTINGS = BackendUtility::getModuleData($this->MOD_MENU, \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('SET'), $this->MCONF['name'], 'ses');
        }
 
        /**
@@ -145,7 +147,7 @@ class ModuleController {
                $docHeaderButtons = $this->getButtons();
                $markers = array(
                        'CSH' => $docHeaderButtons['csh'],
-                       'FUNC_MENU' => \TYPO3\CMS\Backend\Utility\BackendUtility::getFuncMenu(0, 'SET[function]', $this->MOD_SETTINGS['function'], $this->MOD_MENU['function']),
+                       'FUNC_MENU' => BackendUtility::getFuncMenu(0, 'SET[function]', $this->MOD_SETTINGS['function'], $this->MOD_MENU['function']),
                        'CONTENT' => $this->content
                );
                $this->content = $this->doc->startPage('Indexing Engine Statistics');
@@ -278,9 +280,9 @@ class ModuleController {
                                htmlentities(\TYPO3\CMS\Core\Utility\GeneralUtility::fixed_lgd_cs($row['item_title'], 30)),
                                \TYPO3\CMS\Core\Utility\GeneralUtility::formatSize($row['item_size']),
                                $this->getNumberOfWords($row['phash']),
-                               \TYPO3\CMS\Backend\Utility\BackendUtility::datetime($row['item_mtime']),
-                               \TYPO3\CMS\Backend\Utility\BackendUtility::datetime($row['crdate']),
-                               $row['tstamp'] != $row['crdate'] ? \TYPO3\CMS\Backend\Utility\BackendUtility::datetime($row['tstamp']) : '',
+                               BackendUtility::datetime($row['item_mtime']),
+                               BackendUtility::datetime($row['crdate']),
+                               $row['tstamp'] != $row['crdate'] ? BackendUtility::datetime($row['tstamp']) : '',
                                $row['parsetime'],
                                $this->getNumberOfSections($row['phash']) . '/' . $grListRec[0]['pcount'] . '/' . $this->getNumberOfFulltext($row['phash']),
                                $row['pcount'] . '/' . $this->formatFeGroup($grListRec),
@@ -297,9 +299,9 @@ class ModuleController {
                                                '',
                                                \TYPO3\CMS\Core\Utility\GeneralUtility::formatSize($row2['item_size']),
                                                $this->getNumberOfWords($row2['phash']),
-                                               \TYPO3\CMS\Backend\Utility\BackendUtility::datetime($row2['item_mtime']),
-                                               \TYPO3\CMS\Backend\Utility\BackendUtility::datetime($row2['crdate']),
-                                               $row2['tstamp'] != $row2['crdate'] ? \TYPO3\CMS\Backend\Utility\BackendUtility::datetime($row2['tstamp']) : '',
+                                               BackendUtility::datetime($row2['item_mtime']),
+                                               BackendUtility::datetime($row2['crdate']),
+                                               $row2['tstamp'] != $row2['crdate'] ? BackendUtility::datetime($row2['tstamp']) : '',
                                                $row2['parsetime'],
                                                $this->getNumberOfSections($row2['phash']) . '/' . $grListRec[0]['pcount'] . '/' . $this->getNumberOfFulltext($row2['phash']),
                                                '-/' . $this->formatFeGroup($grListRec),
@@ -343,9 +345,9 @@ class ModuleController {
                                htmlentities(\TYPO3\CMS\Core\Utility\GeneralUtility::fixed_lgd_cs($row['item_title'], 30)),
                                \TYPO3\CMS\Core\Utility\GeneralUtility::formatSize($row['item_size']),
                                $this->getNumberOfWords($row['phash']),
-                               \TYPO3\CMS\Backend\Utility\BackendUtility::datetime($row['item_mtime']),
-                               \TYPO3\CMS\Backend\Utility\BackendUtility::datetime($row['crdate']),
-                               $row['tstamp'] != $row['crdate'] ? \TYPO3\CMS\Backend\Utility\BackendUtility::datetime($row['tstamp']) : '',
+                               BackendUtility::datetime($row['item_mtime']),
+                               BackendUtility::datetime($row['crdate']),
+                               $row['tstamp'] != $row['crdate'] ? BackendUtility::datetime($row['tstamp']) : '',
                                $row['parsetime'],
                                $this->getNumberOfSections($row['phash']) . '/' . $grListRec[0]['pcount'] . '/' . $this->getNumberOfFulltext($row['phash']),
                                $row['pcount'],
@@ -363,8 +365,8 @@ class ModuleController {
                                                '',
                                                $this->getNumberOfWords($row2['phash']),
                                                '',
-                                               \TYPO3\CMS\Backend\Utility\BackendUtility::datetime($row2['crdate']),
-                                               $row2['tstamp'] != $row2['crdate'] ? \TYPO3\CMS\Backend\Utility\BackendUtility::datetime($row2['tstamp']) : '',
+                                               BackendUtility::datetime($row2['crdate']),
+                                               $row2['tstamp'] != $row2['crdate'] ? BackendUtility::datetime($row2['tstamp']) : '',
                                                $row2['parsetime'],
                                                $this->getNumberOfSections($row2['phash']) . '/' . $grListRec[0]['pcount'] . '/' . $this->getNumberOfFulltext($row2['phash']),
                                                '',
index 16e827b..1523a57 100644 (file)
@@ -27,6 +27,7 @@ namespace TYPO3\CMS\IndexedSearch\Hook;
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
 
+use TYPO3\CMS\Backend\Utility\BackendUtility;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 
 /**
@@ -72,7 +73,7 @@ class CrawlerHook {
                                AND (starttime=0 OR starttime<=' . $GLOBALS['EXEC_TIME'] . ')
                                AND timer_next_indexing<' . $GLOBALS['EXEC_TIME'] . '
                                AND set_id=0
-                               ' . \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause('index_config'));
+                               ' . BackendUtility::deleteClause('index_config'));
                // For each configuration, check if it should be executed and if so, start:
                foreach ($indexingConfigurations as $cfgRec) {
                        // Generate a unique set-ID:
@@ -249,7 +250,7 @@ class CrawlerHook {
                        $rl = $this->getUidRootLineForClosestTemplate($cfgRec['pid']);
                        // Select
                        $recs = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('*', $cfgRec['table2index'], 'pid = ' . intval($pid) . '
-                                                       AND uid > ' . intval($session_data['uid']) . \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause($cfgRec['table2index']) . \TYPO3\CMS\Backend\Utility\BackendUtility::BEenableFields($cfgRec['table2index']), '', 'uid', $numberOfRecords);
+                                                       AND uid > ' . intval($session_data['uid']) . BackendUtility::deleteClause($cfgRec['table2index']) . BackendUtility::BEenableFields($cfgRec['table2index']), '', 'uid', $numberOfRecords);
                        // Traverse:
                        if (count($recs)) {
                                foreach ($recs as $r) {
@@ -388,7 +389,7 @@ class CrawlerHook {
                // Base page uid:
                $pageUid = intval($params['url']);
                // Get array of URLs from page:
-               $pageRow = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecord('pages', $pageUid);
+               $pageRow = BackendUtility::getRecord('pages', $pageUid);
                $res = $pObj->getUrlsForPageRow($pageRow);
                $duplicateTrack = array();
                // Registry for duplicates
@@ -403,7 +404,7 @@ class CrawlerHook {
                // Add subpages to log now:
                if ($params['depth'] < $cfgRec['depth']) {
                        // Subpages selected
-                       $recs = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('uid,title', 'pages', 'pid = ' . intval($pageUid) . \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause('pages'));
+                       $recs = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('uid,title', 'pages', 'pid = ' . intval($pageUid) . BackendUtility::deleteClause('pages'));
                        // Traverse subpages and add to queue:
                        if (count($recs)) {
                                foreach ($recs as $r) {
@@ -431,7 +432,7 @@ class CrawlerHook {
         */
        public function cleanUpOldRunningConfigurations() {
                // Lookup running index configurations:
-               $runningIndexingConfigurations = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('uid,set_id', 'index_config', 'set_id<>0' . \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause('index_config'));
+               $runningIndexingConfigurations = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('uid,set_id', 'index_config', 'set_id<>0' . BackendUtility::deleteClause('index_config'));
                // For each running configuration, look up how many log entries there are which are scheduled for execution and if none, clear the "set_id" (means; Processing was DONE)
                foreach ($runningIndexingConfigurations as $cfgRec) {
                        // Look for ended processes:
@@ -739,7 +740,7 @@ class CrawlerHook {
                                $this->deleteFromIndex($id);
                        }
                        // Get full record and if exists, search for indexing configurations:
-                       $currentRecord = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecord($table, $id);
+                       $currentRecord = BackendUtility::getRecord($table, $id);
                        if (is_array($currentRecord)) {
                                // Select all (not running) indexing configurations of type "record" (1) and which points to this table and is located on the same page as the record or pointing to the right source PID
                                $indexingConfigurations = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('*', 'index_config', 'hidden=0
@@ -752,7 +753,7 @@ class CrawlerHook {
                                                                OR (alternative_source_pid=' . intval($currentRecord['pid']) . ')
                                                        )
                                                AND records_indexonchange=1
-                                               ' . \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause('index_config'));
+                                               ' . BackendUtility::deleteClause('index_config'));
                                foreach ($indexingConfigurations as $cfgRec) {
                                        $this->indexSingleRecord($currentRecord, $cfgRec);
                                }
index 5e1feed..c72d5f8 100644 (file)
@@ -27,6 +27,8 @@ namespace TYPO3\CMS\Info\Controller;
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
 
+use TYPO3\CMS\Backend\Utility\BackendUtility;
+
 /**
  * Script Class for the Web > Info module
  * This class creates the framework to which other extensions can connect their sub-modules
@@ -74,7 +76,7 @@ class InfoModuleController extends \TYPO3\CMS\Backend\Module\BaseScriptClass {
        public function main() {
                // 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->id, $this->perms_clause);
+               $this->pageinfo = BackendUtility::readPageAccess($this->id, $this->perms_clause);
                $access = is_array($this->pageinfo);
                if ($this->id && $access || $GLOBALS['BE_USER']->user['admin'] && !$this->id) {
                        $this->CALC_PERMS = $GLOBALS['BE_USER']->calcPerms($this->pageinfo);
@@ -117,7 +119,7 @@ class InfoModuleController extends \TYPO3\CMS\Backend\Module\BaseScriptClass {
                        $docHeaderButtons = $this->getButtons();
                        $markers = array(
                                'CSH' => $docHeaderButtons['csh'],
-                               'FUNC_MENU' => \TYPO3\CMS\Backend\Utility\BackendUtility::getFuncMenu(
+                               'FUNC_MENU' => BackendUtility::getFuncMenu(
                                        $this->id,
                                        'SET[function]',
                                        $this->MOD_SETTINGS['function'],
@@ -161,9 +163,15 @@ class InfoModuleController extends \TYPO3\CMS\Backend\Module\BaseScriptClass {
                        'shortcut' => ''
                );
                // CSH
-               $buttons['csh'] = \TYPO3\CMS\Backend\Utility\BackendUtility::cshItem('_MOD_web_info', '', $GLOBALS['BACK_PATH'], '', TRUE);
+               $buttons['csh'] = BackendUtility::cshItem('_MOD_web_info', '', $GLOBALS['BACK_PATH'], '', TRUE);
                // View page
-               $buttons['view'] = '<a href="#" onclick="' . htmlspecialchars(\TYPO3\CMS\Backend\Utility\BackendUtility::viewOnClick($this->pageinfo['uid'], $GLOBALS['BACK_PATH'], \TYPO3\CMS\Backend\Utility\BackendUtility::BEgetRootLine($this->pageinfo['uid']))) . '" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:labels.showPage', TRUE) . '">' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-document-view') . '</a>';
+               $buttons['view'] = '<a href="#" '
+                       . 'onclick="' . htmlspecialchars(
+                               BackendUtility::viewOnClick($this->pageinfo['uid'], $GLOBALS['BACK_PATH'], BackendUtility::BEgetRootLine($this->pageinfo['uid']))
+                       ) . '" '
+                       . 'title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:labels.showPage', TRUE) . '">'
+                       . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-document-view')
+                       . '</a>';
                // Shortcut
                if ($GLOBALS['BE_USER']->mayMakeShortcut()) {
                        $buttons['shortcut'] = $this->doc->makeShortcutIcon('id, edit_record, pointer, new_unique_uid, search_field, search_levels, showLimit', implode(',', array_keys($this->MOD_MENU)), $this->MCONF['name']);
index 20616a7..a1e4709 100644 (file)
@@ -24,6 +24,8 @@ namespace TYPO3\CMS\Install\Updates;
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
 
+use TYPO3\CMS\Backend\Utility\BackendUtility;
+
 /**
  * Upgrade wizard which checks all existing filemounts
  * and upgrades this them in case we have:
@@ -87,7 +89,7 @@ class FilemountUpdateWizard extends AbstractUpdate {
                $filemountCount = $this->db->exec_SELECTcountRows(
                        '*',
                        'sys_filemounts',
-                       'base IN (0,1) ' . \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause('sys_filemounts')
+                       'base IN (0,1) ' . BackendUtility::deleteClause('sys_filemounts')
                );
                return $filemountCount > 0 && !$this->isWizardDone();
        }
@@ -122,7 +124,7 @@ class FilemountUpdateWizard extends AbstractUpdate {
                $absoluteFilemounts = $this->db->exec_SELECTgetRows(
                        '*',
                        'sys_filemounts',
-                       'base = 0' . \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause('sys_filemounts')
+                       'base = 0' . BackendUtility::deleteClause('sys_filemounts')
                );
                foreach ($absoluteFilemounts as $filemount) {
                        if (stristr($filemount['path'], $fileadminDir)) {
@@ -157,7 +159,7 @@ class FilemountUpdateWizard extends AbstractUpdate {
                $relativeFilemounts = $this->db->exec_SELECTgetRows(
                        '*',
                        'sys_filemounts',
-                       'base = 1' . \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause('sys_filemounts')
+                       'base = 1' . BackendUtility::deleteClause('sys_filemounts')
                );
                foreach ($relativeFilemounts as $filemount) {
                        $this->db->exec_UPDATEquery(
index 8ee6e95..ef12746 100644 (file)
@@ -24,6 +24,8 @@ namespace TYPO3\CMS\Linkvalidator;
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
 
+use TYPO3\CMS\Backend\Utility\BackendUtility;
+
 /**
  * This class provides Processing plugin implementation
  *
@@ -146,7 +148,7 @@ class LinkAnalyzer {
                                        $where = 'deleted = 0 AND pid IN (' . $this->pidList . ')';
                                }
                                if (!$considerHidden) {
-                                       $where .= \TYPO3\CMS\Backend\Utility\BackendUtility::BEenableFields($table);
+                                       $where .= BackendUtility::BEenableFields($table);
                                }
                                // If table is not configured, assume the extension is not installed
                                // and therefore no need to check it
@@ -236,11 +238,11 @@ class LinkAnalyzer {
                        // Check if a TCA configured field has soft references defined (see TYPO3 Core API document)
                        if ($conf['softref'] && strlen($valueField)) {
                                // Explode the list of soft references/parameters
-                               $softRefs = \TYPO3\CMS\Backend\Utility\BackendUtility::explodeSoftRefParserList($conf['softref']);
+                               $softRefs = BackendUtility::explodeSoftRefParserList($conf['softref']);
                                // Traverse soft references
                                foreach ($softRefs as $spKey => $spParams) {
                                        /** @var $softRefObj \TYPO3\CMS\Core\Database\SoftReferenceIndex */
-                                       $softRefObj = \TYPO3\CMS\Backend\Utility\BackendUtility::softRefParserObj($spKey);
+                                       $softRefObj = BackendUtility::softRefParserObj($spKey);
                                        // If there is an object returned...
                                        if (is_object($softRefObj)) {
                                                // Do processing
index db6806a..c8edefd 100644 (file)
@@ -25,6 +25,7 @@ namespace TYPO3\CMS\Linkvalidator\Report;
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
 
+use TYPO3\CMS\Backend\Utility\BackendUtility;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 
 /**
@@ -156,7 +157,7 @@ class LinkValidatorReport extends \TYPO3\CMS\Backend\Module\AbstractFunctionModu
                $GLOBALS['LANG']->includeLLFile('EXT:linkvalidator/Resources/Private/Language/Module/locallang.xlf');
                $this->searchLevel = GeneralUtility::_GP('search_levels');
                if (isset($this->pObj->id)) {
-                       $this->modTS = \TYPO3\CMS\Backend\Utility\BackendUtility::getModTSconfig($this->pObj->id, 'mod.linkvalidator');
+                       $this->modTS = BackendUtility::getModTSconfig($this->pObj->id, 'mod.linkvalidator');
                        $this->modTS = $this->modTS['properties'];
                }
                $update = GeneralUtility::_GP('updateLinkList');
@@ -294,7 +295,7 @@ class LinkValidatorReport extends \TYPO3\CMS\Backend\Module\AbstractFunctionModu
                $this->doc->backPath = $GLOBALS['BACK_PATH'];
                $this->doc->setModuleTemplate(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('linkvalidator') . 'Resources/Private/Templates/mod_template.html');
                $this->relativePath = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('linkvalidator');
-               $this->pageRecord = \TYPO3\CMS\Backend\Utility\BackendUtility::readPageAccess($this->pObj->id, $GLOBALS['BE_USER']->getPagePermsClause(1));
+               $this->pageRecord = BackendUtility::readPageAccess($this->pObj->id, $GLOBALS['BE_USER']->getPagePermsClause(1));
                $this->isAccessibleForCurrentUser = FALSE;
                if ($this->pObj->id && is_array($this->pageRecord) || !$this->pObj->id && $this->isCurrentUserAdmin()) {
                        $this->isAccessibleForCurrentUser = TRUE;
@@ -490,7 +491,7 @@ class LinkValidatorReport extends \TYPO3\CMS\Backend\Module\AbstractFunctionModu
                $makerTableHead['tablehead_lastcheck'] = $GLOBALS['LANG']->getLL('list.tableHead.lastCheck');
                // Add CSH to the header of each column
                foreach ($makerTableHead as $column => $label) {
-                       $label = \TYPO3\CMS\Backend\Utility\BackendUtility::wrapInHelp('linkvalidator', $column, $label);
+                       $label = BackendUtility::wrapInHelp('linkvalidator', $column, $label);
                        $makerTableHead[$column] = $label;
                }
                // Add section header
@@ -518,7 +519,7 @@ class LinkValidatorReport extends \TYPO3\CMS\Backend\Module\AbstractFunctionModu
                        '?id=' . $this->pObj->id .
                        '&search_levels=' . $this->searchLevel;
                $actionLink = '<a href="#" onclick="';
-               $actionLink .= \TYPO3\CMS\Backend\Utility\BackendUtility::editOnClick(
+               $actionLink .= BackendUtility::editOnClick(
                        $params,
                        $GLOBALS['BACK_PATH'],
                        $requestUri
@@ -550,7 +551,7 @@ class LinkValidatorReport extends \TYPO3\CMS\Backend\Module\AbstractFunctionModu
                $element .= $elementHeadline;
                $element .= ' ' . sprintf($GLOBALS['LANG']->getLL('list.field'), $fieldName);
                $markerArray['actionlink'] = $actionLink;
-               $markerArray['path'] = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecordPath($row['record_pid'], '', 0, 0);
+               $markerArray['path'] = BackendUtility::getRecordPath($row['record_pid'], '', 0, 0);
                $markerArray['element'] = $element;
                $markerArray['headlink'] = $row['link_title'];
                $markerArray['linktarget'] = $brokenUrl;
@@ -588,7 +589,7 @@ class LinkValidatorReport extends \TYPO3\CMS\Backend\Module\AbstractFunctionModu
                $hookSectionTemplate = \TYPO3\CMS\Core\Html\HtmlParser::getSubpart($checkOptionsTemplate, '###HOOK_SECTION###');
                $markerArray['statistics_header'] = $this->doc->sectionHeader($GLOBALS['LANG']->getLL('report.statistics.header'));
                $totalCountLabel = $GLOBALS['LANG']->getLL('overviews.nbtotal');
-               $totalCountLabel = \TYPO3\CMS\Backend\Utility\BackendUtility::wrapInHelp('linkvalidator', 'checkboxes', $totalCountLabel);
+               $totalCountLabel = BackendUtility::wrapInHelp('linkvalidator', 'checkboxes', $totalCountLabel);
                $markerArray['total_count_label'] = $totalCountLabel;
                if (empty($brokenLinkOverView['brokenlinkCount'])) {
                        $markerArray['total_count'] = '0';
@@ -646,7 +647,7 @@ class LinkValidatorReport extends \TYPO3\CMS\Backend\Module\AbstractFunctionModu
         */
        protected function getDocHeaderButtons() {
                $buttons = array(
-                       'csh' => \TYPO3\CMS\Backend\Utility\BackendUtility::cshItem('_MOD_web_func', '', $GLOBALS['BACK_PATH']),
+                       'csh' => BackendUtility::cshItem('_MOD_web_func', '', $GLOBALS['BACK_PATH']),
                        'shortcut' => $this->getShortcutButton(),
                        'save' => ''
                );
index 5ffd8da..e12a1ac 100644 (file)
@@ -24,6 +24,7 @@ namespace TYPO3\CMS\Linkvalidator\Task;
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
 
+use TYPO3\CMS\Backend\Utility\BackendUtility;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 
 /**
@@ -330,7 +331,7 @@ class ValidatorTask extends \TYPO3\CMS\Scheduler\Task\AbstractTask {
         * @throws \Exception
         */
        protected function loadModTsConfig($page) {
-               $modTs = \TYPO3\CMS\Backend\Utility\BackendUtility::getModTSconfig($page, 'mod.linkvalidator');
+               $modTs = BackendUtility::getModTSconfig($page, 'mod.linkvalidator');
                $parseObj = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\TypoScript\\Parser\\TypoScriptParser');
                $parseObj->parse($this->configuration);
                if (count($parseObj->errors) > 0) {
@@ -502,9 +503,9 @@ class ValidatorTask extends \TYPO3\CMS\Scheduler\Task\AbstractTask {
                                $markerArray[$markerKey . '_old'] = $oldBrokenLink[$markerKey];
                        }
                }
-               $markerArray['title'] = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecordTitle(
+               $markerArray['title'] = BackendUtility::getRecordTitle(
                        'pages',
-                       \TYPO3\CMS\Backend\Utility\BackendUtility::getRecord('pages', $curPage)
+                       BackendUtility::getRecord('pages', $curPage)
                );
                $content = '';
                if ($markerArray['brokenlinkCount'] > 0) {
index fd2288c..56c4284 100644 (file)
@@ -24,6 +24,8 @@ namespace TYPO3\CMS\Linkvalidator\Task;
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
 
+use TYPO3\CMS\Backend\Utility\BackendUtility;
+
 /**
  * This class provides Scheduler Additional Field plugin implementation
  *
@@ -100,7 +102,7 @@ class ValidatorTaskAdditionalFieldProvider implements \TYPO3\CMS\Scheduler\Addit
                $fieldId = 'task_page';
                $fieldCode = '<input type="text" name="tx_scheduler[linkvalidator][page]" id="' . $fieldId . '" value="' . htmlspecialchars($taskInfo['page']) . '"/>';
                $label = $GLOBALS['LANG']->sL('LLL:EXT:linkvalidator/Resources/Private/Language/locallang.xlf:tasks.validate.page');
-               $label = \TYPO3\CMS\Backend\Utility\BackendUtility::wrapInHelp('linkvalidator', $fieldId, $label);
+               $label = BackendUtility::wrapInHelp('linkvalidator', $fieldId, $label);
                $additionalFields[$fieldId] = array(
                        'code' => $fieldCode,
                        'label' => $label
@@ -123,7 +125,7 @@ class ValidatorTaskAdditionalFieldProvider implements \TYPO3\CMS\Scheduler\Addit
                }
                $fieldCode .= '</select>';
                $label = $GLOBALS['LANG']->sL('LLL:EXT:linkvalidator/Resources/Private/Language/locallang.xlf:tasks.validate.depth');
-               $label = \TYPO3\CMS\Backend\Utility\BackendUtility::wrapInHelp('linkvalidator', $fieldId, $label);
+               $label = BackendUtility::wrapInHelp('linkvalidator', $fieldId, $label);
                $additionalFields[$fieldId] = array(
                        'code' => $fieldCode,
                        'label' => $label
@@ -132,7 +134,7 @@ class ValidatorTaskAdditionalFieldProvider implements \TYPO3\CMS\Scheduler\Addit
                $fieldCode = '<textarea  name="tx_scheduler[linkvalidator][configuration]" id="' . $fieldId . '" >' .
                                        htmlspecialchars($taskInfo['configuration']) . '</textarea>';
                $label = $GLOBALS['LANG']->sL('LLL:EXT:linkvalidator/Resources/Private/Language/locallang.xlf:tasks.validate.conf');
-               $label = \TYPO3\CMS\Backend\Utility\BackendUtility::wrapInHelp('linkvalidator', $fieldId, $label);
+               $label = BackendUtility::wrapInHelp('linkvalidator', $fieldId, $label);
                $additionalFields[$fieldId] = array(
                        'code' => $fieldCode,
                        'label' => $label
@@ -141,7 +143,7 @@ class ValidatorTaskAdditionalFieldProvider implements \TYPO3\CMS\Scheduler\Addit
                $fieldCode = '<input type="text"  name="tx_scheduler[linkvalidator][email]" id="' . $fieldId . '" value="' .
                                        htmlspecialchars($taskInfo['email']) . '" />';
                $label = $GLOBALS['LANG']->sL('LLL:EXT:linkvalidator/Resources/Private/Language/locallang.xlf:tasks.validate.email');
-               $label = \TYPO3\CMS\Backend\Utility\BackendUtility::wrapInHelp('linkvalidator', $fieldId, $label);
+               $label = BackendUtility::wrapInHelp('linkvalidator', $fieldId, $label);
                $additionalFields[$fieldId] = array(
                        'code' => $fieldCode,
                        'label' => $label
@@ -150,7 +152,7 @@ class ValidatorTaskAdditionalFieldProvider implements \TYPO3\CMS\Scheduler\Addit
                $fieldCode = '<input type="checkbox"  name="tx_scheduler[linkvalidator][emailOnBrokenLinkOnly]" id="' . $fieldId . '" ' .
                                        (htmlspecialchars($taskInfo['emailOnBrokenLinkOnly']) ? 'checked="checked"' : '') . ' />';
                $label = $GLOBALS['LANG']->sL('LLL:EXT:linkvalidator/Resources/Private/Language/locallang.xlf:tasks.validate.emailOnBrokenLinkOnly');
-               $label = \TYPO3\CMS\Backend\Utility\BackendUtility::wrapInHelp('linkvalidator', $fieldId, $label);
+               $label = BackendUtility::wrapInHelp('linkvalidator', $fieldId, $label);
                $additionalFields[$fieldId] = array(
                        'code' => $fieldCode,
                        'label' => $label
@@ -159,7 +161,7 @@ class ValidatorTaskAdditionalFieldProvider implements \TYPO3\CMS\Scheduler\Addit
                $fieldCode = '<input type="text"  name="tx_scheduler[linkvalidator][emailTemplateFile]" id="' . $fieldId .
                                        '" value="' . htmlspecialchars($taskInfo['emailTemplateFile']) . '" />';
                $label = $GLOBALS['LANG']->sL('LLL:EXT:linkvalidator/Resources/Private/Language/locallang.xlf:tasks.validate.emailTemplateFile');
-               $label = \TYPO3\CMS\Backend\Utility\BackendUtility::wrapInHelp('linkvalidator', $fieldId, $label);
+               $label = BackendUtility::wrapInHelp('linkvalidator', $fieldId, $label);
                $additionalFields[$fieldId] = array(
                        'code' => $fieldCode,
                        'label' => $label
index cd911f5..7bc257e 100644 (file)
@@ -27,6 +27,7 @@ namespace TYPO3\CMS\Lowlevel;
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
 
+use TYPO3\CMS\Backend\Utility\BackendUtility;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 
 /**
@@ -310,7 +311,7 @@ NOW Running --AUTOFIX on result. OK?' . ($this->cli_isArg('--dryrun') ? ' (--dry
                $this->performanceStatistics['genTree()'] = '';
                // Initialize:
                if (\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('workspaces')) {
-                       $this->workspaceIndex = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('uid,title', 'sys_workspace', '1=1' . \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause('sys_workspace'), '', '', '', 'uid');
+                       $this->workspaceIndex = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('uid,title', 'sys_workspace', '1=1' . BackendUtility::deleteClause('sys_workspace'), '', '', '', 'uid');
                }
                $this->workspaceIndex[-1] = TRUE;
                $this->workspaceIndex[0] = TRUE;
@@ -385,7 +386,7 @@ NOW Running --AUTOFIX on result. OK?' . ($this->cli_isArg('--dryrun') ? ' (--dry
        public function genTree_traverse($rootID, $depth, $echoLevel = 0, $callBack = '', $versionSwapmode = '', $rootIsVersion = 0, $accumulatedPath = '') {
                // Register page:
                $this->recStats['all']['pages'][$rootID] = $rootID;
-               $pageRecord = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecordRaw('pages', 'uid=' . intval($rootID), 'deleted,title,t3ver_count,t3ver_wsid');
+               $pageRecord = BackendUtility::getRecordRaw('pages', 'uid=' . intval($rootID), 'deleted,title,t3ver_count,t3ver_wsid');
                $accumulatedPath .= '/' . $pageRecord['title'];
                // Register if page is deleted:
                if ($pageRecord['deleted']) {
@@ -430,7 +431,7 @@ NOW Running --AUTOFIX on result. OK?' . ($this->cli_isArg('--dryrun') ? ' (--dry
                        if ($tableName != 'pages') {
                                // Select all records belonging to page:
                                $pt4 = GeneralUtility::milliseconds();
-                               $resSub = $GLOBALS['TYPO3_DB']->exec_SELECTquery('uid' . ($GLOBALS['TCA'][$tableName]['ctrl']['delete'] ? ',' . $GLOBALS['TCA'][$tableName]['ctrl']['delete'] : ''), $tableName, 'pid=' . intval($rootID) . ($this->genTree_traverseDeleted ? '' : \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause($tableName)));
+                               $resSub = $GLOBALS['TYPO3_DB']->exec_SELECTquery('uid' . ($GLOBALS['TCA'][$tableName]['ctrl']['delete'] ? ',' . $GLOBALS['TCA'][$tableName]['ctrl']['delete'] : ''), $tableName, 'pid=' . intval($rootID) . ($this->genTree_traverseDeleted ? '' : BackendUtility::deleteClause($tableName)));
                                $this->performanceStatistics['genTree_traverse():TraverseTables:']['MySQL']['(ALL)'] += GeneralUtility::milliseconds() - $pt4;
                                $this->performanceStatistics['genTree_traverse():TraverseTables:']['MySQL'][$tableName] += GeneralUtility::milliseconds() - $pt4;
                                $pt5 = GeneralUtility::milliseconds();
@@ -479,7 +480,7 @@ NOW Running --AUTOFIX on result. OK?' . ($this->cli_isArg('--dryrun') ? ' (--dry
                                                }
                                                // Add any versions of those records:
                                                if ($this->genTree_traverseVersions) {
-                                                       $versions = \TYPO3\CMS\Backend\Utility\BackendUtility::selectVersionsOfRecord($tableName, $rowSub['uid'], 'uid,t3ver_wsid,t3ver_count' . ($GLOBALS['TCA'][$tableName]['ctrl']['delete'] ? ',' . $GLOBALS['TCA'][$tableName]['ctrl']['delete'] : ''), 0, TRUE);
+                                                       $versions = BackendUtility::selectVersionsOfRecord($tableName, $rowSub['uid'], 'uid,t3ver_wsid,t3ver_count' . ($GLOBALS['TCA'][$tableName]['ctrl']['delete'] ? ',' . $GLOBALS['TCA'][$tableName]['ctrl']['delete'] : ''), 0, TRUE);
                                                        if (is_array($versions)) {
                                                                foreach ($versions as $verRec) {
                                                                        if (!$verRec['_CURRENT_VERSION']) {
@@ -541,14 +542,14 @@ NOW Running --AUTOFIX on result. OK?' . ($this->cli_isArg('--dryrun') ? ' (--dry
                if (!$versionSwapmode || $versionSwapmode == 'SWAPMODE:1') {
                        if ($depth > 0) {
                                $depth--;
-                               $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('uid', 'pages', 'pid=' . intval($rootID) . ($this->genTree_traverseDeleted ? '' : \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause('pages')), '', 'sorting');
+                               $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('uid', 'pages', 'pid=' . intval($rootID) . ($this->genTree_traverseDeleted ? '' : BackendUtility::deleteClause('pages')), '', 'sorting');
                                while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
                                        $this->genTree_traverse($row['uid'], $depth, $echoLevel, $callBack, $versionSwapmode, 0, $accumulatedPath);
                                }
                        }
                        // Add any versions of pages
                        if ($rootID > 0 && $this->genTree_traverseVersions) {
-                               $versions = \TYPO3\CMS\Backend\Utility\BackendUtility::selectVersionsOfRecord('pages', $rootID, 'uid,t3ver_oid,t3ver_wsid,t3ver_count', 0, TRUE);
+                               $versions = BackendUtility::selectVersionsOfRecord('pages', $rootID, 'uid,t3ver_oid,t3ver_wsid,t3ver_count', 0, TRUE);
                                if (is_array($versions)) {
                                        foreach ($versions as $verRec) {
                                                if (!$verRec['_CURRENT_VERSION']) {
index dc5ed58..f518f84 100644 (file)
@@ -27,6 +27,8 @@ namespace TYPO3\CMS\Lowlevel;
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
 
+use TYPO3\CMS\Backend\Utility\BackendUtility;
+
 /**
  * Looking for versions of records
  *
@@ -96,9 +98,9 @@ Automatic Repair:
                $resultArray['versions_unused_placeholders'] = array();
                foreach ($GLOBALS['TCA'] as $table => $cfg) {
                        if ($cfg['ctrl']['versioningWS']) {
-                               $placeHolders = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('uid,pid', $table, 't3ver_state=1 AND pid>=0' . \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause($table));
+                               $placeHolders = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('uid,pid', $table, 't3ver_state=1 AND pid>=0' . BackendUtility::deleteClause($table));
                                foreach ($placeHolders as $phrec) {
-                                       if (count(\TYPO3\CMS\Backend\Utility\BackendUtility::selectVersionsOfRecord($table, $phrec['uid'], 'uid')) <= 1) {
+                                       if (count(BackendUtility::selectVersionsOfRecord($table, $phrec['uid'], 'uid')) <= 1) {
                                                $resultArray['versions_unused_placeholders'][\TYPO3\CMS\Core\Utility\GeneralUtility::shortmd5($table . ':' . $phrec['uid'])] = $table . ':' . $phrec['uid'];
                                        }
                                }
@@ -110,13 +112,13 @@ Automatic Repair:
                $resultArray['versions_move_placeholders_bad'] = array();
                foreach ($GLOBALS['TCA'] as $table => $cfg) {
                        if ((int) $cfg['ctrl']['versioningWS'] >= 2) {
-                               $placeHolders = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('uid,pid,t3ver_move_id,t3ver_wsid,t3ver_state', $table, 't3ver_state=3 AND pid>=0' . \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause($table));
+                               $placeHolders = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('uid,pid,t3ver_move_id,t3ver_wsid,t3ver_state', $table, 't3ver_state=3 AND pid>=0' . BackendUtility::deleteClause($table));
                                foreach ($placeHolders as $phrec) {
                                        $shortID = \TYPO3\CMS\Core\Utility\GeneralUtility::shortmd5($table . ':' . $phrec['uid']);
                                        if ((int) $phrec['t3ver_wsid'] != 0) {
                                                $phrecCopy = $phrec;
-                                               if (\TYPO3\CMS\Backend\Utility\BackendUtility::movePlhOL($table, $phrec)) {
-                                                       if ($wsAlt = \TYPO3\CMS\Backend\Utility\BackendUtility::getWorkspaceVersionOfRecord($phrecCopy['t3ver_wsid'], $table, $phrec['uid'], 'uid,pid,t3ver_state')) {
+                                               if (BackendUtility::movePlhOL($table, $phrec)) {
+                                                       if ($wsAlt = BackendUtility::getWorkspaceVersionOfRecord($phrecCopy['t3ver_wsid'], $table, $phrec['uid'], 'uid,pid,t3ver_state')) {
                                                                if ($wsAlt['t3ver_state'] != 4) {
                                                                        $resultArray['versions_move_placeholders_bad'][$shortID] = array($table . ':' . $phrec['uid'], 'State for version was not "4" as it should be!', $phrecCopy);
                                                                } else {
@@ -145,7 +147,7 @@ Automatic Repair:
                $resultArray['versions_move_id_check'] = array();
                foreach ($GLOBALS['TCA'] as $table => $cfg) {
                        if ((int) $cfg['ctrl']['versioningWS'] >= 2) {
-                               $placeHolders = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('uid,pid,t3ver_move_id,t3ver_wsid,t3ver_state', $table, 't3ver_move_id<>0' . \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause($table));
+                               $placeHolders = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('uid,pid,t3ver_move_id,t3ver_wsid,t3ver_state', $table, 't3ver_move_id<>0' . BackendUtility::deleteClause($table));
                                foreach ($placeHolders as $phrec) {
                                        if ((int) $phrec['t3ver_state'] == 3) {
                                                if ($phrec['pid'] != -1) {
index 861d984..3005e92 100644 (file)
@@ -27,6 +27,7 @@ namespace TYPO3\CMS\Lowlevel\View;
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
 
+use TYPO3\CMS\Backend\Utility\BackendUtility;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 
 /**
@@ -131,7 +132,7 @@ class ConfigurationView {
                        'fixedLgd' => ''
                );
                // CLEANSE SETTINGS
-               $this->MOD_SETTINGS = \TYPO3\CMS\Backend\Utility\BackendUtility::getModuleData($this->MOD_MENU, GeneralUtility::_GP('SET'), $this->MCONF['name']);
+               $this->MOD_SETTINGS = BackendUtility::getModuleData($this->MOD_MENU, GeneralUtility::_GP('SET'), $this->MCONF['name']);
        }
 
        /**
@@ -150,8 +151,8 @@ class ConfigurationView {
                                                <label for="search_field">' . $GLOBALS['LANG']->getLL('enterSearchPhrase', TRUE) . '</label>
                                                <input type="text" id="search_field" name="search_field" value="' . htmlspecialchars($search_field) . '"' . $GLOBALS['TBE_TEMPLATE']->formWidth(20) . ' />
                                                <input type="submit" name="search" id="search" value="' . $GLOBALS['LANG']->getLL('search', TRUE) . '" />';
-               $this->content .= \TYPO3\CMS\Backend\Utility\BackendUtility::getFuncCheck(0, 'SET[regexsearch]', $this->MOD_SETTINGS['regexsearch'], '', '', 'id="checkRegexsearch"') . '<label for="checkRegexsearch">' . $GLOBALS['LANG']->getLL('useRegExp', TRUE) . '</label>';
-               $this->content .= \TYPO3\CMS\Backend\Utility\BackendUtility::getFuncCheck(0, 'SET[fixedLgd]', $this->MOD_SETTINGS['fixedLgd'], '', '', 'id="checkFixedLgd"') . '<label for="checkFixedLgd">' . $GLOBALS['LANG']->getLL('cropLines', TRUE) . '</label>
+               $this->content .= BackendUtility::getFuncCheck(0, 'SET[regexsearch]', $this->MOD_SETTINGS['regexsearch'], '', '', 'id="checkRegexsearch"') . '<label for="checkRegexsearch">' . $GLOBALS['LANG']->getLL('useRegExp', TRUE) . '</label>';
+               $this->content .= BackendUtility::getFuncCheck(0, 'SET[fixedLgd]', $this->MOD_SETTINGS['fixedLgd'], '', '', 'id="checkFixedLgd"') . '<label for="checkFixedLgd">' . $GLOBALS['LANG']->getLL('cropLines', TRUE) . '</label>
                                                </div>';
                $this->content .= $this->doc->spacer(5);
                switch ($this->MOD_SETTINGS['function']) {
@@ -335,7 +336,7 @@ class ConfigurationView {
         * @return string HTML of the function menu
         */
        protected function getFuncMenu() {
-               $funcMenu = \TYPO3\CMS\Backend\Utility\BackendUtility::getFuncMenu(0, 'SET[function]', $this->MOD_SETTINGS['function'], $this->MOD_MENU['function']);
+               $funcMenu = BackendUtility::getFuncMenu(0, 'SET[function]', $this->MOD_SETTINGS['function'], $this->MOD_MENU['function']);
                return $funcMenu;
        }
 
index a54f9ed..d704b47 100644 (file)
@@ -24,6 +24,8 @@ namespace TYPO3\CMS\Perm\Controller;
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
 
+use TYPO3\CMS\Backend\Utility\BackendUtility;
+
 /**
  * This class extends the permissions module in the TYPO3 Backend to provide
  * convenient methods of editing of page permissions (including page ownership
@@ -64,11 +66,11 @@ class PermissionAjaxController {
                $this->conf['editLockState'] = intval(\TYPO3\CMS\Core\Utility\GeneralUtility::_POST('editLockState'));
                // User: Replace some parts of the posted values
                $this->conf['new_owner_uid'] = intval(\TYPO3\CMS\Core\Utility\GeneralUtility::_POST('newOwnerUid'));
-               $temp_owner_data = \TYPO3\CMS\Backend\Utility\BackendUtility::getUserNames('username, uid', ' AND uid = ' . $this->conf['new_owner_uid']);
+               $temp_owner_data = BackendUtility::getUserNames('username, uid', ' AND uid = ' . $this->conf['new_owner_uid']);
                $this->conf['new_owner_username'] = htmlspecialchars($temp_owner_data[$this->conf['new_owner_uid']]['username']);
                // Group: Replace some parts of the posted values
                $this->conf['new_group_uid'] = intval(\TYPO3\CMS\Core\Utility\GeneralUtility::_POST('newGroupUid'));
-               $temp_group_data = \TYPO3\CMS\Backend\Utility\BackendUtility::getGroupNames('title,uid', ' AND uid = ' . $this->conf['new_group_uid']);
+               $temp_group_data = BackendUtility::getGroupNames('title,uid', ' AND uid = ' . $this->conf['new_group_uid']);
                $this->conf['new_group_username'] = htmlspecialchars($temp_group_data[$this->conf['new_group_uid']]['title']);
        }
 
@@ -170,11 +172,11 @@ class PermissionAjaxController {
         */
        protected function renderUserSelector($page, $ownerUid, $username = '') {
                // Get usernames
-               $beUsers = \TYPO3\CMS\Backend\Utility\BackendUtility::getUserNames();
+               $beUsers = BackendUtility::getUserNames();
                // Init groupArray
                $groups = array();
                if (!$GLOBALS['BE_USER']->isAdmin()) {
-                       $beUsers = \TYPO3\CMS\Backend\Utility\BackendUtility::blindUserNames($beUsers, $groups, 1);
+                       $beUsers = BackendUtility::blindUserNames($beUsers, $groups, 1);
                }
                // Owner selector:
                $options = '';
@@ -202,11 +204,11 @@ class PermissionAjaxController {
         */
        protected function renderGroupSelector($page, $groupUid, $groupname = '') {
                // Get usernames
-               $beGroups = \TYPO3\CMS\Backend\Utility\BackendUtility::getListGroupNames('title,uid');
+               $beGroups = BackendUtility::getListGroupNames('title,uid');
                $beGroupKeys = array_keys($beGroups);
-               $beGroupsO = ($beGroups = \TYPO3\CMS\Backend\Utility\BackendUtility::getGroupNames());
+               $beGroupsO = ($beGroups = BackendUtility::getGroupNames());
                if (!$GLOBALS['BE_USER']->isAdmin()) {
-                       $beGroups = \TYPO3\CMS\Backend\Utility\BackendUtility::blindGroupNames($beGroupsO, $beGroupKeys, 1);
+                       $beGroups = BackendUtility::blindGroupNames($beGroupsO, $beGroupKeys, 1);
                }
                // Group selector:
                $options = '';
index 682fa37..be96854 100644 (file)
@@ -27,6 +27,7 @@ namespace TYPO3\CMS\Recordlist\RecordList;
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
 
+use TYPO3\CMS\Backend\Utility\BackendUtility;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 
 /**
@@ -385,7 +386,7 @@ class AbstractDatabaseRecordList extends \TYPO3\CMS\Backend\RecordList\AbstractR
         */
        public function generateList() {
                // Set page record in header
-               $this->pageRecord = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecordWSOL('pages', $this->id);
+               $this->pageRecord = BackendUtility::getRecordWSOL('pages', $this->id);
                // Traverse the TCA table array:
                foreach ($GLOBALS['TCA'] as $tableName => $value) {
                        // Checking if the table should be rendered:
@@ -530,7 +531,7 @@ class AbstractDatabaseRecordList extends \TYPO3\CMS\Backend\RecordList\AbstractR
         * @todo Define visibility
         */
        public function thumbCode($row, $table, $field) {
-               return \TYPO3\CMS\Backend\Utility\BackendUtility::thumbCode($row, $table, $field, $this->backPath);
+               return BackendUtility::thumbCode($row, $table, $field, $this->backPath);
        }
 
        /**
@@ -570,7 +571,7 @@ class AbstractDatabaseRecordList extends \TYPO3\CMS\Backend\RecordList\AbstractR
                $queryParts = array(
                        'SELECT' => $fieldList,
                        'FROM' => $table,
-                       'WHERE' => $this->pidSelect . ' ' . $pC . \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause($table) . \TYPO3\CMS\Backend\Utility\BackendUtility::versioningPlaceholderClause($table) . ' ' . $addWhere . ' ' . $search,
+                       'WHERE' => $this->pidSelect . ' ' . $pC . BackendUtility::deleteClause($table) . BackendUtility::versioningPlaceholderClause($table) . ' ' . $addWhere . ' ' . $search,
                        'GROUPBY' => '',
                        'ORDERBY' => $GLOBALS['TYPO3_DB']->stripOrderBy($orderBy),
                        'LIMIT' => $limit
@@ -740,7 +741,8 @@ class AbstractDatabaseRecordList extends \TYPO3\CMS\Backend\RecordList\AbstractR
                $origCode = $code;
                // If the title is blank, make a "no title" label:
                if (!strcmp($code, '')) {
-                       $code = '<i>[' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:labels.no_title', 1) . ']</i> - ' . htmlspecialchars(GeneralUtility::fixed_lgd_cs(\TYPO3\CMS\Backend\Utility\BackendUtility::getRecordTitle($table, $row), $GLOBALS['BE_USER']->uc['titleLen']));
+                       $code = '<i>[' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:labels.no_title', 1) . ']</i> - ' . htmlspecialchars(GeneralUtility::fixed_lgd_cs(
+                                               BackendUtility::getRecordTitle($table, $row), $GLOBALS['BE_USER']->uc['titleLen']));
                } else {
                        $code = htmlspecialchars(GeneralUtility::fixed_lgd_cs($code, $this->fixedL), ENT_QUOTES, 'UTF-8', FALSE);
                        if ($code != htmlspecialchars($origCode)) {
@@ -751,7 +753,7 @@ class AbstractDatabaseRecordList extends \TYPO3\CMS\Backend\RecordList\AbstractR
                        case 'edit':
                                // If the listed table is 'pages' we have to request the permission settings for each page:
                                if ($table == 'pages') {
-                                       $localCalcPerms = $GLOBALS['BE_USER']->calcPerms(\TYPO3\CMS\Backend\Utility\BackendUtility::getRecord('pages', $row['uid']));
+                                       $localCalcPerms = $GLOBALS['BE_USER']->calcPerms(BackendUtility::getRecord('pages', $row['uid']));
                                        $permsEdit = $localCalcPerms & 2;
                                } else {
                                        $permsEdit = $this->calcPerms & 16;
@@ -759,13 +761,15 @@ class AbstractDatabaseRecordList extends \TYPO3\CMS\Backend\RecordList\AbstractR
                                // "Edit" link: ( Only if permissions to edit the page-record of the content of the parent page ($this->id)
                                if ($permsEdit) {
                                        $params = '&edit[' . $table . '][' . $row['uid'] . ']=edit';
-                                       $code = '<a href="#" onclick="' . htmlspecialchars(\TYPO3\CMS\Backend\Utility\BackendUtility::editOnClick($params, $this->backPath, -1)) . '" title="' . $GLOBALS['LANG']->getLL('edit', TRUE) . '">' . $code . '</a>';
+                                       $code = '<a href="#" onclick="' . htmlspecialchars(
+                                                       BackendUtility::editOnClick($params, $this->backPath, -1)) . '" title="' . $GLOBALS['LANG']->getLL('edit', TRUE) . '">' . $code . '</a>';
                                }
                                break;
                        case 'show':
                                // "Show" link (only pages and tt_content elements)
                                if ($table == 'pages' || $table == 'tt_content') {
-                                       $code = '<a href="#" onclick="' . htmlspecialchars(\TYPO3\CMS\Backend\Utility\BackendUtility::viewOnClick(($table == 'tt_content' ? $this->id . '#' . $row['uid'] : $row['uid']))) . '" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:labels.showPage', TRUE) . '">' . $code . '</a>';
+                                       $code = '<a href="#" onclick="' . htmlspecialchars(
+                                                       BackendUtility::viewOnClick(($table == 'tt_content' ? $this->id . '#' . $row['uid'] : $row['uid']))) . '" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:labels.showPage', TRUE) . '">' . $code . '</a>';
                                }
                                break;
                        case 'info':
@@ -852,7 +856,7 @@ class AbstractDatabaseRecordList extends \TYPO3\CMS\Backend\RecordList\AbstractR
                if ((!$exclList || !GeneralUtility::inList($exclList, 'sortRev')) && $this->sortRev) {
                        $urlParameters['sortRev'] = $this->sortRev;
                }
-               return \TYPO3\CMS\Backend\Utility\BackendUtility::getModuleUrl('web_list', $urlParameters);
+               return BackendUtility::getModuleUrl('web_list', $urlParameters);
        }
 
        /**
@@ -952,7 +956,7 @@ class AbstractDatabaseRecordList extends \TYPO3\CMS\Backend\RecordList\AbstractR
        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
                                $url = substr($this->listURL(), strlen($this->backPath));
index 379f933..00f9c85 100644 (file)
@@ -24,6 +24,8 @@ namespace TYPO3\CMS\Recycler\Controller;
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
 
+use TYPO3\CMS\Backend\Utility\BackendUtility;
+
 /**
  * Deleted Records View
  *
@@ -49,17 +51,18 @@ class DeletedRecordsController {
                        foreach ($deletedRowsArray as $table => $rows) {
                                $total += count($deletedRowsArray[$table]);
                                foreach ($rows as $row) {
-                                       $backendUser = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecord('be_users', $row[$GLOBALS['TCA'][$table]['ctrl']['cruser_id']], 'username', '', FALSE);
+                                       $backendUser = BackendUtility::getRecord('be_users', $row[$GLOBALS['TCA'][$table]['ctrl']['cruser_id']], 'username', '', FALSE);
                                        $jsonArray['rows'][] = array(
                                                'uid' => $row['uid'],
                                                'pid' => $row['pid'],
                                                'table' => $table,
-                                               'crdate' => \TYPO3\CMS\Backend\Utility\BackendUtility::datetime($row[$GLOBALS['TCA'][$table]['ctrl']['crdate']]),
-                                               'tstamp' => \TYPO3\CMS\Backend\Utility\BackendUtility::datetime($row[$GLOBALS['TCA'][$table]['ctrl']['tstamp']]),
+                                               'crdate' => BackendUtility::datetime($row[$GLOBALS['TCA'][$table]['ctrl']['crdate']]),
+                                               'tstamp' => BackendUtility::datetime($row[$GLOBALS['TCA'][$table]['ctrl']['tstamp']]),
                                                'owner' => htmlspecialchars($backendUser['username']),
                                                'owner_uid' => $row[$GLOBALS['TCA'][$table]['ctrl']['cruser_id']],
                                                'tableTitle' => \TYPO3\CMS\Recycler\Utility\RecyclerUtility::getUtf8String($GLOBALS['LANG']->sL($GLOBALS['TCA'][$table]['ctrl']['title'])),
-                                               'title' => htmlspecialchars(\TYPO3\CMS\Recycler\Utility\RecyclerUtility::getUtf8String(\TYPO3\CMS\Backend\Utility\BackendUtility::getRecordTitle($table, $row))),
+                                               'title' => htmlspecialchars(\TYPO3\CMS\Recycler\Utility\RecyclerUtility::getUtf8String(
+                                                               BackendUtility::getRecordTitle($table, $row))),
                                                'path' => \TYPO3\CMS\Recycler\Utility\RecyclerUtility::getRecordPath($row['pid'])
                                        );
                                }
index 12f1d6a..f0bfc3d 100644 (file)
@@ -24,7 +24,10 @@ namespace TYPO3\CMS\Recycler\Controller;
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
 
+use TYPO3\CMS\Backend\Utility\BackendUtility;
+
 // This checks permissions and exits if the users has no permission for entry.
+
 /**
  * Module 'Recycler' for the 'recycler' extension.
  *
@@ -65,7 +68,7 @@ class RecyclerModuleController extends \TYPO3\CMS\Backend\Module\BaseScriptClass
                $this->doc->setExtDirectStateProvider();
                $this->pageRenderer = $this->doc->getPageRenderer();
                $this->relativePath = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('recycler');
-               $this->pageRecord = \TYPO3\CMS\Backend\Utility\BackendUtility::readPageAccess($this->id, $this->perms_clause);
+               $this->pageRecord = BackendUtility::readPageAccess($this->id, $this->perms_clause);
                $this->isAccessibleForCurrentUser = $this->id && is_array($this->pageRecord) || !$this->id && $this->isCurrentUserAdmin();
                //don't access in workspace
                if ($GLOBALS['BE_USER']->workspace !== 0) {
@@ -223,7 +226,7 @@ class RecyclerModuleController extends \TYPO3\CMS\Backend\Module\BaseScriptClass
         */
        protected function getDocHeaderButtons() {
                $buttons = array(
-                       'csh' => \TYPO3\CMS\Backend\Utility\BackendUtility::cshItem('_MOD_web_func', '', $GLOBALS['BACK_PATH']),
+                       'csh' => BackendUtility::cshItem('_MOD_web_func', '', $GLOBALS['BACK_PATH']),
                        'shortcut' => $this->getShortcutButton(),
                        'save' => ''
                );
@@ -265,7 +268,7 @@ class RecyclerModuleController extends \TYPO3\CMS\Backend\Module\BaseScriptClass
         * @return      string          The HTML representation of the function menu selector
         */
        protected function getFunctionMenu() {
-               return \TYPO3\CMS\Backend\Utility\BackendUtility::getFuncMenu(0, 'SET[function]', $this->MOD_SETTINGS['function'], $this->MOD_MENU['function']);
+               return BackendUtility::getFuncMenu(0, 'SET[function]', $this->MOD_SETTINGS['function'], $this->MOD_MENU['function']);
        }
 
        /**
index ee836b6..65c23b6 100644 (file)
@@ -23,6 +23,9 @@ namespace TYPO3\CMS\Recycler\Utility;
  *
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
+
+use TYPO3\CMS\Backend\Utility\BackendUtility;
+
 /**
  * Helper class for the 'recycler' extension.
  *
@@ -48,14 +51,14 @@ class RecyclerUtility {
                // First, resetting flags.
                $hasAccess = 0;
                $calcPRec = $row;
-               \TYPO3\CMS\Backend\Utility\BackendUtility::fixVersioningPid($table, $calcPRec);
+               BackendUtility::fixVersioningPid($table, $calcPRec);
                if (is_array($calcPRec)) {
                        if ($table == 'pages') {
                                // If pages:
                                $CALC_PERMS = $GLOBALS['BE_USER']->calcPerms($calcPRec);
                                $hasAccess = $CALC_PERMS & 2 ? 1 : 0;
                        } else {
-                               $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']));
                                // Fetching pid-record first.
                                $hasAccess = $CALC_PERMS & 16 ? 1 : 0;
                        }
@@ -90,9 +93,9 @@ class RecyclerUtility {
                        if (is_resource($res)) {
                                $row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res);
                                $GLOBALS['TYPO3_DB']->sql_free_result($res);
-                               \TYPO3\CMS\Backend\Utility\BackendUtility::workspaceOL('pages', $row);
+                               BackendUtility::workspaceOL('pages', $row);
                                if (is_array($row)) {
-                                       \TYPO3\CMS\Backend\Utility\BackendUtility::fixVersioningPid('pages', $row);
+                                       BackendUtility::fixVersioningPid('pages', $row);
                                        $uid = $row['pid'];
                                        $output = '/' . htmlspecialchars(\TYPO3\CMS\Core\Utility\GeneralUtility::fixed_lgd_cs($row['title'], $titleLimit)) . $output;
                                        if ($row['deleted']) {
index 4fe83be..04705e3 100644 (file)
@@ -23,6 +23,9 @@ namespace TYPO3\CMS\Rtehtmlarea\Extension;
  *
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
+
+use TYPO3\CMS\Backend\Utility\BackendUtility;
+
 /**
  * Acronym extension for htmlArea RTE
  *
@@ -171,10 +174,10 @@ class Acronym extends \TYPO3\CMS\Rtehtmlarea\RteHtmlAreaApi {
                        $languageList = implode('\',\'', \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $GLOBALS['TYPO3_DB']->fullQuoteStr(strtoupper($this->thisConfig['buttons.']['language.']['restrictToItems']), $tableB)));
                        $whereClause .= ' AND ' . $tableB . '.lg_iso_2 IN (' . $languageList . ') ';
                }
-               $whereClause .= \TYPO3\CMS\Backend\Utility\BackendUtility::BEenableFields($tableA);
-               $whereClause .= \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause($tableA);
-               $whereClause .= \TYPO3\CMS\Backend\Utility\BackendUtility::BEenableFields($tableB);
-               $whereClause .= \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause($tableB);
+               $whereClause .= BackendUtility::BEenableFields($tableA);
+               $whereClause .= BackendUtility::deleteClause($tableA);
+               $whereClause .= BackendUtility::BEenableFields($tableB);
+               $whereClause .= BackendUtility::deleteClause($tableB);
                $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery($fields, $tableAB, $whereClause);
                while ($acronymRow = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
                        $item = array('term' => $acronymRow['term'], 'abbr' => $acronymRow['acronym'], 'language' => strtolower($acronymRow['lg_iso_2']) . ($acronymRow['lg_country_iso_2'] ? '-' . $acronymRow['lg_country_iso_2'] : ''));
index ce74927..c018e07 100644 (file)
@@ -29,6 +29,7 @@ namespace TYPO3\CMS\Rtehtmlarea;
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
 
+use TYPO3\CMS\Backend\Utility\BackendUtility;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 
 /**
@@ -378,13 +379,13 @@ class RteHtmlAreaBase extends \TYPO3\CMS\Backend\Rte\AbstractRte {
                        // Form element name
                        $this->elementParts = explode('][', preg_replace('/\\]$/', '', preg_replace('/^(TSFE_EDIT\\[data\\]\\[|data\\[)/', '', $this->elementId)));
                        // Find the page PIDs:
-                       list($this->tscPID, $this->thePid) = \TYPO3\CMS\Backend\Utility\BackendUtility::getTSCpid(trim($this->elementParts[0]), trim($this->elementParts[1]), $thePidValue);
+                       list($this->tscPID, $this->thePid) = BackendUtility::getTSCpid(trim($this->elementParts[0]), trim($this->elementParts[1]), $thePidValue);
                        // Record "types" field value:
                        $this->typeVal = $RTEtypeVal;
                        // TCA "types" value for record
                        // Find "thisConfig" for record/editor:
                        unset($this->RTEsetup);
-                       $this->RTEsetup = $GLOBALS['BE_USER']->getTSConfig('RTE', \TYPO3\CMS\Backend\Utility\BackendUtility::getPagesTSconfig($this->tscPID));
+                       $this->RTEsetup = $GLOBALS['BE_USER']->getTSConfig('RTE', BackendUtility::getPagesTSconfig($this->tscPID));
                        $this->thisConfig = $thisConfig;
                        // Special configuration and default extras:
                        $this->specConf = $specConf;
@@ -417,8 +418,8 @@ class RteHtmlAreaBase extends \TYPO3\CMS\Backend\Rte\AbstractRte {
                                        $selectFields = $tableA . '.uid,' . $tableB . '.lg_iso_2,' . $tableB . '.lg_country_iso_2,' . $tableB . '.lg_typo3';
                                        $tableAB = $tableA . ' LEFT JOIN ' . $tableB . ' ON ' . $tableA . '.static_lang_isocode=' . $tableB . '.uid';
                                        $whereClause = $tableA . '.uid IN (' . $languagesUidsList . ') ';
-                                       $whereClause .= \TYPO3\CMS\Backend\Utility\BackendUtility::BEenableFields($tableA);
-                                       $whereClause .= \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause($tableA);
+                                       $whereClause .= BackendUtility::BEenableFields($tableA);
+                                       $whereClause .= BackendUtility::deleteClause($tableA);
                                        $res = $TYPO3_DB->exec_SELECTquery($selectFields, $tableAB, $whereClause);
                                        while ($languageRow = $TYPO3_DB->sql_fetch_assoc($res)) {
                                                $this->contentISOLanguage = strtolower(trim($languageRow['lg_iso_2']) . (trim($languageRow['lg_country_iso_2']) ? '_' . trim($languageRow['lg_country_iso_2']) : ''));
@@ -1421,7 +1422,7 @@ class RteHtmlAreaBase extends \TYPO3\CMS\Backend\Rte\AbstractRte {
                if ($this->is_FE()) {
                        return '';
                } else {
-                       $p = \TYPO3\CMS\Backend\Utility\BackendUtility::getSpecConfParametersFromArray($this->specConf['rte_transform']['parameters']);
+                       $p = BackendUtility::getSpecConfParametersFromArray($this->specConf['rte_transform']['parameters']);
                        return $this->elementParts[0] . ':' . $this->elementParts[1] . ':' . $this->elementParts[2] . ':' . $this->thePid . ':' . $this->typeVal . ':' . $this->tscPID . ':' . $p['imgpath'];
                }
        }
index a437729..1303eb5 100644 (file)
@@ -27,6 +27,7 @@ namespace TYPO3\CMS\Setup\Controller;
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
 
+use TYPO3\CMS\Backend\Utility\BackendUtility;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 
 /**
@@ -290,7 +291,7 @@ class SetupModuleController {
                $this->doc = GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Template\\DocumentTemplate');
                $this->doc->backPath = $GLOBALS['BACK_PATH'];
                $this->doc->setModuleTemplate('EXT:setup/Resources/Private/Templates/setup.html');
-               $this->doc->form = '<form action="' . \TYPO3\CMS\Backend\Utility\BackendUtility::getModuleUrl('user_setup') . '" method="post" name="usersetup" enctype="application/x-www-form-urlencoded">';
+               $this->doc->form = '<form action="' . BackendUtility::getModuleUrl('user_setup') . '" method="post" name="usersetup" enctype="application/x-www-form-urlencoded">';
                $this->doc->tableLayout = array(
                        'defRow' => array(
                                '0' => array('<td class="td-label">', '</td>'),
@@ -336,7 +337,7 @@ class SetupModuleController {
                        ';
                }
                if ($this->pagetreeNeedsRefresh) {
-                       \TYPO3\CMS\Backend\Utility\BackendUtility::setUpdateSignal('updatePageTree');
+                       BackendUtility::setUpdateSignal('updatePageTree');
                }
                // Start page:
                $this->doc->loadJavascriptLib('sysext/backend/Resources/Public/JavaScript/md5.js');
@@ -418,7 +419,7 @@ class SetupModuleController {
                        'save' => '',
                        'shortcut' => ''
                );
-               $buttons['csh'] = \TYPO3\CMS\Backend\Utility\BackendUtility::cshItem('_MOD_user_setup', '', $GLOBALS['BACK_PATH'], '|', TRUE);
+               $buttons['csh'] = BackendUtility::cshItem('_MOD_user_setup', '', $GLOBALS['BACK_PATH'], '|', TRUE);
                $buttons['save'] = \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-document-save', array('html' => '<input type="image" name="data[save]" class="c-inputButton" src="clear.gif" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:rm.saveDoc', TRUE) . '" />'));
                if ($GLOBALS['BE_USER']->mayMakeShortcut()) {
                        $buttons['shortcut'] = $this->doc->makeShortcutIcon('', '', $this->MCONF['name']);
@@ -657,7 +658,7 @@ class SetupModuleController {
                if ($GLOBALS['BE_USER']->isAdmin()) {
                        $this->simUser = intval(GeneralUtility::_GP('simUser'));
                        // Make user-selector:
-                       $users = \TYPO3\CMS\Backend\Utility\BackendUtility::getUserNames('username,usergroup,usergroup_cached_list,uid,realName', \TYPO3\CMS\Backend\Utility\BackendUtility::BEenableFields('be_users'));
+                       $users = BackendUtility::getUserNames('username,usergroup,usergroup_cached_list,uid,realName', BackendUtility::BEenableFields('be_users'));
                        $opt = array();
                        foreach ($users as $rr) {
                                if ($rr['uid'] != $GLOBALS['BE_USER']->user['uid']) {
@@ -665,7 +666,7 @@ class SetupModuleController {
                                }
                        }
                        if (count($opt)) {
-                               $this->simulateSelector = '<select ' . $GLOBALS['TBE_TEMPLATE']->formWidth(20) . ' id="field_simulate" name="simulateUser" onchange="window.location.href=\'' . \TYPO3\CMS\Backend\Utility\BackendUtility::getModuleUrl('user_setup') . '&simUser=\'+this.options[this.selectedIndex].value;"><option></option>' . implode('', $opt) . '</select>';
+                               $this->simulateSelector = '<select ' . $GLOBALS['TBE_TEMPLATE']->formWidth(20) . ' id="field_simulate" name="simulateUser" onchange="window.location.href=\'' . BackendUtility::getModuleUrl('user_setup') . '&simUser=\'+this.options[this.selectedIndex].value;"><option></option>' . implode('', $opt) . '</select>';
                        }
                }
                // This can only be set if the previous code was executed.
@@ -754,7 +755,7 @@ class SetupModuleController {
                } elseif (!GeneralUtility::inList('language,simuser,reset', $str)) {
                        $field = 'option_' . $str;
                }
-               return \TYPO3\CMS\Backend\Utility\BackendUtility::wrapInHelp($context, $field, $label);
+               return BackendUtility::wrapInHelp($context, $field, $label);
        }
 
        /**
index 9e9eae5..64f1aae 100644 (file)
@@ -27,6 +27,7 @@ namespace TYPO3\CMS\TsTemplate\Controller;
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
 
+use TYPO3\CMS\Backend\Utility\BackendUtility;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 
 /**
@@ -353,7 +354,7 @@ class TypoScriptTemplateObjectBrowserModuleFunctionController extends \TYPO3\CMS
                        $urlParameters = array(
                                'id' => $this->pObj->id
                        );
-                       $aHref = \TYPO3\CMS\Backend\Utility\BackendUtility::getModuleUrl('web_ts', $urlParameters);
+                       $aHref = BackendUtility::getModuleUrl('web_ts', $urlParameters);
                        if (!$this->pObj->MOD_SETTINGS[('ts_browser_TLKeys_' . $bType)][$this->pObj->sObj]) {
                                if (count($theSetup)) {
                                        $out = '<a href="' . htmlspecialchars(($aHref . '&addKey[' . rawurlencode($this->pObj->sObj) . ']=1&SET[ts_browser_toplevel_' . $bType . ']=' . rawurlencode($this->pObj->sObj))) . '">';
@@ -379,14 +380,14 @@ class TypoScriptTemplateObjectBrowserModuleFunctionController extends \TYPO3\CMS
                                $tmpl->tsbrowser_depthKeys = $tmpl->ext_getSearchKeys($theSetup, '', GeneralUtility::_POST('search_field'), array());
                        }
                        $menu = '<div class="tsob-menu"><label>' . $GLOBALS['LANG']->getLL('browse') . '</label>';
-                       $menu .= \TYPO3\CMS\Backend\Utility\BackendUtility::getFuncMenu($this->pObj->id, 'SET[ts_browser_type]', $bType, $this->pObj->MOD_MENU['ts_browser_type']);
+                       $menu .= BackendUtility::getFuncMenu($this->pObj->id, 'SET[ts_browser_type]', $bType, $this->pObj->MOD_MENU['ts_browser_type']);
                        $menu .= '<label for="ts_browser_toplevel_' . $bType . '">' . $GLOBALS['LANG']->getLL('objectList') . '</label>';
-                       $menu .= \TYPO3\CMS\Backend\Utility\BackendUtility::getFuncMenu($this->pObj->id, 'SET[ts_browser_toplevel_' . $bType . ']', $this->pObj->MOD_SETTINGS['ts_browser_toplevel_' . $bType], $this->pObj->MOD_MENU['ts_browser_toplevel_' . $bType]);
+                       $menu .= BackendUtility::getFuncMenu($this->pObj->id, 'SET[ts_browser_toplevel_' . $bType . ']', $this->pObj->MOD_SETTINGS['ts_browser_toplevel_' . $bType], $this->pObj->MOD_MENU['ts_browser_toplevel_' . $bType]);
                        //search
                        $menu .= '<label for="search_field">' . $GLOBALS['LANG']->getLL('search') . '</label>';
                        $menu .= '<input type="Text" name="search_field" id="search_field" value="' . htmlspecialchars($POST['search_field']) . '"' . $GLOBALS['TBE_TEMPLATE']->formWidth(20) . '/>';
                        $menu .= '<input type="Submit" name="search" class="tsob-search-submit" value="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_common.xlf:search') . '" />';
-                       $menu .= \TYPO3\CMS\Backend\Utility\BackendUtility::getFuncCheck($this->pObj->id, 'SET[ts_browser_regexsearch]', $this->pObj->MOD_SETTINGS['ts_browser_regexsearch'], '', '', 'id="checkTs_browser_regexsearch"');
+                       $menu .= BackendUtility::getFuncCheck($this->pObj->id, 'SET[ts_browser_regexsearch]', $this->pObj->MOD_SETTINGS['ts_browser_regexsearch'], '', '', 'id="checkTs_browser_regexsearch"');
                        $menu .= '<label for="checkTs_browser_regexsearch">' . $GLOBALS['LANG']->getLL('regExp') . '</label>';
                        $menu .= '</div>';
                        $theOutput .= $this->pObj->doc->section('', '<nobr>' . $menu . '</nobr>');
@@ -400,7 +401,7 @@ class TypoScriptTemplateObjectBrowserModuleFunctionController extends \TYPO3\CMS
                        $urlParameters = array(
                                'id' => $this->pObj->id
                        );
-                       $aHref = \TYPO3\CMS\Backend\Utility\BackendUtility::getModuleUrl('web_ts', $urlParameters);
+                       $aHref = BackendUtility::getModuleUrl('web_ts', $urlParameters);
                        // Parser Errors:
                        $pEkey = $bType == 'setup' ? 'config' : 'constants';
                        if (count($tmpl->parserErrors[$pEkey])) {
@@ -436,15 +437,15 @@ class TypoScriptTemplateObjectBrowserModuleFunctionController extends \TYPO3\CMS
                        ';
                        // second row options
                        $menu = '<div class="tsob-menu-row2">';
-                       $menu .= \TYPO3\CMS\Backend\Utility\BackendUtility::getFuncCheck($this->pObj->id, 'SET[ts_browser_showComments]', $this->pObj->MOD_SETTINGS['ts_browser_showComments'], '', '', 'id="checkTs_browser_showComments"');
+                       $menu .= BackendUtility::getFuncCheck($this->pObj->id, 'SET[ts_browser_showComments]', $this->pObj->MOD_SETTINGS['ts_browser_showComments'], '', '', 'id="checkTs_browser_showComments"');
                        $menu .= '<label for="checkTs_browser_showComments">' . $GLOBALS['LANG']->getLL('displayComments') . '</label>';
-                       $menu .= \TYPO3\CMS\Backend\Utility\BackendUtility::getFuncCheck($this->pObj->id, 'SET[ts_browser_alphaSort]', $this->pObj->MOD_SETTINGS['ts_browser_alphaSort'], '', '', 'id="checkTs_browser_alphaSort"');
+                       $menu .= BackendUtility::getFuncCheck($this->pObj->id, 'SET[ts_browser_alphaSort]', $this->pObj->MOD_SETTINGS['ts_browser_alphaSort'], '', '', 'id="checkTs_browser_alphaSort"');
                        $menu .= '<label for="checkTs_browser_alphaSort">' . $GLOBALS['LANG']->getLL('sortAlphabetically') . '</label>';
-                       $menu .= \TYPO3\CMS\Backend\Utility\BackendUtility::getFuncCheck($this->pObj->id, 'SET[ts_browser_fixedLgd]', $this->pObj->MOD_SETTINGS['ts_browser_fixedLgd'], '', '', 'id="checkTs_browser_fixedLgd"');
+                       $menu .= BackendUtility::getFuncCheck($this->pObj->id, 'SET[ts_browser_fixedLgd]', $this->pObj->MOD_SETTINGS['ts_browser_fixedLgd'], '', '', 'id="checkTs_browser_fixedLgd"');
                        $menu .= '<label for="checkTs_browser_fixedLgd">' . $GLOBALS['LANG']->getLL('cropLines') . '</label>';
                        if ($bType == 'setup' && !$this->pObj->MOD_SETTINGS['ts_browser_fixedLgd']) {
                                $menu .= '<br /><br /><label>' . $GLOBALS['LANG']->getLL('displayConstants') . '</label>';
-                               $menu .= \TYPO3\CMS\Backend\Utility\BackendUtility::getFuncMenu($this->pObj->id, 'SET[ts_browser_const]', $this->pObj->MOD_SETTINGS['ts_browser_const'], $this->pObj->MOD_MENU['ts_browser_const']);
+                               $menu .= BackendUtility::getFuncMenu($this->pObj->id, 'SET[ts_browser_const]', $this->pObj->MOD_SETTINGS['ts_browser_const'], $this->pObj->MOD_MENU['ts_browser_const']);
                        }
                        $menu .= '</div>';
                        $theOutput .= $this->pObj->doc->section($GLOBALS['LANG']->getLL('displayOptions'), '<nobr>' . $menu . '</nobr>', 0, 1);
index 9af4b5a..e241603 100644 (file)
@@ -27,6 +27,8 @@ namespace TYPO3\CMS\Version\DataHandler;
  * This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
 
+use TYPO3\CMS\Backend\Utility\BackendUtility;
+
 /**
  * Handles the \TYPO3\CMS\Core\DataHandling\DataHandler command map and is
  * only used in combination with \TYPO3\CMS\Core\DataHandling\DataHandler
@@ -351,7 +353,7 @@ class CommandMap {
                $elementList = array($table => $liveIds);
                if (\TYPO3\CMS\Core\Utility\GeneralUtility::inList('any,pages', $this->workspacesChangeStageMode)) {
                        if (count($liveIds) === 1) {
-                               $workspaceRecord = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecord($table, $liveIds[0], 't3ver_wsid');
+                               $workspaceRecord = BackendUtility::getRecord($table, $liveIds[0], 't3ver_wsid');
                                $workspaceId = $workspaceRecord['t3ver_wsid'];
                        } else {
                                $workspaceId = $this->getTceMain()->BE_USER->workspace;
@@ -487,7 +489,7 @@ class CommandMap {
                        $id = $this->processCallback($this->getScopeData($scope, self::KEY_PurgeWithErrorMessageGetIdCallback), array($element));
                        $this->remove($table, $id, 'version');
                        $this->getTceMain()->log($table, $id, 5, 0, 1, $this->getScopeData($scope, self::KEY_ScopeErrorMessage), $this->getScopeData($scope, self::KEY_ScopeErrorCode), array(
-                               \TYPO3\CMS\Backend\Utility\BackendUtility::getRecordTitle($table, \TYPO3\CMS\Backend\Utility\BackendUtility::getRecord($table, $id)),
+                               BackendUtility::getRecordTitle($table, BackendUtility::getRecord($table, $id)),
                                $table,
                                $id
                        ));
@@ -698,7 +700,7 @@ class CommandMap {
        public function createNewDependentElementChildReferenceCallback(array $callerArguments, array $targetArgument, \TYPO3\CMS\Version\Dependency\ElementEntity $caller, $eventName) {
                /** @var $reference \TYPO3\CMS\Version\Dependency\ReferenceEntity */
                $reference = $callerArguments['reference'];
-               $fieldCOnfiguration = \TYPO3\CMS\Backend\Utility\BackendUtility::getTcaFieldConfiguration($caller->getTable(), $reference->getField());
+               $fieldCOnfiguration = BackendUtility::getTcaFieldConfiguration($caller->getTable(), $reference->getField());
                if (!$fieldCOnfiguration || !\TYPO3\CMS\Core\Utility\GeneralUtility::inList('field,list', $this->getTceMain()->getInlineFieldType($fieldCOnfiguration))) {
                        return \TYPO3\CMS\Version\Dependency\ElementEntity::RESPONSE_Skip;
                }
@@ -716,7 +718,7 @@ class CommandMap {
        public function createNewDependentElementParentReferenceCallback(array $callerArguments, array $targetArgument, \TYPO3\CMS\Version\Dependency\ElementEntity $caller, $eventName) {
                /** @var $reference \TYPO3\CMS\Version\Dependency\ReferenceEntity */
                $reference = $callerArguments['reference'];
-               $fieldCOnfiguration = \TYPO3\CMS\Backend\Utility\BackendUtility::getTcaFieldConfiguration($reference->getElement()->getTable(), $reference->getField());
+               $fieldCOnfiguration = BackendUtility::getTcaFieldConfiguration($reference->getElement()->getTable(), $reference->getField());
                if (!$fieldCOnfiguration || !\TYPO3\CMS\Core\Utility\GeneralUtility::inList('field,list', $this->getTceMain()->getInlineFieldType($fieldCOnfiguration))) {
                        return \TYPO3\CMS\Version\Dependency\ElementEntity::RESPONSE_Skip;
                }
@@ -778,7 +780,7 @@ class CommandMap {
         */
        public function createNewDependentElementCallback(array $callerArguments, array $targetArgument, \TYPO3\CMS\Version\Dependency\ElementEntity $caller) {
                if ($caller->hasDataValue('liveId') === FALSE) {
-                       $liveId = \TYPO3\CMS\Backend\Utility\BackendUtility::getLiveVersionIdOfRecord($caller->getTable(), $caller->getId());
+                       $liveId = BackendUtility::getLiveVersionIdOfRecord($caller->getTable(), $caller->getId());
                        if (is_null($liveId) === FALSE) {
                                $caller->setDataValue('liveId', $liveId);
                        }
index 5ee1b99..27deb2f 100644 (file)
@@ -26,6 +26,9 @@ namespace TYPO3\CMS\Version\Utility;
  *
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
+
+use TYPO3\CMS\Backend\Utility\BackendUtility;
+
 /**
  * Library with Workspace related functionality
  *
@@ -49,7 +52,7 @@ class WorkspacesUtility {
                        // Define stage to select:
                        $stage = -99;
                        if ($wsid > 0) {
-                               $workspaceRec = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecord('sys_workspace', $wsid);
+                               $workspaceRec = BackendUtility::getRecord('sys_workspace', $wsid);
                                if ($workspaceRec['publish_access'] & 1) {
                                        $stage = 10;
                                }
@@ -92,7 +95,7 @@ class WorkspacesUtility {
                        if ($GLOBALS['TCA'][$table]['ctrl']['versioningWS']) {
                                // Select all records from this table in the database from the workspace
                                // This joins the online version with the offline version as tables A and B
-                               $recs = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('A.uid, A.t3ver_oid, B.pid AS realpid', $table . ' A,' . $table . ' B', 'A.pid=-1' . ($pageId != -1 ? ($table === 'pages' ? ' AND B.uid=' . intval($pageId) : ' AND B.pid=' . intval($pageId)) : '') . ($wsid > -98 ? ' AND A.t3ver_wsid=' . $wsid : ($wsid === -98 ? ' AND A.t3ver_wsid!=0' : '')) . ($filter === 1 ? ' AND A.t3ver_count=0' : ($filter === 2 ? ' AND A.t3ver_count>0' : '')) . ($stage != -99 ? ' AND A.t3ver_stage=' . intval($stage) : '') . ' AND B.pid>=0' . ' AND A.t3ver_oid=B.uid' . \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause($table, 'A') . \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause($table, 'B'), '', 'B.uid');
+                               $recs = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('A.uid, A.t3ver_oid, B.pid AS realpid', $table . ' A,' . $table . ' B', 'A.pid=-1' . ($pageId != -1 ? ($table === 'pages' ? ' AND B.uid=' . intval($pageId) : ' AND B.pid=' . intval($pageId)) : '') . ($wsid > -98 ? ' AND A.t3ver_wsid=' . $wsid : ($wsid === -98 ? ' AND A.t3ver_wsid!=0' : '')) . ($filter === 1 ? ' AND A.t3ver_count=0' : ($filter === 2 ? ' AND A.t3ver_count>0' : '')) . ($stage != -99 ? ' AND A.t3ver_stage=' . intval($stage) : '') . ' AND B.pid>=0' . ' AND A.t3ver_oid=B.uid' . BackendUtility::deleteClause($table, 'A') . BackendUtility::deleteClause($table, 'B'), '', 'B.uid');
                                if (count($recs)) {
                                        $output[$table] = $recs;
                                }
@@ -124,7 +127,7 @@ class WorkspacesUtility {
                $workspaces = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('uid,swap_modes,publish_time,unpublish_time', 'sys_workspace', 'pid=0
                                AND
                                ((publish_time!=0 AND publish_time<=' . intval($GLOBALS['EXEC_TIME']) . ')
-                               OR (publish_time=0 AND unpublish_time!=0 AND unpublish_time<=' . intval($GLOBALS['EXEC_TIME']) . '))' . \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause('sys_workspace'));
+                               OR (publish_time=0 AND unpublish_time!=0 AND unpublish_time<=' . intval($GLOBALS['EXEC_TIME']) . '))' . BackendUtility::deleteClause('sys_workspace'));
                foreach ($workspaces as $rec) {
                        // First, clear start/end time so it doesn't get select once again:
                        $fieldArray = $rec['publish_time'] != 0 ? array('publish_time' => 0) : array('unpublish_time' => 0);
index f6f75e4..bfe88ca 100644 (file)
@@ -25,6 +25,9 @@ namespace TYPO3\CMS\Viewpage\Controller;
  *
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
+
+use TYPO3\CMS\Backend\Utility\BackendUtility;
+
 /**
  * Controller for viewing the frontend
  *
@@ -96,10 +99,10 @@ class ViewModuleController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionContr
         */
        protected function getAdminCommand($pageId) {
                // The page will show only if there is a valid page and if this page may be viewed by the user
-               $pageinfo = \TYPO3\CMS\Backend\Utility\BackendUtility::readPageAccess($pageId, $GLOBALS['BE_USER']->getPagePermsClause(1));
+               $pageinfo = BackendUtility::readPageAccess($pageId, $GLOBALS['BE_USER']->getPagePermsClause(1));
                $addCommand = '';
                if (is_array($pageinfo)) {
-                       $addCommand = '&ADMCMD_view=1&ADMCMD_editIcons=1' . \TYPO3\CMS\Backend\Utility\BackendUtility::ADMCMD_previewCmds($pageinfo);
+                       $addCommand = '&ADMCMD_view=1&ADMCMD_editIcons=1' . BackendUtility::ADMCMD_previewCmds($pageinfo);
                }
                return $addCommand;
        }
@@ -114,7 +117,7 @@ class ViewModuleController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionContr
         */
        protected function getTypeParameterIfSet($pageId) {
                $typeParameter = '';
-               $modTSconfig = \TYPO3\CMS\Backend\Utility\BackendUtility::getModTSconfig($pageId, 'mod.web_view');
+               $modTSconfig = BackendUtility::getModTSconfig($pageId, 'mod.web_view');
                $typeId = intval($modTSconfig['properties']['type']);
                if ($typeId > 0) {
                        $typeParameter = '&type=' . $typeId;
@@ -129,7 +132,7 @@ class ViewModuleController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionContr
         * @return boolean|string Domain name if there is one, FALSE if not
         */
        protected function getDomainName($pageId) {
-               $domain = \TYPO3\CMS\Backend\Utility\BackendUtility::firstDomainRecord(\TYPO3\CMS\Backend\Utility\BackendUtility::BEgetRootLine($pageId));
+               $domain = BackendUtility::firstDomainRecord(BackendUtility::BEgetRootLine($pageId));
                return $domain;
        }
 
index cb9f0d9..c3a6ab1 100644 (file)
@@ -27,6 +27,7 @@ namespace TYPO3\CMS\WizardCrpages\Controller;
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
 
+use TYPO3\CMS\Backend\Utility\BackendUtility;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 
 /**
@@ -84,7 +85,7 @@ class CreatePagesWizardModuleFunctionController extends \TYPO3\CMS\Backend\Modul
        public function main() {
                $GLOBALS['LANG']->includeLLFile('EXT:wizard_crpages/locallang.xlf');
                $theCode = '';
-               $this->tsConfig = \TYPO3\CMS\Backend\Utility\BackendUtility::getPagesTSconfig($this->pObj->id);
+               $this->tsConfig = BackendUtility::getPagesTSconfig($this->pObj->id);
                $this->pagesTsConfig = isset($this->tsConfig['TCEFORM.']['pages.']) ? $this->tsConfig['TCEFORM.']['pages.'] : array();
                // Create loremIpsum code:
                if (\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('lorem_ipsum')) {
@@ -92,7 +93,7 @@ class CreatePagesWizardModuleFunctionController extends \TYPO3\CMS\Backend\Modul
                }
                // Create new pages here?
                $m_perms_clause = $GLOBALS['BE_USER']->getPagePermsClause(8);
-               $pRec = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecord('pages', $this->pObj->id, 'uid', ' AND ' . $m_perms_clause);
+               $pRec = BackendUtility::getRecord('pages', $this->pObj->id, 'uid', ' AND ' . $m_perms_clause);
                $sys_pages = GeneralUtility::makeInstance('TYPO3\\CMS\\Frontend\\Page\\PageRepository');
                $menuItems = $sys_pages->getMenu($this->pObj->id, '*', 'sorting', '', 0);
                if (is_array($pRec)) {
@@ -134,7 +135,7 @@ class CreatePagesWizardModuleFunctionController extends \TYPO3\CMS\Backend\Modul
                                        }
                                        $tce->start($data, array());
                                        $tce->process_datamap();
-                                       \TYPO3\CMS\Backend\Utility\BackendUtility::setUpdateSignal('updatePageTree');
+                                       BackendUtility::setUpdateSignal('updatePageTree');
                                        $flashMessage = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessage', '', $GLOBALS['LANG']->getLL('wiz_newPages_create'));
                                } else {
                                        $flashMessage = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessage', '', $GLOBALS['LANG']->getLL('wiz_newPages_noCreate'), \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR);
@@ -144,9 +145,9 @@ class CreatePagesWizardModuleFunctionController extends \TYPO3\CMS\Backend\Modul
                                $menuItems = $sys_pages->getMenu($this->pObj->id, '*', 'sorting', '', 0);
                                $lines = array();
                                foreach ($menuItems as $rec) {
-                                       \TYPO3\CMS\Backend\Utility\BackendUtility::workspaceOL('pages', $rec);
+                                       BackendUtility::workspaceOL('pages', $rec);
                                        if (is_array($rec)) {
-                                               $lines[] = '<nobr>' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIconForRecord('pages', $rec, array('title' => \TYPO3\CMS\Backend\Utility\BackendUtility::titleAttribForPages($rec, '', FALSE))) . htmlspecialchars(GeneralUtility::fixed_lgd_cs($rec['title'], $GLOBALS['BE_USER']->uc['titleLen'])) . '</nobr>';
+                                               $lines[] = '<nobr>' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIconForRecord('pages', $rec, array('title' => BackendUtility::titleAttribForPages($rec, '', FALSE))) . htmlspecialchars(GeneralUtility::fixed_lgd_cs($rec['title'], $GLOBALS['BE_USER']->uc['titleLen'])) . '</nobr>';
                                        }
                                }
                                $theCode .= '<h4>' . $GLOBALS['LANG']->getLL('wiz_newPages_currentMenu') . '</h4>' . implode('<br />', $lines);
@@ -191,7 +192,7 @@ class CreatePagesWizardModuleFunctionController extends \TYPO3\CMS\Backend\Modul
                        $theCode .= GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessage', '', $GLOBALS['LANG']->getLL('wiz_newPages_errorMsg1'), \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR)->render();
                }
                // CSH
-               $theCode .= \TYPO3\CMS\Backend\Utility\BackendUtility::cshItem('_MOD_web_func', 'tx_wizardcrpages', $GLOBALS['BACK_PATH'], '<br />|');
+               $theCode .= BackendUtility::cshItem('_MOD_web_func', 'tx_wizardcrpages', $GLOBALS['BACK_PATH'], '<br />|');
                $out = $this->pObj->doc->header($GLOBALS['LANG']->getLL('wiz_crMany'));
                $out .= $this->pObj->doc->section('', $theCode, 0, 1);
                return $out;
index 96d62fd..0db8a78 100644 (file)
@@ -27,6 +27,8 @@ namespace TYPO3\CMS\WizardSortpages\View;
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
 
+use TYPO3\CMS\Backend\Utility\BackendUtility;
+
 /**
  * Creates the "Sort pages" wizard
  *
@@ -79,7 +81,7 @@ class SortPagesWizardModuleFunction extends \TYPO3\CMS\Backend\Module\AbstractFu
                                        }
                                        $tce->start(array(), $cmd);
                                        $tce->process_cmdmap();
-                                       \TYPO3\CMS\Backend\Utility\BackendUtility::setUpdateSignal('updatePageTree');
+                                       BackendUtility::setUpdateSignal('updatePageTree');
                                }
                        }
                        $menuItems = $sys_pages->getMenu($this->pObj->id, '*', 'sorting', '', FALSE);
@@ -95,11 +97,11 @@ class SortPagesWizardModuleFunction extends \TYPO3\CMS\Backend\Module\AbstractFu
                                foreach ($menuItems as $rec) {
                                        $m_perms_clause = $GLOBALS['BE_USER']->getPagePermsClause(2);
                                        // edit permissions for that page!
-                                       $pRec = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecord('pages', $rec['uid'], 'uid', ' AND ' . $m_perms_clause);
+                                       $pRec = BackendUtility::getRecord('pages', $rec['uid'], 'uid', ' AND ' . $m_perms_clause);
                                        $lines[] = '<tr><td nowrap="nowrap">' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIconForRecord('pages', $rec) . (!is_array($pRec) ? $GLOBALS['TBE_TEMPLATE']->rfw('<strong>' . $GLOBALS['LANG']->getLL('wiz_W', TRUE) . '</strong> ') : '') . htmlspecialchars(\TYPO3\CMS\Core\Utility\GeneralUtility::fixed_lgd_cs($rec['title'], $GLOBALS['BE_USER']->uc['titleLen'])) . '&nbsp;</td>
                                        ' . (\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('cms') ? '<td nowrap="nowrap">' . htmlspecialchars(\TYPO3\CMS\Core\Utility\GeneralUtility::fixed_lgd_cs($rec['subtitle'], $GLOBALS['BE_USER']->uc['titleLen'])) . '&nbsp;</td>' : '') . '
-                                       <td nowrap="nowrap">' . \TYPO3\CMS\Backend\Utility\BackendUtility::datetime($rec['tstamp']) . '&nbsp;&nbsp;</td>
-                                       <td nowrap="nowrap">' . \TYPO3\CMS\Backend\Utility\BackendUtility::datetime($rec['crdate']) . '&nbsp;&nbsp;</td>
+                                       <td nowrap="nowrap">' . BackendUtility::datetime($rec['tstamp']) . '&nbsp;&nbsp;</td>
+                                       <td nowrap="nowrap">' . BackendUtility::datetime($rec['crdate']) . '&nbsp;&nbsp;</td>
                                        </tr>';
                                }
                                $theCode .= '<h4>' . $GLOBALS['LANG']->getLL('wiz_currentPageOrder', TRUE) . '</h4>
@@ -120,7 +122,7 @@ class SortPagesWizardModuleFunction extends \TYPO3\CMS\Backend\Module\AbstractFu
                                $theCode .= $flashMessage->render();
                        }
                        // CSH:
-                       $theCode .= \TYPO3\CMS\Backend\Utility\BackendUtility::cshItem('_MOD_web_func', 'tx_wizardsortpages', $GLOBALS['BACK_PATH'], '<br />|');
+                       $theCode .= BackendUtility::cshItem('_MOD_web_func', 'tx_wizardsortpages', $GLOBALS['BACK_PATH'], '<br />|');
                        $out .= $this->pObj->doc->section('', $theCode, 0, 1);
                } else {
                        $out .= $this->pObj->doc->section('', 'Sorry, this function is not available in the current draft workspace!', 0, 1, 1);
index 6ce6641..820b00b 100644 (file)
@@ -1,6 +1,5 @@
 <?php
 namespace TYPO3\CMS\Workspaces\Controller;
-use TYPO3\CMS\Core\Utility;
 
 /***************************************************************
  *  Copyright notice
@@ -28,6 +27,8 @@ use TYPO3\CMS\Core\Utility;
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
 
+use TYPO3\CMS\Backend\Utility\BackendUtility;
+use TYPO3\CMS\Core\Utility;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 
 /**
@@ -109,7 +110,7 @@ class PreviewController extends \TYPO3\CMS\Workspaces\Controller\AbstractControl
                        if (in_array($previewWS, array_keys($wsList)) && $activeWorkspace != $previewWS) {
                                $activeWorkspace = $previewWS;
                                $GLOBALS['BE_USER']->setWorkspace($activeWorkspace);
-                               \TYPO3\CMS\Backend\Utility\BackendUtility::setUpdateSignal('updatePageTree');
+                               BackendUtility::setUpdateSignal('updatePageTree');
                        }
                }
                /** @var $uriBuilder \TYPO3\CMS\Extbase\Mvc\Web\Routing\UriBuilder */
@@ -118,7 +119,7 @@ class PreviewController extends \TYPO3\CMS\Workspaces\Controller\AbstractControl
                $wsSettingsUri = $uriBuilder->uriFor('singleIndex', array(), 'TYPO3\\CMS\\Workspaces\\Controller\\ReviewController', 'workspaces', 'web_workspacesworkspaces');
                $wsSettingsParams = '&tx_workspaces_web_workspacesworkspaces[controller]=Review';
                $wsSettingsUrl = $wsSettingsPath . $wsSettingsUri . $wsSettingsParams;
-               $viewDomain = \TYPO3\CMS\Backend\Utility\BackendUtility::getViewDomain($this->pageId);
+               $viewDomain = BackendUtility::getViewDomain($this->pageId);
                $wsBaseUrl = $viewDomain . '/index.php?id=' . $this->pageId . '&L=' . $language;
                // @todo - handle new pages here
                // branchpoints are not handled anymore because this feature is not supposed anymore
@@ -132,7 +133,7 @@ class PreviewController extends \TYPO3\CMS\Workspaces\Controller\AbstractControl
                $this->view->assign('wsUrl', $wsBaseUrl . '&ADMCMD_view=1&ADMCMD_editIcons=1&ADMCMD_previewWS=' . $GLOBALS['BE_USER']->workspace);
                $this->view->assign('wsSettingsUrl', $wsSettingsUrl);
                $this->view->assign('backendDomain', GeneralUtility::getIndpEnv('TYPO3_HOST_ONLY'));
-               $splitPreviewTsConfig = \TYPO3\CMS\Backend\Utility\BackendUtility::getModTSconfig($this->pageId, 'workspaces.splitPreviewModes');
+               $splitPreviewTsConfig = BackendUtility::getModTSconfig($this->pageId, 'workspaces.splitPreviewModes');
                $splitPreviewModes = GeneralUtility::trimExplode(',', $splitPreviewTsConfig['value']);
                $allPreviewModes = array('slider', 'vbox', 'hbox');
                if (!array_intersect($splitPreviewModes, $allPreviewModes)) {
@@ -199,7 +200,7 @@ class PreviewController extends \TYPO3\CMS\Workspaces\Controller\AbstractControl
                $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 = '';
                }
index 28cb858..fc0995e 100644 (file)
@@ -27,6 +27,7 @@ namespace TYPO3\CMS\Workspaces\ExtDirect;
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
 
+use TYPO3\CMS\Backend\Utility\BackendUtility;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 
 /**
@@ -151,7 +152,7 @@ class ActionHandler extends \TYPO3\CMS\Workspaces\ExtDirect\AbstractHandler {
         * @return array
         */
        public function sendToNextStageWindow($uid, $table, $t3ver_oid) {
-               $elementRecord = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecord($table, $uid);
+               $elementRecord = BackendUtility::getRecord($table, $uid);
                if (is_array($elementRecord)) {
                        $stageId = $elementRecord['t3ver_stage'];
                        if ($this->getStageService()->isValid($stageId)) {
@@ -180,7 +181,7 @@ class ActionHandler extends \TYPO3\CMS\Workspaces\ExtDirect\AbstractHandler {
         * @return array
         */
        public function sendToPrevStageWindow($uid, $table) {
-               $elementRecord = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecord($table, $uid);
+               $elementRecord = BackendUtility::getRecord($table, $uid);
                if (is_array($elementRecord)) {
                        $stageId = $elementRecord['t3ver_stage'];
                        if ($this->getStageService()->isValid($stageId)) {
@@ -236,7 +237,7 @@ class ActionHandler extends \TYPO3\CMS\Workspaces\ExtDirect\AbstractHandler {
                }
                $recipients = array();
                foreach ($uidOfRecipients as $userUid) {
-                       $beUserRecord = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecord('be_users', intval($userUid));
+                       $beUserRecord = BackendUtility::getRecord('be_users', intval($userUid));
                        if (is_array($beUserRecord) && $beUserRecord['email'] !== '') {
                                $uc = $beUserRecord['uc'] ? unserialize($beUserRecord['uc']) : array();
                                $recipients[$beUserRecord['email']] = array(
@@ -498,7 +499,7 @@ class ActionHandler extends \TYPO3\CMS\Workspaces\ExtDirect\AbstractHandler {
         * @return array
         */
        protected function getSentToStageWindow($nextStageId) {
-               $workspaceRec = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecord('sys_workspace', $this->getStageService()->getWorkspaceId());
+               $workspaceRec = BackendUtility::getRecord('sys_workspace', $this->getStageService()->getWorkspaceId());
                $showNotificationFields = FALSE;
                $stageTitle = $this->getStageService()->getStageTitle($nextStageId);
                $result = array(
index ec4e927..5099cf8 100644 (file)
@@ -26,6 +26,9 @@ namespace TYPO3\CMS\Workspaces\ExtDirect;
  *
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
+
+use TYPO3\CMS\Backend\Utility\BackendUtility;
+
 /**
  * ExtDirect server
  *
@@ -123,8 +126,8 @@ class ExtDirectServer extends \TYPO3\CMS\Workspaces\ExtDirect\AbstractHandler {
                $t3lib_diff = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Utility\\DiffUtility');
                /** @var $parseObj \TYPO3\CMS\Core\Html\RteHtmlParser */
                $parseObj = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Html\\RteHtmlParser');
-               $liveRecord = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecord($parameter->table, $parameter->t3ver_oid);
-               $versionRecord = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecord($parameter->table, $parameter->uid);
+               $liveRecord = BackendUtility::getRecord($parameter->table, $parameter->t3ver_oid);
+               $versionRecord = BackendUtility::getRecord($parameter->table, $parameter->uid);
                $icon_Live = \TYPO3\CMS\Backend\Utility\IconUtility::mapRecordTypeToSpriteIconClass($parameter->table, $liveRecord);
                $icon_Workspace = \TYPO3\CMS\Backend\Utility\IconUtility::mapRecordTypeToSpriteIconClass($parameter->table, $versionRecord);
                $stagePosition = $this->getStagesService()->getPositionOfCurrentStage($parameter->stage);
@@ -141,7 +144,7 @@ class ExtDirectServer extends \TYPO3\CMS\Workspaces\ExtDirect\AbstractHandler {
                                // call diff class only if there is a difference
                                if (strcmp($liveRecord[$fieldName], $versionRecord[$fieldName]) !== 0) {
                                        // Select the human readable values before diff
-                                       $liveRecord[$fieldName] = \TYPO3\CMS\Backend\Utility\BackendUtility::getProcessedValue(
+                                       $liveRecord[$fieldName] = BackendUtility::getProcessedValue(
                                                $parameter->table,
                                                $fieldName,
                                                $liveRecord[$fieldName],
@@ -150,7 +153,7 @@ class ExtDirectServer extends \TYPO3\CMS\Workspaces\ExtDirect\AbstractHandler {
                                                FALSE,
                                                $liveRecord['uid']
                                        );
-                                       $versionRecord[$fieldName] = \TYPO3\CMS\Backend\Utility\BackendUtility::getProcessedValue(
+                                       $versionRecord[$fieldName] = BackendUtility::getProcessedValue(
                                                $parameter->table,
                                                $fieldName,
                                                $versionRecord[$fieldName],
@@ -160,13 +163,13 @@ class ExtDirectServer extends \TYPO3\CMS\Workspaces\ExtDirect\AbstractHandler {
                                                $versionRecord['uid']
                                        );
                                        // Get the field's label. If not available, use the field name
-                                       $fieldTitle = $GLOBALS['LANG']->sL(\TYPO3\CMS\Backend\Utility\BackendUtility::getItemLabel($parameter->table, $fieldName));
+                                       $fieldTitle = $GLOBALS['LANG']->sL(BackendUtility::getItemLabel($parameter->table, $fieldName));
                                        if (empty($fieldTitle)) {
                                                $fieldTitle = $fieldName;
                                        }
                                        if ($GLOBALS['TCA'][$parameter->table]['columns'][$fieldName]['config']['type'] == 'group' && $GLOBALS['TCA'][$parameter->table]['columns'][$fieldName]['config']['internal_type'] == 'file') {
-                                               $versionThumb = \TYPO3\CMS\Backend\Utility\BackendUtility::thumbCode($versionRecord, $parameter->table, $fieldName, '');
-                                               $liveThumb = \TYPO3\CMS\Backend\Utility\BackendUtility::thumbCode($liveRecord, $parameter->table, $fieldName, '');
+                                               $versionThumb = BackendUtility::thumbCode($versionRecord, $parameter->table, $fieldName, '');
+                                               $liveThumb = BackendUtility::thumbCode($liveRecord, $parameter->table, $fieldName, '');
                                                $diffReturnArray[] = array(
                                                        'field' => $fieldName,
                                                        'label' => $fieldTitle,
@@ -234,11 +237,11 @@ class ExtDirectServer extends \TYPO3\CMS\Workspaces\ExtDirect\AbstractHandler {
                foreach ($sysLogRows as $sysLogRow) {
                        $sysLogEntry = array();
                        $data = unserialize($sysLogRow['log_data']);
-                       $beUserRecord = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecord('be_users', $sysLogRow['userid']);
+                       $beUserRecord = BackendUtility::getRecord('be_users', $sysLogRow['userid']);
                        $sysLogEntry['stage_title'] = $this->getStagesService()->getStageTitle($data['stage']);
                        $sysLogEntry['user_uid'] = $sysLogRow['userid'];
                        $sysLogEntry['user_username'] = is_array($beUserRecord) ? $beUserRecord['username'] : '';
-                       $sysLogEntry['tstamp'] = \TYPO3\CMS\Backend\Utility\BackendUtility::datetime($sysLogRow['tstamp']);
+                       $sysLogEntry['tstamp'] = BackendUtility::datetime($sysLogRow['tstamp']);
                        $sysLogEntry['user_comment'] = $data['comment'];
                        $sysLogReturnArray[] = $sysLogEntry;
                }
index 19b095b..08fbf47 100644 (file)
@@ -26,6 +26,9 @@ namespace TYPO3\CMS\Workspaces\Hook;
  *
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
+
+use TYPO3\CMS\Backend\Utility\BackendUtility;
+
 /**
  * Tcemain service
  *
@@ -77,10 +80,10 @@ class DataHandlerHook {
        protected function resetStageOfElements($stageId) {
                $fields = array('t3ver_stage' => \TYPO3\CMS\Workspaces\Service\StagesService::STAGE_EDIT_ID);
                foreach ($this->getTcaTables() as $tcaTable) {
-                       if (\TYPO3\CMS\Backend\Utility\BackendUtility::isTableWorkspaceEnabled($tcaTable)) {
+                       if (BackendUtility::isTableWorkspaceEnabled($tcaTable)) {
                                $where = 't3ver_stage = ' . intval($stageId);
                                $where .= ' AND t3ver_wsid > 0 AND pid=-1';
-                               $where .= \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause($tcaTable);
+                               $where .= BackendUtility::deleteClause($tcaTable);
                                $GLOBALS['TYPO3_DB']->exec_UPDATEquery($tcaTable, $where, $fields);
                        }
                }
@@ -95,10 +98,10 @@ class DataHandlerHook {
        protected function flushWorkspaceElements($workspaceId) {
                $command = array();
                foreach ($this->getTcaTables() as $tcaTable) {
-                       if (\TYPO3\CMS\Backend\Utility\BackendUtility::isTableWorkspaceEnabled($tcaTable)) {
+                       if (BackendUtility::isTableWorkspaceEnabled($tcaTable)) {
                                $where = '1=1';
-                               $where .= \TYPO3\CMS\Backend\Utility\BackendUtility::getWorkspaceWhereClause($tcaTable, $workspaceId);
-                               $where .= \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause($tcaTable);
+                               $where .= BackendUtility::getWorkspaceWhereClause($tcaTable, $workspaceId);
+                               $where .= BackendUtility::deleteClause($tcaTable);
                                $records = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('uid', $tcaTable, $where, '', '', '', 'uid');
                                if (is_array($records)) {
                                        foreach (array_keys($records) as $recordId) {
index a200580..ff9b6b4 100644 (file)
@@ -26,6 +26,9 @@ namespace TYPO3\CMS\Workspaces\Service;
  *
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
+
+use TYPO3\CMS\Backend\Utility\BackendUtility;
+
 /**
  * Grid data service
  *
@@ -131,8 +134,8 @@ class GridDataService {
                                $isRecordTypeAllowedToModify = $GLOBALS['BE_USER']->check('tables_modify', $table);
 
                                foreach ($records as $record) {
-                                       $origRecord = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecord($table, $record['t3ver_oid']);
-                                       $versionRecord = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecord($table, $record['uid']);
+                                       $origRecord = BackendUtility::getRecord($table, $record['t3ver_oid']);
+                                       $versionRecord = BackendUtility::getRecord($table, $record['uid']);
                                        $combinedRecord = \TYPO3\CMS\Workspaces\Domain\Model\CombinedRecord::createFromArrays($table, $origRecord, $versionRecord);
                                        $this->getIntegrityService()->checkElement($combinedRecord);
 
@@ -147,18 +150,21 @@ class GridDataService {
                                        $versionArray['id'] = $table . ':' . $record['uid'];
                                        $versionArray['uid'] = $record['uid'];
                                        $versionArray['workspace'] = $versionRecord['t3ver_id'];
-                                       $versionArray['label_Workspace'] = htmlspecialchars(\TYPO3\CMS\Backend\Utility\BackendUtility::getRecordTitle($table, $versionRecord));
-                                       $versionArray['label_Live'] = htmlspecialchars(\TYPO3\CMS\Backend\Utility\BackendUtility::getRecordTitle($table, $origRecord));
+                                       $versionArray['label_Workspace'] = htmlspecialchars(
+                                               BackendUtility::getRecordTitle($table, $versionRecord));
+                                       $versionArray['label_Live'] = htmlspecialchars(BackendUtility::getRecordTitle($table, $origRecord));
                                        $versionArray['label_Stage'] = htmlspecialchars($stagesObj->getStageTitle($versionRecord['t3ver_stage']));
                                        $tempStage = $stagesObj->getNextStage($versionRecord['t3ver_stage']);
                                        $versionArray['label_nextStage'] = htmlspecialchars($stagesObj->getStageTitle($tempStage['uid']));
                                        $tempStage = $stagesObj->getPrevStage($versionRecord['t3ver_stage']);
                                        $versionArray['label_prevStage'] = htmlspecialchars($stagesObj->getStageTitle($tempStage['uid']));
-                                       $versionArray['path_Live'] = htmlspecialchars(\TYPO3\CMS\Backend\Utility\BackendUtility::getRecordPath($record['livepid'], '', 999));
-                                       $versionArray['path_Workspace'] = htmlspecialchars(\TYPO3\CMS\Backend\Utility\BackendUtility::getRecordPath($record['wspid'], '', 999));
+                                       $versionArray['path_Live'] = htmlspecialchars(
+                                               BackendUtility::getRecordPath($record['livepid'], '', 999));
+                                       $versionArray['path_Workspace'] = htmlspecialchars(
+                                               BackendUtility::getRecordPath($record['wspid'], '', 999));
                                        $versionArray['workspace_Title'] = htmlspecialchars(\TYPO3\CMS\Workspaces\Service\WorkspaceService::getWorkspaceTitle($versionRecord['t3ver_wsid']));
                                        $versionArray['workspace_Tstamp'] = $versionRecord['tstamp'];
-                                       $versionArray['workspace_Formated_Tstamp'] = \TYPO3\CMS\Backend\Utility\BackendUtility::datetime($versionRecord['tstamp']);
+                                       $versionArray['workspace_Formated_Tstamp'] = BackendUtility::datetime($versionRecord['tstamp']);
                                        $versionArray['t3ver_oid'] = $record['t3ver_oid'];
                                        $versionArray['livepid'] = $record['livepid'];
                                        $versionArray['stage'] = $versionRecord['t3ver_stage'];
@@ -484,7 +490,7 @@ class GridDataService {
         */
        protected function getLanguageValue($table, array $record) {
                $languageValue = 0;
-               if (\TYPO3\CMS\Backend\Utility\BackendUtility::isTableLocalizable($table)) {
+               if (BackendUtility::isTableLocalizable($table)) {
                        $languageField = $GLOBALS['TCA'][$table]['ctrl']['languageField'];
                        if (!empty($record[$languageField])) {
                                $languageValue = $record[$languageField];
index 109478a..c091550 100644 (file)
@@ -26,6 +26,9 @@ namespace TYPO3\CMS\Workspaces\Service;
  *
  * This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
+
+use TYPO3\CMS\Backend\Utility\BackendUtility;
+
 /**
  * Service for history
  *
@@ -52,7 +55,7 @@ class HistoryService implements \TYPO3\CMS\Core\SingletonInterface {
         * Creates this object.
         */
        public function __construct() {
-               $this->backendUserNames = \TYPO3\CMS\Backend\Utility\BackendUtility::getUserNames();
+               $this->backendUserNames = BackendUtility::getUserNames();
        }
 
        /**
@@ -89,7 +92,7 @@ class HistoryService implements \TYPO3\CMS\Core\SingletonInterface {
                        $differences = implode('<br/>', $this->getDifferences($entry));
                }
                return array(
-                       'datetime' => htmlspecialchars(\TYPO3\CMS\Backend\Utility\BackendUtility::datetime($entry['tstamp'])),
+                       'datetime' => htmlspecialchars(BackendUtility::datetime($entry['tstamp'])),
                        'user' => htmlspecialchars($this->getUserName($entry['user'])),
                        'differences' => $differences
                );
@@ -110,7 +113,10 @@ class HistoryService implements \TYPO3\CMS\Core\SingletonInterface {
                        foreach ($fields as $field) {
                                if (!empty($GLOBALS['TCA'][$tableName]['columns'][$field]['config']['type']) && $GLOBALS['TCA'][$tableName]['columns'][$field]['config']['type'] !== 'passthrough') {
                                        // Create diff-result:
-                                       $fieldDifferences = $this->getDifferencesObject()->makeDiffDisplay(\TYPO3\CMS\Backend\Utility\BackendUtility::getProcessedValue($tableName, $field, $entry['oldRecord'][$field], 0, TRUE), \TYPO3\CMS\Backend\Utility\BackendUtility::getProcessedValue($tableName, $field, $entry['newRecord'][$field], 0, TRUE));
+                                       $fieldDifferences = $this->getDifferencesObject()->makeDiffDisplay(
+                                               BackendUtility::getProcessedValue($tableName, $field, $entry['oldRecord'][$field], 0, TRUE),
+                                               BackendUtility::getProcessedValue($tableName, $field, $entry['newRecord'][$field], 0, TRUE)
+                                       );
                                        $differences[] = nl2br($fieldDifferences);
                                }
                        }
index 74d2c90..2a76bb1 100644 (file)
@@ -26,6 +26,9 @@ namespace TYPO3\CMS\Workspaces\Service;
  *
  * This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
+
+use TYPO3\CMS\Backend\Utility\BackendUtility;
+
 /**
  * Service for integrity
  *
@@ -130,17 +133,17 @@ class IntegrityService {
         */
        protected function checkLocalization(\TYPO3\CMS\Workspaces\Domain\Model\CombinedRecord $element) {
                $table = $element->getTable();
-               if (\TYPO3\CMS\Backend\Utility\BackendUtility::isTableLocalizable($table)) {
+               if (BackendUtility::isTableLocalizable($table)) {
                        $languageField = $GLOBALS['TCA'][$table]['ctrl']['languageField'];
                        $languageParentField = $GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField'];
                        $versionRow = $element->getVersionRecord()->getRow();
                        // If element is a localization:
                        if ($versionRow[$languageField] > 0) {
                                // Get localization parent from live workspace:
-                               $languageParentRecord = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecord($table, $versionRow[$languageParentField], 'uid,t3ver_state');
+                               $languageParentRecord = BackendUtility::getRecord($table, $versionRow[$languageParentField], 'uid,t3ver_state');
                                // If localization parent is a "new placeholder" record:
                                if ($languageParentRecord['t3ver_state'] == 1) {
-                                       $title = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecordTitle($table, $versionRow);
+                                       $title = BackendUtility::getRecordTitle($table, $versionRow);
                                        // Add warning for current versionized record:
                                        $this->addIssue($element->getLiveRecord()->getIdentifier(), self::STATUS_Warning, sprintf(\TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate('integrity.dependsOnDefaultLanguageRecord', 'workspaces'), $title));
                                        // Add info for related localization parent record: