[TASK] Replace t3lib occurences in the core 03/39903/2
authorWouter Wolters <typo3@wouterwolters.nl>
Tue, 2 Jun 2015 17:47:18 +0000 (19:47 +0200)
committerMarkus Klein <markus.klein@typo3.org>
Wed, 3 Jun 2015 07:22:09 +0000 (09:22 +0200)
Resolves: #67251
Releases: master
Change-Id: I75dcc244eb3a1abd9d33f04421523b548283b7c1
Reviewed-on: http://review.typo3.org/39903
Reviewed-by: Stephan GroƟberndt <stephan@grossberndt.de>
Reviewed-by: Andreas Fernandez <typo3@scripting-base.de>
Tested-by: Andreas Fernandez <typo3@scripting-base.de>
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Tested-by: Markus Klein <markus.klein@typo3.org>
typo3/sysext/backend/Classes/History/RecordHistory.php
typo3/sysext/backend/Classes/Tree/View/PagePositionMap.php
typo3/sysext/dbal/Documentation/Configuration/Debug/Index.rst
typo3/sysext/dbal/Documentation/Extensions/SqlStandard/Index.rst
typo3/sysext/extbase/Classes/Persistence/Generic/Storage/Typo3DbQueryParser.php
typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php
typo3/sysext/impexp/Classes/ImportExport.php
typo3/sysext/scheduler/Documentation/To-doList/Index.rst
typo3/sysext/version/Classes/Controller/VersionModuleController.php
typo3/sysext/workspaces/Classes/ExtDirect/ExtDirectServer.php

