[TASK] Update t3lib mentions
authorChristian Kuhn <lolli@schwarzbu.ch>
Thu, 11 Apr 2013 17:52:27 +0000 (19:52 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Thu, 11 Apr 2013 18:27:41 +0000 (20:27 +0200)
Some core parts still mention t3lib classes after namespaces,
mostly in comments.

Related: #47138
Releases: 6.1

Change-Id: Iba3e5a2500b758afe34deb9e6338a8d638328871
Reviewed-on: https://review.typo3.org/19807
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
typo3/sysext/version/Classes/ClickMenu/VersionClickMenu.php
typo3/sysext/version/Classes/Controller/VersionModuleController.php
typo3/sysext/version/Classes/DataHandler/CommandMap.php
typo3/sysext/version/Classes/Hook/DataHandlerHook.php
typo3/sysext/version/Classes/Hook/IconUtilityHook.php
typo3/sysext/version/Classes/Hook/PreviewHook.php

index c029d4d..7f19c64 100644 (file)
@@ -52,16 +52,6 @@ class VersionClickMenu {
                        // "Versioning" element added:
                        $url = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('version') . 'cm1/index.php?table=' . rawurlencode($table) . '&uid=' . $uid;
                        $localItems[] = $backRef->linkItem($GLOBALS['LANG']->getLLL('title', $LL), $backRef->excludeIcon('<img src="' . $backRef->backPath . \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('version') . 'cm1/cm_icon.gif" width="15" height="12" border="0" align="top" alt="" />'), $backRef->urlRefForCM($url), 1);
-                       // "Send to review" element added:
-                       /*
-                       $url = t3lib_extMgm::extRelPath('version').'cm1/index.php?id='.($table=='pages'?$uid:$backRef->rec['pid']).'&table='.rawurlencode($table).'&uid='.$uid.'&sendToReview=1';
-                       $localItems[] = $backRef->linkItem(
-                       $GLOBALS['LANG']->getLLL('title_review', $LL),
-                       $backRef->excludeIcon('<img src="'.$backRef->backPath.t3lib_extMgm::extRelPath('version').'cm1/cm_icon.gif" width="15" height="12" border="0" align="top" alt="" />'),
-                       $backRef->urlRefForCM($url),
-                       1
-                       );
-                        */
                        // Find position of "delete" element:
                        $c = 0;
                        foreach ($menuItems as $k => $value) {
index fc0098c..d7a16d5 100644 (file)
@@ -222,7 +222,6 @@ class VersionModuleController extends \TYPO3\CMS\Backend\Module\BaseScriptClass
                                $this->pageModule = BackendUtility::isModuleSetInTBE_MODULES($newPageModule) ? $newPageModule : 'web_layout';
                                // Setting publish access permission for workspace:
                                $this->publishAccess = $GLOBALS['BE_USER']->workspacePublishAccess($GLOBALS['BE_USER']->workspace);
-                               // Render content:
                                $this->versioningMgm();
                        }
                        $this->content .= $this->doc->spacer(10);
@@ -268,7 +267,6 @@ class VersionModuleController extends \TYPO3\CMS\Backend\Module\BaseScriptClass
                        'shortcut' => ''
                );
                // CSH
-               //$buttons['csh'] = t3lib_BEfunc::cshItem('_MOD_web_txversionM1', '', $GLOBALS['BACK_PATH']);
                if ($this->recordFound && $GLOBALS['TCA'][$this->table]['ctrl']['versioningWS']) {
                        // View page
                        $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.php:labels.showPage', TRUE) . '">' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-document-view') . '</a>';
index 278343f..9af4b5a 100644 (file)
@@ -26,8 +26,10 @@ namespace TYPO3\CMS\Version\DataHandler;
  *
  * This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
+
 /**
- * Handles the t3lib_TCEmain command map and is only used in combination with t3lib_TCEmain.
+ * Handles the \TYPO3\CMS\Core\DataHandling\DataHandler command map and is
+ * only used in combination with \TYPO3\CMS\Core\DataHandling\DataHandler
  */
 class CommandMap {
 
@@ -786,7 +788,7 @@ class CommandMap {
        /**
         * Transforms dependent elements to use the liveId as array key.
         *
-        * @param array $elements Depedent elements, each of type t3lib_utility_Dependency_Element
+        * @param $elements array<\TYPO3\CMS\Version\Dependency\ElementEntity>
         * @return array
         */
        protected function transformDependentElementsToUseLiveId(array $elements) {
index 0cb3be5..ad10d8d 100644 (file)
@@ -264,8 +264,8 @@ class DataHandlerHook {
        }
 
        /**
-        * hook for t3lib_TCEmain::moveRecord that cares about moving records that
-        * are *not* in the live workspace
+        * Hook for \TYPO3\CMS\Core\DataHandling\DataHandler::moveRecord that cares about
+        * moving records that are *not* in the live workspace
         *
         * @param string $table the table of the record
         * @param integer $id the ID of the record
@@ -333,7 +333,7 @@ class DataHandlerHook {
        /**
         * Send an email notification to users in workspace
         *
-        * @param array $stat Workspace access array (from t3lib_userauthgroup::checkWorkspace())
+        * @param array $stat Workspace access array from \TYPO3\CMS\Core\Authentication\BackendUserAuthentication::checkWorkspace()
         * @param integer $stageId New Stage number: 0 = editing, 1= just ready for review, 10 = ready for publication, -1 = rejected!
         * @param string $table Table name of element (or list of element names if $id is zero)
         * @param integer $id Record uid of element (if zero, then $table is used as reference to element(s) alone)
@@ -738,7 +738,7 @@ class DataHandlerHook {
                                                                                // In case of swapping and the offline record has a state
                                                                                // (like 2 or 4 for deleting or move-pointer) we set the
                                                                                // current workspace ID so the record is not deselected
-                                                                               // in the interface by t3lib_BEfunc::versioningPlaceholderClause()
+                                                                               // in the interface by \TYPO3\CMS\Backend\Utility\BackendUtility::versioningPlaceholderClause()
                                                                                $swapVersion['t3ver_wsid'] = 0;
                                                                                if ($swapIntoWS) {
                                                                                        if ($t3ver_state['swapVersion'] > 0) {
@@ -1125,7 +1125,7 @@ class DataHandlerHook {
                        while (FALSE !== ($row = $GLOBALS['TYPO3_DB']->sql_fetch_row($res))) {
                                $pageIdList[] = $row[0];
                                // Find ws version
-                               // Note: cannot use t3lib_BEfunc::getRecordWSOL()
+                               // Note: cannot use \TYPO3\CMS\Backend\Utility\BackendUtility::getRecordWSOL()
                                // here because it does not accept workspace id!
                                $rec = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecord('pages', $row[0]);
                                \TYPO3\CMS\Backend\Utility\BackendUtility::workspaceOL('pages', $rec, $workspaceId);
@@ -1262,7 +1262,7 @@ class DataHandlerHook {
         * Gets an instance of the command map helper.
         *
         * @param \TYPO3\CMS\Core\DataHandling\DataHandler $tceMain TCEmain object
-        * @param array $commandMap The command map as submitted to t3lib_TCEmain
+        * @param array $commandMap The command map as submitted to \TYPO3\CMS\Core\DataHandling\DataHandler
         * @return \TYPO3\CMS\Version\DataHandler\CommandMap
         */
        public function getCommandMap(\TYPO3\CMS\Core\DataHandling\DataHandler $tceMain, array $commandMap) {
index 2c0e79d..ca781c8 100644 (file)
@@ -27,8 +27,9 @@ namespace TYPO3\CMS\Version\Hook;
  *
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
+
 /**
- * Implements a hook for t3lib_iconworks
+ * Implements a hook for \TYPO3\CMS\Backend\Utility\IconUtility
  */
 class IconUtilityHook {
 
index 8b295ea..1c68323 100644 (file)
@@ -129,7 +129,6 @@ class PreviewHook implements \TYPO3\CMS\Core\SingletonInterface {
         * This can also be used to generate previews of hidden pages, start/endtimes, usergroups and those other settings from the Admin Panel - just not implemented yet.
         *
         * @return      array           Preview configuration array from sys_preview record.
-        * @previouslyknownas TSFE->ADMCMD_preview
         */
        public function getPreviewConfiguration() {
                $inputCode = $this->getPreviewInputCode();
@@ -216,7 +215,7 @@ class PreviewHook implements \TYPO3\CMS\Core\SingletonInterface {
 
        /**
         * Set preview keyword, eg:
-        * $previewUrl = t3lib_div::getIndpEnv('TYPO3_SITE_URL').'index.php?ADMCMD_prev='.$this->compilePreviewKeyword('id='.$pageId.'&L='.$language.'&ADMCMD_view=1&ADMCMD_editIcons=1&ADMCMD_previewWS='.$this->workspace, $GLOBALS['BE_USER']->user['uid'], 120);
+        * $previewUrl = \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_SITE_URL').'index.php?ADMCMD_prev='.$this->compilePreviewKeyword('id='.$pageId.'&L='.$language.'&ADMCMD_view=1&ADMCMD_editIcons=1&ADMCMD_previewWS='.$this->workspace, $GLOBALS['BE_USER']->user['uid'], 120);
         *
         * todo for sys_preview:
         * - Add a comment which can be shown to previewer in frontend in some way (plus maybe ability to write back, take other action?)