index 152a029..d4a2bd6 100644 (file)
@@ -517,12 +517,12 @@ class RecordHistory {
        public function renderDiff($entry, $table, $rollbackUid = 0) {
                $lines = array();
                if (is_array($entry['newRecord'])) {
-                       $t3lib_diff_Obj = GeneralUtility::makeInstance(\TYPO3\CMS\Core\Utility\DiffUtility::class);
+                       $diffUtility = GeneralUtility::makeInstance(\TYPO3\CMS\Core\Utility\DiffUtility::class);
                        $fieldsToDisplay = array_keys($entry['newRecord']);
                        foreach ($fieldsToDisplay as $fN) {
                                if (is_array($GLOBALS['TCA'][$table]['columns'][$fN]) && $GLOBALS['TCA'][$table]['columns'][$fN]['config']['type'] != 'passthrough') {
                                        // Create diff-result:
-                                       $diffres = $t3lib_diff_Obj->makeDiffDisplay(BackendUtility::getProcessedValue($table, $fN, $entry['oldRecord'][$fN], 0, 1), BackendUtility::getProcessedValue($table, $fN, $entry['newRecord'][$fN], 0, 1));
+                                       $diffres = $diffUtility->makeDiffDisplay(BackendUtility::getProcessedValue($table, $fN, $entry['oldRecord'][$fN], 0, 1), BackendUtility::getProcessedValue($table, $fN, $entry['newRecord'][$fN], 0, 1));
                                        $lines[] = '
                                                <tr class="bgColor4">
                                                ' . ($rollbackUid ? '<td style="width:33px">' . $this->createRollbackLink(($table . ':' . $rollbackUid . ':' . $fN), $GLOBALS['LANG']->getLL('revertField', 1), 2) . '</td>' : '') . '
index 8d82efc..bf81177 100644 (file)
@@ -136,15 +136,15 @@ class PagePositionMap {
        public function positionTree($id, $pageinfo, $perms_clause, $R_URI) {
                $code = '';
                // Make page tree object:
-               /** @var \TYPO3\CMS\Backend\Tree\View\PageTreeView localPageTree */
-               $t3lib_pageTree = GeneralUtility::makeInstance($this->pageTreeClassName);
-               $t3lib_pageTree->init(' AND ' . $perms_clause);
-               $t3lib_pageTree->addField('pid');
+               /** @var \TYPO3\CMS\Backend\Tree\View\PageTreeView $pageTree */
+               $pageTree = GeneralUtility::makeInstance($this->pageTreeClassName);
+               $pageTree->init(' AND ' . $perms_clause);
+               $pageTree->addField('pid');
                // Initialize variables:
                $this->R_URI = $R_URI;
                $this->elUid = $id;
                // Create page tree, in $this->depth levels.
-               $t3lib_pageTree->getTree($pageinfo['pid'], $this->depth);
+               $pageTree->getTree($pageinfo['pid'], $this->depth);
                if (!$this->dontPrintPageInsertIcons) {
                        $code .= $this->JSimgFunc();
                }
@@ -153,23 +153,23 @@ class PagePositionMap {
                $saveLatestUid = array();
                $latestInvDepth = $this->depth;
                // Traverse the tree:
-               foreach ($t3lib_pageTree->tree as $cc => $dat) {
+               foreach ($pageTree->tree as $cc => $dat) {
                        // Make link + parameters.
                        $latestInvDepth = $dat['invertedDepth'];
                        $saveLatestUid[$latestInvDepth] = $dat;
-                       if (isset($t3lib_pageTree->tree[$cc - 1])) {
-                               $prev_dat = $t3lib_pageTree->tree[$cc - 1];
+                       if (isset($pageTree->tree[$cc - 1])) {
+                               $prev_dat = $pageTree->tree[$cc - 1];
                                // If current page, subpage?
                                if ($prev_dat['row']['uid'] == $id) {
                                        // 1) It must be allowed to create a new page and 2) If there are subpages there is no need to render a subpage icon here - it'll be done over the subpages...
-                                       if (!$this->dontPrintPageInsertIcons && $this->checkNewPageInPid($id) && !($prev_dat['invertedDepth'] > $t3lib_pageTree->tree[$cc]['invertedDepth'])) {
+                                       if (!$this->dontPrintPageInsertIcons && $this->checkNewPageInPid($id) && !($prev_dat['invertedDepth'] > $pageTree->tree[$cc]['invertedDepth'])) {
                                                $code .= '<span class="text-nowrap">' . $this->insertQuadLines($dat['blankLineCode']) . '<img src="clear.gif" width="18" height="8" align="top" alt="" />' . '<a href="#" onclick="' . htmlspecialchars($this->onClickEvent($id, $id, 1)) . '">' . '<i class="t3-icon fa fa-long-arrow-left" name="mImgSubpage' . $cc . '" title="' . $this->insertlabel() . '"></i>' . '</a></span><br />';
                                        }
                                }
                                // If going down
-                               if ($prev_dat['invertedDepth'] > $t3lib_pageTree->tree[$cc]['invertedDepth']) {
-                                       $prevPid = $t3lib_pageTree->tree[$cc]['row']['pid'];
-                               } elseif ($prev_dat['invertedDepth'] < $t3lib_pageTree->tree[$cc]['invertedDepth']) {
+                               if ($prev_dat['invertedDepth'] > $pageTree->tree[$cc]['invertedDepth']) {
+                                       $prevPid = $pageTree->tree[$cc]['row']['pid'];
+                               } elseif ($prev_dat['invertedDepth'] < $pageTree->tree[$cc]['invertedDepth']) {
                                        // If going up
                                        // First of all the previous level should have an icon:
                                        if (!$this->dontPrintPageInsertIcons && $this->checkNewPageInPid($prev_dat['row']['pid'])) {
@@ -194,7 +194,7 @@ class PagePositionMap {
                        $code .= $t_code;
                }
                // If the current page was the last in the tree:
-               $prev_dat = end($t3lib_pageTree->tree);
+               $prev_dat = end($pageTree->tree);
                if ($prev_dat['row']['uid'] == $id) {
                        if (!$this->dontPrintPageInsertIcons && $this->checkNewPageInPid($id)) {
                                $code .= '<span class="text-nowrap">' . $this->insertQuadLines($saveLatestUid[$latestInvDepth]['blankLineCode'], 1) . '<img src="clear.gif" width="18" height="8" align="top" alt="" />' . '<a href="#" onclick="' . htmlspecialchars($this->onClickEvent($id, $id, 4)) . '">' . '<i class="t3-icon fa fa-long-arrow-left" name="mImgSubpage' . $cc . '" title="' . $this->insertlabel() . '"></i>' . '</a></span><br />';
index 777957f..15ad818 100644 (file)
@@ -98,7 +98,7 @@ parseQuery
                and match the results. If the parsed and recompiled queries did not
                match they will enter the log table and can subsequently be addressed.
                This will help you to spot "TYPO3 incompatible SQL" (as defined by the
-               core parser of ``t3lib_sqlengine``).
+               core parser of ``\TYPO3\CMS\Dbal\Database\SqlParser``).
 
 
 .. _jointables:
index ebbe724..220c8a9 100644 (file)
@@ -21,7 +21,7 @@ there was a basis for defining a subset of the MySQL features that are
 those officially supported by TYPO3.
 
 Yet, this subset is not defined in a document but there exist a class,
-``t3lib_sqlengine``, which contains parser functions for SQL and
+``\TYPO3\CMS\Dbal\Database\SqlParser``, which contains parser functions for SQL and
 compliance with "TYPO3 sql" is basically defined by whether this class
 can parse your SQL without errors. (The debug-options /DBAL debug
 backend module from this extension can be helpful to spot non-
@@ -45,7 +45,7 @@ the abstraction language:
   occur with *any* abstraction language anyways.
 
 - We are able to parse the SQL and validate conformity with the "TYPO3
-  SQL standard" defined at any time by ``t3lib_sqlengine`` - and we can
+  SQL standard" defined at any time by ``\TYPO3\CMS\Dbal\Database\SqlParser`` - and we can
   always extend it as need arises.
 
 
index 2f93657..a236820 100644 (file)
@@ -590,7 +590,7 @@ class Typo3DbQueryParser implements \TYPO3\CMS\Core\SingletonInterface {
                                // Select all entries for the current language
                                $additionalWhereClause = $tableName . '.' . $GLOBALS['TCA'][$tableName]['ctrl']['languageField'] . ' IN (' . (int)$querySettings->getLanguageUid() . ',-1)';
                                // If any language is set -> get those entries which are not translated yet
-                               // They will be removed by t3lib_page::getRecordOverlay if not matching overlay mode
+                               // They will be removed by \TYPO3\CMS\Frontend\Page\PageRepository::getRecordOverlay if not matching overlay mode
                                if (isset($GLOBALS['TCA'][$tableName]['ctrl']['transOrigPointerField'])
                                        && $querySettings->getLanguageUid() > 0
                                ) {
index f8f1bad..6460d05 100644 (file)
@@ -4670,7 +4670,7 @@ class ContentObjectRenderer {
         * @param array $conf TypoScript properties for "split
         * @return string Compiled result
         * @access private
-        * @see stdWrap(), t3lib_menu::procesItemStates()
+        * @see stdWrap(), \TYPO3\CMS\Frontend\ContentObject\Menu\AbstractMenuContentObject::procesItemStates()
         */
        public function splitObj($value, $conf) {
                $conf['token'] = isset($conf['token.']) ? $this->stdWrap($conf['token'], $conf['token.']) : $conf['token'];
index df617b0..1b72628 100644 (file)
@@ -4110,7 +4110,7 @@ class ImportExport {
        public function compareRecords($databaseRecord, $importRecord, $table, $inverseDiff = FALSE) {
                // Initialize:
                $output = array();
-               $t3lib_diff_Obj = GeneralUtility::makeInstance(\TYPO3\CMS\Core\Utility\DiffUtility::class);
+               $diffUtility = GeneralUtility::makeInstance(\TYPO3\CMS\Core\Utility\DiffUtility::class);
                // Check if both inputs are records:
                if (is_array($databaseRecord) && is_array($importRecord)) {
                        // Traverse based on database record
@@ -4119,7 +4119,7 @@ class ImportExport {
                                        if (isset($importRecord[$fN])) {
                                                if (trim($databaseRecord[$fN]) !== trim($importRecord[$fN])) {
                                                        // Create diff-result:
-                                                       $output[$fN] = $t3lib_diff_Obj->makeDiffDisplay(BackendUtility::getProcessedValue($table, $fN, !$inverseDiff ? $importRecord[$fN] : $databaseRecord[$fN], 0, 1, 1), BackendUtility::getProcessedValue($table, $fN, !$inverseDiff ? $databaseRecord[$fN] : $importRecord[$fN], 0, 1, 1));
+                                                       $output[$fN] = $diffUtility->makeDiffDisplay(BackendUtility::getProcessedValue($table, $fN, !$inverseDiff ? $importRecord[$fN] : $databaseRecord[$fN], 0, 1, 1), BackendUtility::getProcessedValue($table, $fN, !$inverseDiff ? $databaseRecord[$fN] : $importRecord[$fN], 0, 1, 1));
                                                }
                                                unset($importRecord[$fN]);
                                        }
index 6a2a5cb..3d2bd55 100644 (file)
@@ -14,7 +14,7 @@ To-Do list
 
 Here are a few ideas for possible evolutions:
 
-- check the possibility to use t3lib\_syslock instead of serialized
+- check the possibility to use ``\TYPO3\CMS\Core\Locking\Locker`` instead of serialized
   executions to mark running tasks;
 
 - use TCEform to render the edit form, instead of custom code;
index 4038899..347aca9 100644 (file)
@@ -286,7 +286,7 @@ class VersionModuleController extends \TYPO3\CMS\Backend\Module\BaseScriptClass
                                $diff_1_record = BackendUtility::getRecord($this->table, $diff_1);
                                $diff_2_record = BackendUtility::getRecord($this->table, $diff_2);
                                if (is_array($diff_1_record) && is_array($diff_2_record)) {
-                                       $t3lib_diff_Obj = GeneralUtility::makeInstance(\TYPO3\CMS\Core\Utility\DiffUtility::class);
+                                       $diffUtility = GeneralUtility::makeInstance(\TYPO3\CMS\Core\Utility\DiffUtility::class);
                                        $tRows = array();
                                        $tRows[] = '
                                                                        <tr class="bgColor5 tableheader">
@@ -297,7 +297,7 @@ class VersionModuleController extends \TYPO3\CMS\Backend\Module\BaseScriptClass
                                        foreach ($diff_1_record as $fN => $fV) {
                                                if ($GLOBALS['TCA'][$this->table]['columns'][$fN] && $GLOBALS['TCA'][$this->table]['columns'][$fN]['config']['type'] !== 'passthrough' && !GeneralUtility::inList('t3ver_label', $fN)) {
                                                        if ((string)$diff_1_record[$fN] !== (string)$diff_2_record[$fN]) {
-                                                               $diffres = $t3lib_diff_Obj->makeDiffDisplay(BackendUtility::getProcessedValue($this->table, $fN, $diff_2_record[$fN], 0, 1), BackendUtility::getProcessedValue($this->table, $fN, $diff_1_record[$fN], 0, 1));
+                                                               $diffres = $diffUtility->makeDiffDisplay(BackendUtility::getProcessedValue($this->table, $fN, $diff_2_record[$fN], 0, 1), BackendUtility::getProcessedValue($this->table, $fN, $diff_1_record[$fN], 0, 1));
                                                                $tRows[] = '
                                                                        <tr class="bgColor4">
                                                                                <td>' . $fN . '</td>
index aed024c..c1af0cc 100644 (file)
@@ -110,8 +110,8 @@ class ExtDirectServer extends AbstractHandler {
        public function getRowDetails($parameter) {
                $diffReturnArray = array();
                $liveReturnArray = array();
-               /** @var $t3lib_diff \TYPO3\CMS\Core\Utility\DiffUtility */
-               $t3lib_diff = GeneralUtility::makeInstance(\TYPO3\CMS\Core\Utility\DiffUtility::class);
+               /** @var $diffUtility \TYPO3\CMS\Core\Utility\DiffUtility */
+               $diffUtility = GeneralUtility::makeInstance(\TYPO3\CMS\Core\Utility\DiffUtility::class);
                /** @var $parseObj \TYPO3\CMS\Core\Html\RteHtmlParser */
                $parseObj = GeneralUtility::makeInstance(\TYPO3\CMS\Core\Html\RteHtmlParser::class);
                $liveRecord = BackendUtility::getRecord($parameter->table, $parameter->t3ver_oid);
@@ -172,7 +172,7 @@ class ExtDirectServer extends AbstractHandler {
                                                $diffReturnArray[] = array(
                                                        'field' => $fieldName,
                                                        'label' => $fieldTitle,
-                                                       'content' => $t3lib_diff->makeDiffDisplay($liveRecord[$fieldName], $versionRecord[$fieldName])
+                                                       'content' => $diffUtility->makeDiffDisplay($liveRecord[$fieldName], $versionRecord[$fieldName])
                                                );
                                                $liveReturnArray[] = array(
                                                        'field' => $fieldName,
@@ -188,7 +188,7 @@ class ExtDirectServer extends AbstractHandler {
                if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['workspaces']['modifyDifferenceArray'])) {
                        foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['workspaces']['modifyDifferenceArray'] as $className) {
                                $hookObject =& GeneralUtility::getUserObj($className);
-                               $hookObject->modifyDifferenceArray($parameter, $diffReturnArray, $liveReturnArray, $t3lib_diff);
+                               $hookObject->modifyDifferenceArray($parameter, $diffReturnArray, $liveReturnArray, $diffUtility);
                        }
                }
                $commentsForRecord = $this->getCommentsForRecord($parameter->uid, $parameter->table);