[TASK] Namespace classes
authorThomas Maroschik <tmaroschik@dfau.de>
Wed, 17 Oct 2012 19:58:25 +0000 (21:58 +0200)
committerThomas Maroschik <tmaroschik@dfau.de>
Wed, 17 Oct 2012 19:58:25 +0000 (21:58 +0200)
Change-Id: Ib6bbe85fb2189c918f73d63034dd308e03d96d90

28 files changed:
typo3/sysext/version/Classes/ClickMenu/VersionClickMenu.php
typo3/sysext/version/Classes/Controller/VersionModuleController.php
typo3/sysext/version/Classes/Controller/WorkspaceModuleController.php
typo3/sysext/version/Classes/DataHandler/CommandMap.php
typo3/sysext/version/Classes/Dependency/DependencyEntityFactory.php
typo3/sysext/version/Classes/Dependency/DependencyResolver.php
typo3/sysext/version/Classes/Dependency/ElementEntity.php
typo3/sysext/version/Classes/Dependency/EventCallback.php
typo3/sysext/version/Classes/Dependency/ReferenceEntity.php
typo3/sysext/version/Classes/Hook/DataHandlerHook.php
typo3/sysext/version/Classes/Hook/IconUtilityHook.php
typo3/sysext/version/Classes/Hook/PreviewHook.php
typo3/sysext/version/Classes/Preview.php
typo3/sysext/version/Classes/Task/AutoPublishTask.php
typo3/sysext/version/Classes/Utility/WorkspacesUtility.php
typo3/sysext/version/Classes/View/VersionView.php
typo3/sysext/version/class.tx_version_cm1.php
typo3/sysext/version/class.tx_version_gui.php
typo3/sysext/version/class.tx_version_iconworks.php
typo3/sysext/version/class.tx_version_tcemain.php
typo3/sysext/version/class.tx_version_tcemain_commandmap.php
typo3/sysext/version/cm1/index.php
typo3/sysext/version/ext_autoload.php
typo3/sysext/version/ext_localconf.php
typo3/sysext/version/ext_tables.php
typo3/sysext/version/tasks/class.tx_version_tasks_autopublish.php
typo3/sysext/version/ws/class.wslib.php
typo3/sysext/version/ws/index.php

index 150eb1d..6871c99 100644 (file)
@@ -1,4 +1,6 @@
 <?php
+namespace TYPO3\CMS\Version\ClickMenu;
+
 /***************************************************************
  *  Copyright notice
  *
@@ -28,7 +30,7 @@
  * @package TYPO3
  * @subpackage core
  */
-class tx_version_cm1 {
+class VersionModuleController {
 
        /**
         * Main function, adding the item to input menuItems array
@@ -50,8 +52,8 @@ class tx_version_cm1 {
                        // Adds the regular item
                        $LL = $this->includeLL();
                        // "Versioning" element added:
-                       $url = (((t3lib_extMgm::extRelPath('version') . 'cm1/index.php?table=') . rawurlencode($table)) . '&uid=') . $uid;
-                       $localItems[] = $backRef->linkItem($GLOBALS['LANG']->getLLL('title', $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);
+                       $url = (((\TYPO3\CMS\Core\Extension\ExtensionManager::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\Extension\ExtensionManager::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';
@@ -90,4 +92,5 @@ class tx_version_cm1 {
 
 }
 
+
 ?>
\ No newline at end of file
index 150eb1d..6871c99 100644 (file)
@@ -1,4 +1,6 @@
 <?php
+namespace TYPO3\CMS\Version\ClickMenu;
+
 /***************************************************************
  *  Copyright notice
  *
@@ -28,7 +30,7 @@
  * @package TYPO3
  * @subpackage core
  */
-class tx_version_cm1 {
+class VersionModuleController {
 
        /**
         * Main function, adding the item to input menuItems array
@@ -50,8 +52,8 @@ class tx_version_cm1 {
                        // Adds the regular item
                        $LL = $this->includeLL();
                        // "Versioning" element added:
-                       $url = (((t3lib_extMgm::extRelPath('version') . 'cm1/index.php?table=') . rawurlencode($table)) . '&uid=') . $uid;
-                       $localItems[] = $backRef->linkItem($GLOBALS['LANG']->getLLL('title', $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);
+                       $url = (((\TYPO3\CMS\Core\Extension\ExtensionManager::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\Extension\ExtensionManager::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';
@@ -90,4 +92,5 @@ class tx_version_cm1 {
 
 }
 
+
 ?>
\ No newline at end of file
index cab2a9a..274e1f2 100644 (file)
@@ -1,4 +1,6 @@
 <?php
+namespace TYPO3\CMS\Version\Controller;
+
 /**
  * Module: Workspace manager
  *
@@ -6,7 +8,7 @@
  * @package TYPO3
  * @subpackage core
  */
-class SC_mod_user_ws_index extends t3lib_SCbase {
+class WorkspaceModuleController extends \TYPO3\CMS\Backend\Module\BaseScriptClass {
 
        // Default variables for backend modules
        /**
@@ -30,7 +32,7 @@ class SC_mod_user_ws_index extends t3lib_SCbase {
        /**
         * Document Template Object
         *
-        * @var noDoc
+        * @var \TYPO3\CMS\Backend\Template\StandardDocumentTemplate
         * @todo Define visibility
         */
        public $doc;
@@ -109,7 +111,7 @@ class SC_mod_user_ws_index extends t3lib_SCbase {
                // Add workspaces:
                if ($GLOBALS['BE_USER']->workspace === 0) {
                        // Spend time on this only in online workspace because it might take time:
-                       $workspaces = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('uid,title,adminusers,members,reviewers', 'sys_workspace', 'pid = 0' . t3lib_BEfunc::deleteClause('sys_workspace'), '', 'title');
+                       $workspaces = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('uid,title,adminusers,members,reviewers', 'sys_workspace', 'pid = 0' . \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause('sys_workspace'), '', 'title');
                        foreach ($workspaces as $rec) {
                                if ($GLOBALS['BE_USER']->checkWorkspace($rec)) {
                                        $this->MOD_MENU['display'][$rec['uid']] = (('[' . $rec['uid']) . '] ') . htmlspecialchars($rec['title']);
@@ -117,7 +119,7 @@ class SC_mod_user_ws_index extends t3lib_SCbase {
                        }
                }
                // CLEANSE SETTINGS
-               $this->MOD_SETTINGS = t3lib_BEfunc::getModuleData($this->MOD_MENU, t3lib_div::_GP('SET'), $this->MCONF['name'], 'ses');
+               $this->MOD_SETTINGS = \TYPO3\CMS\Backend\Utility\BackendUtility::getModuleData($this->MOD_MENU, \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('SET'), $this->MCONF['name'], 'ses');
        }
 
        /**
@@ -126,13 +128,13 @@ class SC_mod_user_ws_index extends t3lib_SCbase {
         * @todo Define visibility
         */
        public function execute() {
-               $post = t3lib_div::_POST();
+               $post = \TYPO3\CMS\Core\Utility\GeneralUtility::_POST();
                if ($post['_with_selected_do']) {
                        if (is_array($post['items']) && count($post['items'])) {
                                $cmdArray = array();
                                foreach ($post['items'] as $item => $v) {
                                        list($table, $uid) = explode(':', $item, 2);
-                                       if ($GLOBALS['TCA'][$table] && t3lib_utility_Math::canBeInterpretedAsInteger($uid)) {
+                                       if ($GLOBALS['TCA'][$table] && \TYPO3\CMS\Core\Utility\MathUtility::canBeInterpretedAsInteger($uid)) {
                                                switch ($post['_with_selected_do']) {
                                                case 'stage_-1':
                                                        $cmdArray[$table][$uid]['version']['action'] = 'setStage';
@@ -151,13 +153,13 @@ class SC_mod_user_ws_index extends t3lib_SCbase {
                                                        $cmdArray[$table][$uid]['version']['stageId'] = 10;
                                                        break;
                                                case 'publish':
-                                                       if ($onlineRec = t3lib_BEfunc::getLiveVersionOfRecord($table, $uid, 'uid')) {
+                                                       if ($onlineRec = \TYPO3\CMS\Backend\Utility\BackendUtility::getLiveVersionOfRecord($table, $uid, 'uid')) {
                                                                $cmdArray[$table][$onlineRec['uid']]['version']['action'] = 'swap';
                                                                $cmdArray[$table][$onlineRec['uid']]['version']['swapWith'] = $uid;
                                                        }
                                                        break;
                                                case 'swap':
-                                                       if ($onlineRec = t3lib_BEfunc::getLiveVersionOfRecord($table, $uid, 'uid')) {
+                                                       if ($onlineRec = \TYPO3\CMS\Backend\Utility\BackendUtility::getLiveVersionOfRecord($table, $uid, 'uid')) {
                                                                $cmdArray[$table][$onlineRec['uid']]['version']['action'] = 'swap';
                                                                $cmdArray[$table][$onlineRec['uid']]['version']['swapWith'] = $uid;
                                                                $cmdArray[$table][$onlineRec['uid']]['version']['swapIntoWS'] = 1;
@@ -172,8 +174,8 @@ class SC_mod_user_ws_index extends t3lib_SCbase {
                                                }
                                        }
                                }
-                               /** @var $tce t3lib_TCEmain */
-                               $tce = t3lib_div::makeInstance('t3lib_TCEmain');
+                               /** @var $tce \TYPO3\CMS\Core\DataHandler\DataHandler */
+                               $tce = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\DataHandler\\DataHandler');
                                $tce->stripslashes_values = 0;
                                $tce->start(array(), $cmdArray);
                                $tce->process_cmdmap();
@@ -192,7 +194,7 @@ class SC_mod_user_ws_index extends t3lib_SCbase {
                // Setting module configuration:
                $this->MCONF = $GLOBALS['MCONF'];
                // Initialize Document Template object:
-               $this->doc = t3lib_div::makeInstance('template');
+               $this->doc = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Template\\DocumentTemplate');
                $this->doc->backPath = $GLOBALS['BACK_PATH'];
                $this->doc->setModuleTemplate('templates/ws.html');
                // JavaScript
@@ -234,21 +236,21 @@ class SC_mod_user_ws_index extends t3lib_SCbase {
         */
        public function main() {
                // See if we need to switch workspace
-               $changeWorkspace = t3lib_div::_GET('changeWorkspace');
+               $changeWorkspace = \TYPO3\CMS\Core\Utility\GeneralUtility::_GET('changeWorkspace');
                if ($changeWorkspace != '') {
                        $GLOBALS['BE_USER']->setWorkspace($changeWorkspace);
-                       $this->content .= $this->doc->wrapScriptTags((('top.location.href="' . $GLOBALS['BACK_PATH']) . t3lib_BEfunc::getBackendScript()) . '";');
+                       $this->content .= $this->doc->wrapScriptTags((('top.location.href="' . $GLOBALS['BACK_PATH']) . \TYPO3\CMS\Backend\Utility\BackendUtility::getBackendScript()) . '";');
                } else {
                        // Starting page:
                        $this->content .= $this->doc->header($GLOBALS['LANG']->getLL('title'));
                        $this->content .= $this->doc->spacer(5);
                        // Get usernames and groupnames
-                       $be_group_Array = t3lib_BEfunc::getListGroupNames('title,uid');
+                       $be_group_Array = \TYPO3\CMS\Backend\Utility\BackendUtility::getListGroupNames('title,uid');
                        $groupArray = array_keys($be_group_Array);
                        // Need 'admin' field for t3lib_iconWorks::getIconImage()
-                       $this->be_user_Array_full = ($this->be_user_Array = t3lib_BEfunc::getUserNames('username,usergroup,usergroup_cached_list,uid,admin,workspace_perms'));
+                       $this->be_user_Array_full = ($this->be_user_Array = \TYPO3\CMS\Backend\Utility\BackendUtility::getUserNames('username,usergroup,usergroup_cached_list,uid,admin,workspace_perms'));
                        if (!$GLOBALS['BE_USER']->isAdmin()) {
-                               $this->be_user_Array = t3lib_BEfunc::blindUserNames($this->be_user_Array, $groupArray, 1);
+                               $this->be_user_Array = \TYPO3\CMS\Backend\Utility\BackendUtility::blindUserNames($this->be_user_Array, $groupArray, 1);
                        }
                        // Build top menu:
                        $menuItems = array();
@@ -296,7 +298,7 @@ class SC_mod_user_ws_index extends t3lib_SCbase {
                $newWkspUrl = 'workspaceforms.php?action=new';
                // workspace creation link
                if ($GLOBALS['BE_USER']->isAdmin() || 0 != ($GLOBALS['BE_USER']->groupData['workspace_perms'] & 4)) {
-                       $buttons['new_record'] = ((((((('<a href="' . $newWkspUrl) . '">') . '<img ') . t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'], 'gfx/add_workspaces.gif')) . ' alt="') . $GLOBALS['LANG']->getLL('img_title_create_new_workspace')) . '" id="ver-wl-new-workspace-icon" />') . '</a>';
+                       $buttons['new_record'] = ((((((('<a href="' . $newWkspUrl) . '">') . '<img ') . \TYPO3\CMS\Backend\Utility\IconUtility::skinImg($GLOBALS['BACK_PATH'], 'gfx/add_workspaces.gif')) . ' alt="') . $GLOBALS['LANG']->getLL('img_title_create_new_workspace')) . '" id="ver-wl-new-workspace-icon" />') . '</a>';
                }
                return $buttons;
        }
@@ -315,27 +317,27 @@ class SC_mod_user_ws_index extends t3lib_SCbase {
        public function moduleContent_publish() {
                // Initialize:
                $content = '';
-               $details = t3lib_div::_GP('details');
+               $details = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('details');
                // Create additional menus:
                $menu = '';
                if ($GLOBALS['BE_USER']->workspace === 0) {
-                       $menu .= t3lib_BEfunc::getFuncMenu(0, 'SET[filter]', $this->MOD_SETTINGS['filter'], $this->MOD_MENU['filter']);
-                       $menu .= t3lib_BEfunc::getFuncMenu(0, 'SET[display]', $this->MOD_SETTINGS['display'], $this->MOD_MENU['display']);
+                       $menu .= \TYPO3\CMS\Backend\Utility\BackendUtility::getFuncMenu(0, 'SET[filter]', $this->MOD_SETTINGS['filter'], $this->MOD_MENU['filter']);
+                       $menu .= \TYPO3\CMS\Backend\Utility\BackendUtility::getFuncMenu(0, 'SET[display]', $this->MOD_SETTINGS['display'], $this->MOD_MENU['display']);
                }
-               $menu .= t3lib_BEfunc::getFuncMenu(0, 'SET[diff]', $this->MOD_SETTINGS['diff'], $this->MOD_MENU['diff']);
+               $menu .= \TYPO3\CMS\Backend\Utility\BackendUtility::getFuncMenu(0, 'SET[diff]', $this->MOD_SETTINGS['diff'], $this->MOD_MENU['diff']);
                if ($GLOBALS['BE_USER']->workspace !== 0) {
-                       $menu .= ((t3lib_BEfunc::getFuncCheck(0, 'SET[expandSubElements]', $this->MOD_SETTINGS['expandSubElements'], '', '', 'id="checkExpandSubElements"') . ' <label for="checkExpandSubElements">') . $GLOBALS['LANG']->getLL('label_showsubelements')) . '</label> ';
+                       $menu .= ((\TYPO3\CMS\Backend\Utility\BackendUtility::getFuncCheck(0, 'SET[expandSubElements]', $this->MOD_SETTINGS['expandSubElements'], '', '', 'id="checkExpandSubElements"') . ' <label for="checkExpandSubElements">') . $GLOBALS['LANG']->getLL('label_showsubelements')) . '</label> ';
                }
                // Create header:
                $title = '';
                $description = '';
                switch ($GLOBALS['BE_USER']->workspace) {
                case 0:
-                       $title = ((t3lib_iconWorks::getIconImage('sys_workspace', array(), $this->doc->backPath, ' align="top"') . '[') . $GLOBALS['LANG']->getLL('shortcut_onlineWS')) . ']';
+                       $title = ((\TYPO3\CMS\Backend\Utility\IconUtility::getIconImage('sys_workspace', array(), $this->doc->backPath, ' align="top"') . '[') . $GLOBALS['LANG']->getLL('shortcut_onlineWS')) . ']';
                        $description = $GLOBALS['LANG']->getLL('workspace_description_live');
                        break;
                case -1:
-                       $title = ((t3lib_iconWorks::getIconImage('sys_workspace', array(), $this->doc->backPath, ' align="top"') . '[') . $GLOBALS['LANG']->getLL('shortcut_offlineWS')) . ']';
+                       $title = ((\TYPO3\CMS\Backend\Utility\IconUtility::getIconImage('sys_workspace', array(), $this->doc->backPath, ' align="top"') . '[') . $GLOBALS['LANG']->getLL('shortcut_offlineWS')) . ']';
                        $description = $GLOBALS['LANG']->getLL('workspace_description_draft');
                        break;
                case -99:
@@ -343,7 +345,7 @@ class SC_mod_user_ws_index extends t3lib_SCbase {
                        $description = $GLOBALS['LANG']->getLL('workspace_description_no_access');
                        break;
                default:
-                       $title = (((t3lib_iconWorks::getIconImage('sys_workspace', $GLOBALS['BE_USER']->workspaceRec, $this->doc->backPath, ' align="top"') . '[') . $GLOBALS['BE_USER']->workspace) . '] ') . t3lib_BEfunc::getRecordTitle('sys_workspace', $GLOBALS['BE_USER']->workspaceRec, TRUE);
+                       $title = (((\TYPO3\CMS\Backend\Utility\IconUtility::getIconImage('sys_workspace', $GLOBALS['BE_USER']->workspaceRec, $this->doc->backPath, ' align="top"') . '[') . $GLOBALS['BE_USER']->workspace) . '] ') . \TYPO3\CMS\Backend\Utility\BackendUtility::getRecordTitle('sys_workspace', $GLOBALS['BE_USER']->workspaceRec, TRUE);
                        $description = $GLOBALS['BE_USER']->workspaceRec['description'];
                        break;
                }
@@ -361,10 +363,10 @@ class SC_mod_user_ws_index extends t3lib_SCbase {
                                $actionLinks .= $this->doc->icons(1) . $GLOBALS['LANG']->getLL('no_publish_permission');
                        }
                        // Preview of workspace link
-                       if (t3lib_div::_POST('_previewLink')) {
+                       if (\TYPO3\CMS\Core\Utility\GeneralUtility::_POST('_previewLink')) {
                                $ttlHours = intval($GLOBALS['BE_USER']->getTSConfigVal('options.workspaces.previewLinkTTLHours'));
                                $ttlHours = $ttlHours ? $ttlHours : 24 * 2;
-                               $previewUrl = (((t3lib_BEfunc::getViewDomain($this->id) . '/index.php?ADMCMD_prev=') . t3lib_BEfunc::compilePreviewKeyword('', $GLOBALS['BE_USER']->user['uid'], (60 * 60) * $ttlHours, $GLOBALS['BE_USER']->workspace)) . '&id=') . intval($GLOBALS['BE_USER']->workspaceRec['db_mountpoints']);
+                               $previewUrl = (((\TYPO3\CMS\Backend\Utility\BackendUtility::getViewDomain($this->id) . '/index.php?ADMCMD_prev=') . \TYPO3\CMS\Backend\Utility\BackendUtility::compilePreviewKeyword('', $GLOBALS['BE_USER']->user['uid'], (60 * 60) * $ttlHours, $GLOBALS['BE_USER']->workspace)) . '&id=') . intval($GLOBALS['BE_USER']->workspaceRec['db_mountpoints']);
                                $actionLinks .= ((((('<br />Any user can browse the workspace frontend using this link for the next ' . $ttlHours) . ' hours (does not require backend login):<br /><br /><a target="_blank" href="') . htmlspecialchars($previewUrl)) . '">') . $previewUrl) . '</a>';
                        } else {
                                $actionLinks .= '<input type="submit" name="_previewLink" value="Generate Workspace Preview Link" />';
@@ -434,7 +436,7 @@ class SC_mod_user_ws_index extends t3lib_SCbase {
                        $filter = 0;
                }
                // Instantiate workspace GUI library and generate workspace overview
-               $wslibGuiObj = t3lib_div::makeInstance('wslib_gui');
+               $wslibGuiObj = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Version\\Utility\\WorkspacesUtility_gui');
                $wslibGuiObj->diff = $this->MOD_SETTINGS['diff'];
                $wslibGuiObj->expandSubElements = $this->MOD_SETTINGS['expandSubElements'];
                $wslibGuiObj->alwaysDisplayHeader = TRUE;
@@ -483,7 +485,7 @@ class SC_mod_user_ws_index extends t3lib_SCbase {
                        // Start first row
                        $content .= ('<tr class="' . $cssClass) . '">';
                        // row #1, column #1: expand icon
-                       $content .= (((('<td>' . '<a href="javascript:expandCollapse(') . $rowNum) . ')">') . t3lib_iconWorks::getSpriteIcon('actions-view-table-expand', array(
+                       $content .= (((('<td>' . '<a href="javascript:expandCollapse(') . $rowNum) . ')">') . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-view-table-expand', array(
                                'title' => $GLOBALS['LANG']->getLL('img_title_show_more'),
                                'id' => ('spanw1_' . $rowNum)
                        ))) . '</a></td>';
@@ -495,7 +497,7 @@ class SC_mod_user_ws_index extends t3lib_SCbase {
                        // row #1, column #3: current workspace indicator
                        $content .= '<td nowrap="nowrap" style="text-align: center">';
                        // Mozilla Firefox will attempt wrap due to `width="1"` on topmost column
-                       $content .= !$currentWksp ? '&nbsp;' : ((((('<img ' . t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'], 'gfx/icon_ok.gif', 'width="18" height="16"')) . ' id="wl_') . $rowNum) . 'i" border="0" hspace="1" alt="') . $GLOBALS['LANG']->getLL('img_title_current_workspace')) . '" />';
+                       $content .= !$currentWksp ? '&nbsp;' : ((((('<img ' . \TYPO3\CMS\Backend\Utility\IconUtility::skinImg($GLOBALS['BACK_PATH'], 'gfx/icon_ok.gif', 'width="18" height="16"')) . ' id="wl_') . $rowNum) . 'i" border="0" hspace="1" alt="') . $GLOBALS['LANG']->getLL('img_title_current_workspace')) . '" />';
                        $content .= '</td>';
                        // row #1, column #4 and 5: title and description
                        $content .= (((('<td nowrap="nowrap">' . htmlspecialchars($wksp['title'])) . '</td>') . '<td>') . nl2br(htmlspecialchars($wksp['description']))) . '</td>';
@@ -520,7 +522,7 @@ class SC_mod_user_ws_index extends t3lib_SCbase {
         */
        public function workspaceList_getUserWorkspaceList() {
                // Get list of all workspaces. Note: system workspaces will be always displayed before custom ones!
-               $workspaces = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('*', 'sys_workspace', 'pid=0' . t3lib_BEfunc::deleteClause('sys_workspace'), '', 'title');
+               $workspaces = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('*', 'sys_workspace', 'pid=0' . \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause('sys_workspace'), '', 'title');
                $availableWorkspaces = array();
                // Live
                $wksp = $this->workspaceList_createFakeWorkspaceRecord(0);
@@ -558,7 +560,7 @@ class SC_mod_user_ws_index extends t3lib_SCbase {
                $content = ((((((((((('<table cellspacing="0" cellpadding="0" width="100%" class="ver-wl-details-table">' . '<tr><td class="ver-wl-details-label"><strong>') . $GLOBALS['LANG']->getLL('workspace_list_label_file_mountpoints')) . '</strong></td>') . '<td class="ver-wl-details">') . $this->workspaceList_getFileMountPoints($wksp)) . '</td></tr>') . '<tr><td class="ver-wl-details-label"><strong>') . $GLOBALS['LANG']->getLL('workspace_list_label_db_mountpoints')) . '</strong></td>') . '<td class="ver-wl-details">') . $this->workspaceList_getWebMountPoints($wksp)) . '</td></tr>';
                if ($wksp['uid'] > 0) {
                        // Displaying information below makes sence only for custom workspaces
-                       $content .= (((((((((((((((((((((((((((('<tr><td class="ver-wl-details-label"><strong>' . $GLOBALS['LANG']->getLL('workspace_list_label_frozen')) . '</strong></td>') . '<td class="ver-wl-details">') . $GLOBALS['LANG']->getLL(($wksp['freeze'] ? 'workspace_list_label_frozen_yes' : 'workspace_list_label_frozen_no'))) . '</td></tr>') . '<tr><td class="ver-wl-details-label"><strong>') . $GLOBALS['LANG']->getLL('workspace_list_label_publish_date')) . '</strong></td>') . '<td class="ver-wl-details">') . ($wksp['publish_time'] == 0 ? '&nbsp;&ndash;' : t3lib_BEfunc::datetime($wksp['publish_time']))) . '</td></tr>') . '<tr><td class="ver-wl-details-label"><strong>') . $GLOBALS['LANG']->getLL('workspace_list_label_unpublish_date')) . '</strong></td>') . '<td class="ver-wl-details">') . ($wksp['unpublish_time'] == 0 ? '&nbsp;&ndash;' : t3lib_BEfunc::datetime($wksp['unpublish_time']))) . '</td></tr>') . '<tr><td class="ver-wl-details-label"><strong>') . $GLOBALS['LANG']->getLL('workspace_list_label_your_access')) . '</strong></td>') . '<td class="ver-wl-details">') . $GLOBALS['LANG']->getLL(('workspace_list_access_' . $wksp['_ACCESS']))) . '</td></tr>') . '<tr><td class="ver-wl-details-label"><strong>') . $GLOBALS['LANG']->getLL('workspace_list_label_workspace_users')) . '</strong></td>') . '<td class="ver-wl-details">') . $this->workspaceList_getUserList($wksp)) . '</td></tr>';
+                       $content .= (((((((((((((((((((((((((((('<tr><td class="ver-wl-details-label"><strong>' . $GLOBALS['LANG']->getLL('workspace_list_label_frozen')) . '</strong></td>') . '<td class="ver-wl-details">') . $GLOBALS['LANG']->getLL(($wksp['freeze'] ? 'workspace_list_label_frozen_yes' : 'workspace_list_label_frozen_no'))) . '</td></tr>') . '<tr><td class="ver-wl-details-label"><strong>') . $GLOBALS['LANG']->getLL('workspace_list_label_publish_date')) . '</strong></td>') . '<td class="ver-wl-details">') . ($wksp['publish_time'] == 0 ? '&nbsp;&ndash;' : \TYPO3\CMS\Backend\Utility\BackendUtility::datetime($wksp['publish_time']))) . '</td></tr>') . '<tr><td class="ver-wl-details-label"><strong>') . $GLOBALS['LANG']->getLL('workspace_list_label_unpublish_date')) . '</strong></td>') . '<td class="ver-wl-details">') . ($wksp['unpublish_time'] == 0 ? '&nbsp;&ndash;' : \TYPO3\CMS\Backend\Utility\BackendUtility::datetime($wksp['unpublish_time']))) . '</td></tr>') . '<tr><td class="ver-wl-details-label"><strong>') . $GLOBALS['LANG']->getLL('workspace_list_label_your_access')) . '</strong></td>') . '<td class="ver-wl-details">') . $GLOBALS['LANG']->getLL(('workspace_list_access_' . $wksp['_ACCESS']))) . '</td></tr>') . '<tr><td class="ver-wl-details-label"><strong>') . $GLOBALS['LANG']->getLL('workspace_list_label_workspace_users')) . '</strong></td>') . '<td class="ver-wl-details">') . $this->workspaceList_getUserList($wksp)) . '</td></tr>';
                } elseif ($GLOBALS['BE_USER']->isAdmin()) {
                        // show users for draft/live workspace only to admin users
                        $content .= (((('<tr><td class="ver-wl-details-label"><strong>' . $GLOBALS['LANG']->getLL('workspace_list_label_workspace_users')) . '</strong></td>') . '<td class="ver-wl-details">') . $this->workspaceList_getUserList($wksp)) . '</td></tr>';
@@ -601,7 +603,7 @@ class SC_mod_user_ws_index extends t3lib_SCbase {
                $content = array();
                while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
                        // will show UID on hover. Just convinient to user.
-                       $content[] = ((((t3lib_iconWorks::getSpriteIconForRecord('pages', $row) . '<span title="UID: ') . $row['uid']) . '">') . $row['title']) . '</span>';
+                       $content[] = ((((\TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIconForRecord('pages', $row) . '<span title="UID: ') . $row['uid']) . '">') . $row['title']) . '</span>';
                }
                if (count($content)) {
                        return implode('<br />', $content);
@@ -645,7 +647,7 @@ class SC_mod_user_ws_index extends t3lib_SCbase {
                $content = array();
                while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
                        // will show UID on hover. Just convinient to user.
-                       $content[] = ((((t3lib_iconWorks::getSpriteIconForRecord('sys_filemounts', $row) . '<span title="UID: ') . $row['uid']) . '">') . $row['title']) . '</span>';
+                       $content[] = ((((\TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIconForRecord('sys_filemounts', $row) . '<span title="UID: ') . $row['uid']) . '">') . $row['title']) . '</span>';
                }
                if (count($content)) {
                        return implode('<br />', $content);
@@ -721,7 +723,7 @@ class SC_mod_user_ws_index extends t3lib_SCbase {
                                } else {
                                        $tag0 = ($tag1 = '');
                                }
-                               $content_array[] = (($this->doc->wrapClickMenuOnIcon(t3lib_iconWorks::getIconImage('be_users', $uid, $GLOBALS['BACK_PATH'], ((' align="middle" alt="UID: ' . $uid) . '"')), 'be_users', $uid, 2) . $tag0) . htmlspecialchars($user['username'])) . $tag1;
+                               $content_array[] = (($this->doc->wrapClickMenuOnIcon(\TYPO3\CMS\Backend\Utility\IconUtility::getIconImage('be_users', $uid, $GLOBALS['BACK_PATH'], ((' align="middle" alt="UID: ' . $uid) . '"')), 'be_users', $uid, 2) . $tag0) . htmlspecialchars($user['username'])) . $tag1;
                        }
                }
                return implode('<br />', $content_array);
@@ -757,13 +759,13 @@ class SC_mod_user_ws_index extends t3lib_SCbase {
                                                } else {
                                                        $tag0 = ($tag1 = '');
                                                }
-                                               $content_array[] = (($this->doc->wrapClickMenuOnIcon(t3lib_iconWorks::getIconImage($table, $this->be_user_Array[$id], $GLOBALS['BACK_PATH'], ((' align="middle" alt="UID: ' . $id) . '"')), $table, $id, 2) . $tag0) . htmlspecialchars($this->be_user_Array_full[$id]['username'])) . $tag1;
+                                               $content_array[] = (($this->doc->wrapClickMenuOnIcon(\TYPO3\CMS\Backend\Utility\IconUtility::getIconImage($table, $this->be_user_Array[$id], $GLOBALS['BACK_PATH'], ((' align="middle" alt="UID: ' . $id) . '"')), $table, $id, 2) . $tag0) . htmlspecialchars($this->be_user_Array_full[$id]['username'])) . $tag1;
                                        } else {
                                                // group
                                                if (FALSE === $groups) {
-                                                       $groups = t3lib_BEfunc::getGroupNames();
+                                                       $groups = \TYPO3\CMS\Backend\Utility\BackendUtility::getGroupNames();
                                                }
-                                               $content_array[] = $this->doc->wrapClickMenuOnIcon(t3lib_iconWorks::getIconImage($table, $groups[$id], $GLOBALS['BACK_PATH'], ((' align="middle" alt="UID: ' . $id) . '"')), $table, $id, 2) . $groups[$id]['title'];
+                                               $content_array[] = $this->doc->wrapClickMenuOnIcon(\TYPO3\CMS\Backend\Utility\IconUtility::getIconImage($table, $groups[$id], $GLOBALS['BACK_PATH'], ((' align="middle" alt="UID: ' . $id) . '"')), $table, $id, 2) . $groups[$id]['title'];
                                        }
                                } else {
                                        // user id
@@ -774,7 +776,7 @@ class SC_mod_user_ws_index extends t3lib_SCbase {
                                        } else {
                                                $tag0 = ($tag1 = '');
                                        }
-                                       $content_array[] = ((t3lib_iconWorks::getIconImage('be_users', $this->be_user_Array[$id], $GLOBALS['BACK_PATH'], ((' align="middle" alt="UID: ' . $id) . '"')) . $tag0) . htmlspecialchars($this->be_user_Array_full[$userUID]['username'])) . $tag1;
+                                       $content_array[] = ((\TYPO3\CMS\Backend\Utility\IconUtility::getIconImage('be_users', $this->be_user_Array[$id], $GLOBALS['BACK_PATH'], ((' align="middle" alt="UID: ' . $id) . '"')) . $tag0) . htmlspecialchars($this->be_user_Array_full[$userUID]['username'])) . $tag1;
                                }
                        }
                        sort($content_array);
@@ -802,21 +804,21 @@ class SC_mod_user_ws_index extends t3lib_SCbase {
                if ($this->workspaceList_hasEditAccess($wksp)) {
                        // User can modify workspace parameters, display corresponding link and icon
                        $editUrl = 'workspaceforms.php?action=edit&amp;wkspId=' . $wksp['uid'];
-                       $content .= ((((('<a href="' . $editUrl) . '" title="') . $GLOBALS['LANG']->getLL('workspace_list_icon_title_edit_workspace')) . '"/>') . t3lib_iconWorks::getSpriteIcon('actions-document-open')) . '</a>';
+                       $content .= ((((('<a href="' . $editUrl) . '" title="') . $GLOBALS['LANG']->getLL('workspace_list_icon_title_edit_workspace')) . '"/>') . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-document-open')) . '</a>';
                } else {
                        // User can NOT modify workspace parameters, display space
                        // Get only withdth and height from skinning API
-                       $content .= ('<img src="clear.gif" ' . t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'], 'gfx/edit2.gif', 'width="11" height="12"', 2)) . ' border="0" alt="" hspace="1" align="middle" />';
+                       $content .= ('<img src="clear.gif" ' . \TYPO3\CMS\Backend\Utility\IconUtility::skinImg($GLOBALS['BACK_PATH'], 'gfx/edit2.gif', 'width="11" height="12"', 2)) . ' border="0" alt="" hspace="1" align="middle" />';
                }
                // `switch workspace` button
                if (!$currentWorkspace) {
                        // Workspace switching button
-                       $content .= ((((((('<a href="' . t3lib_div::getIndpEnv('SCRIPT_NAME')) . '?changeWorkspace=') . $wksp['uid']) . '" title="') . $GLOBALS['LANG']->getLL('workspace_list_icon_title_switch_workspace')) . '"/>') . t3lib_iconWorks::getSpriteIcon('actions-version-swap-workspace')) . '</a>';
+                       $content .= ((((((('<a href="' . \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('SCRIPT_NAME')) . '?changeWorkspace=') . $wksp['uid']) . '" title="') . $GLOBALS['LANG']->getLL('workspace_list_icon_title_switch_workspace')) . '"/>') . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-version-swap-workspace')) . '</a>';
                } else {
                        // Current workspace: empty space instead of workspace switching button
                        //
                        // Here get only width and height from skinning API
-                       $content .= ('<img src="clear.gif" ' . t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'], 'gfx/switch.png', 'width="18" height="16"', 2)) . ' border="0" alt="" hspace="1" align="middle" alt="" />';
+                       $content .= ('<img src="clear.gif" ' . \TYPO3\CMS\Backend\Utility\IconUtility::skinImg($GLOBALS['BACK_PATH'], 'gfx/switch.png', 'width="18" height="16"', 2)) . ' border="0" alt="" hspace="1" align="middle" alt="" />';
                }
                return $content;
        }
@@ -877,4 +879,5 @@ class SC_mod_user_ws_index extends t3lib_SCbase {
 
 }
 
+
 ?>
\ No newline at end of file
index c0c388a..8277233 100644 (file)
@@ -1,4 +1,6 @@
 <?php
+namespace TYPO3\CMS\Version\DataHandler;
+
 /***************************************************************
  * Copyright notice
  *
@@ -27,7 +29,7 @@
 /**
  * Handles the t3lib_TCEmain command map and is only used in combination with t3lib_TCEmain.
  */
-class tx_version_tcemain_CommandMap {
+class CommandMap {
 
        const SCOPE_WorkspacesSwap = 'SCOPE_WorkspacesSwap';
        const SCOPE_WorkspacesSetStage = 'SCOPE_WorkspacesSetStage';
@@ -43,12 +45,12 @@ class tx_version_tcemain_CommandMap {
        const KEY_UpdateGetIdCallback = 'KEY_UpdateGetIdCallback';
        const KEY_TransformDependentElementsToUseLiveId = 'KEY_TransformDependentElementsToUseLiveId';
        /**
-        * @var tx_version_tcemain
+        * @var \TYPO3\CMS\Version\Hook\DataHandlerHook
         */
        protected $parent;
 
        /**
-        * @var t3lib_TCEmain
+        * @var \TYPO3\CMS\Core\DataHandler\DataHandler
         */
        protected $tceMain;
 
@@ -80,10 +82,10 @@ class tx_version_tcemain_CommandMap {
        /**
         * Creates this object.
         *
-        * @param t3lib_TCEmain $parent
+        * @param \TYPO3\CMS\Core\DataHandler\DataHandler $parent
         * @param array $commandMap
         */
-       public function __construct(tx_version_tcemain $parent, t3lib_TCEmain $tceMain, array $commandMap) {
+       public function __construct(\TYPO3\CMS\Version\Hook\DataHandlerHook $parent, \TYPO3\CMS\Core\DataHandler\DataHandler $tceMain, array $commandMap) {
                $this->setParent($parent);
                $this->setTceMain($tceMain);
                $this->set($commandMap);
@@ -106,7 +108,7 @@ class tx_version_tcemain_CommandMap {
         * Sets the command map.
         *
         * @param array $commandMap
-        * @return tx_version_tcemain_CommandMap
+        * @return \TYPO3\CMS\Version\DataHandler\CommandMap
         */
        public function set(array $commandMap) {
                $this->commandMap = $commandMap;
@@ -116,7 +118,7 @@ class tx_version_tcemain_CommandMap {
        /**
         * Gets the parent object.
         *
-        * @return tx_version_tcemain
+        * @return \TYPO3\CMS\Version\Hook\DataHandlerHook
         */
        public function getParent() {
                return $this->parent;
@@ -125,10 +127,10 @@ class tx_version_tcemain_CommandMap {
        /**
         * Sets the parent object.
         *
-        * @param tx_version_tcemain $parent
-        * @return tx_version_tcemain_CommandMap
+        * @param \TYPO3\CMS\Version\Hook\DataHandlerHook $parent
+        * @return \TYPO3\CMS\Version\DataHandler\CommandMap
         */
-       public function setParent(tx_version_tcemain $parent) {
+       public function setParent(\TYPO3\CMS\Version\Hook\DataHandlerHook $parent) {
                $this->parent = $parent;
                return $this;
        }
@@ -136,7 +138,7 @@ class tx_version_tcemain_CommandMap {
        /**
         * Gets the parent object.
         *
-        * @return t3lib_TCEmain
+        * @return \TYPO3\CMS\Core\DataHandler\DataHandler
         */
        public function getTceMain() {
                return $this->tceMain;
@@ -145,10 +147,10 @@ class tx_version_tcemain_CommandMap {
        /**
         * Sets the parent object.
         *
-        * @param t3lib_TCEmain $tceMain
-        * @return tx_version_tcemain_CommandMap
+        * @param \TYPO3\CMS\Core\DataHandler\DataHandler $tceMain
+        * @return \TYPO3\CMS\Version\DataHandler\CommandMap
         */
-       public function setTceMain(t3lib_TCEmain $tceMain) {
+       public function setTceMain(\TYPO3\CMS\Core\DataHandler\DataHandler $tceMain) {
                $this->tceMain = $tceMain;
                return $this;
        }
@@ -158,7 +160,7 @@ class tx_version_tcemain_CommandMap {
         * (see options.workspaces.swapMode).
         *
         * @param string $workspacesSwapMode
-        * @return tx_version_tcemain_CommandMap
+        * @return \TYPO3\CMS\Version\DataHandler\CommandMap
         */
        public function setWorkspacesSwapMode($workspacesSwapMode) {
                $this->workspacesSwapMode = (string) $workspacesSwapMode;
@@ -170,7 +172,7 @@ class tx_version_tcemain_CommandMap {
         * see options.workspaces.changeStageMode)
         *
         * @param string $workspacesChangeStageMode
-        * @return tx_version_tcemain_CommandMap
+        * @return \TYPO3\CMS\Version\DataHandler\CommandMap
         */
        public function setWorkspacesChangeStageMode($workspacesChangeStageMode) {
                $this->workspacesChangeStageMode = (string) $workspacesChangeStageMode;
@@ -182,7 +184,7 @@ class tx_version_tcemain_CommandMap {
         * (see options.workspaces.considerReferences)
         *
         * @param boolean $workspacesConsiderReferences
-        * @return tx_version_tcemain_CommandMap
+        * @return \TYPO3\CMS\Version\DataHandler\CommandMap
         */
        public function setWorkspacesConsiderReferences($workspacesConsiderReferences) {
                $this->workspacesConsiderReferences = (bool) $workspacesConsiderReferences;
@@ -192,7 +194,7 @@ class tx_version_tcemain_CommandMap {
        /**
         * Processes the command map.
         *
-        * @return tx_version_tcemain_CommandMap
+        * @return \TYPO3\CMS\Version\DataHandler\CommandMap
         */
        public function process() {
                $this->resolveWorkspacesSwapDependencies();
@@ -214,7 +216,7 @@ class tx_version_tcemain_CommandMap {
                        foreach ($liveIdCollection as $liveId => $commandCollection) {
                                foreach ($commandCollection as $command => $properties) {
                                        if (($command === 'version' && isset($properties['action'])) && $properties['action'] === 'swap') {
-                                               if (isset($properties['swapWith']) && t3lib_utility_Math::canBeInterpretedAsInteger($properties['swapWith'])) {
+                                               if (isset($properties['swapWith']) && \TYPO3\CMS\Core\Utility\MathUtility::canBeInterpretedAsInteger($properties['swapWith'])) {
                                                        call_user_func_array(array($this, $callbackMethod), array_merge($arguments, array($table, $liveId, $properties)));
                                                }
                                        }
@@ -234,7 +236,7 @@ class tx_version_tcemain_CommandMap {
        protected function resolveWorkspacesSwapDependencies() {
                $scope = self::SCOPE_WorkspacesSwap;
                $dependency = $this->getDependencyUtility($scope);
-               if (t3lib_div::inList('any,pages', $this->workspacesSwapMode)) {
+               if (\TYPO3\CMS\Core\Utility\GeneralUtility::inList('any,pages', $this->workspacesSwapMode)) {
                        $this->invokeWorkspacesSwapItems('applyWorkspacesSwapBehaviour');
                }
                $this->invokeWorkspacesSwapItems('addWorkspacesSwapElements', array($dependency));
@@ -270,13 +272,13 @@ class tx_version_tcemain_CommandMap {
        /**
         * Adds workspaces elements for swapping/publishing.
         *
-        * @param t3lib_utility_Dependency $dependency
+        * @param \TYPO3\CMS\Version\Dependency\DependencyResolver $dependency
         * @param string $table
         * @param integer $liveId
         * @param array $properties
         * @return void
         */
-       protected function addWorkspacesSwapElements(t3lib_utility_Dependency $dependency, $table, $liveId, array $properties) {
+       protected function addWorkspacesSwapElements(\TYPO3\CMS\Version\Dependency\DependencyResolver $dependency, $table, $liveId, array $properties) {
                $elementList = array();
                // Fetch accordant elements if the swapMode is 'any' or 'pages':
                if ($this->workspacesSwapMode === 'any' || $this->workspacesSwapMode === 'pages' && $table === 'pages') {
@@ -305,7 +307,7 @@ class tx_version_tcemain_CommandMap {
                        foreach ($liveIdCollection as $liveIdList => $commandCollection) {
                                foreach ($commandCollection as $command => $properties) {
                                        if (($command === 'version' && isset($properties['action'])) && $properties['action'] === 'setStage') {
-                                               if (isset($properties['stageId']) && t3lib_utility_Math::canBeInterpretedAsInteger($properties['stageId'])) {
+                                               if (isset($properties['stageId']) && \TYPO3\CMS\Core\Utility\MathUtility::canBeInterpretedAsInteger($properties['stageId'])) {
                                                        call_user_func_array(array($this, $callbackMethod), array_merge($arguments, array($table, $liveIdList, $properties)));
                                                }
                                        }
@@ -324,7 +326,7 @@ class tx_version_tcemain_CommandMap {
        protected function resolveWorkspacesSetStageDependencies() {
                $scope = self::SCOPE_WorkspacesSetStage;
                $dependency = $this->getDependencyUtility($scope);
-               if (t3lib_div::inList('any,pages', $this->workspacesChangeStageMode)) {
+               if (\TYPO3\CMS\Core\Utility\GeneralUtility::inList('any,pages', $this->workspacesChangeStageMode)) {
                        $this->invokeWorkspacesSetStageItems('applyWorkspacesSetStageBehaviour');
                }
                $this->invokeWorkspacesSetStageItems('explodeSetStage');
@@ -342,11 +344,11 @@ class tx_version_tcemain_CommandMap {
         */
        protected function applyWorkspacesSetStageBehaviour($table, $liveIdList, array $properties) {
                $extendedCommandMap = array();
-               $liveIds = t3lib_div::trimExplode(',', $liveIdList, TRUE);
+               $liveIds = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $liveIdList, TRUE);
                $elementList = array($table => $liveIds);
-               if (t3lib_div::inList('any,pages', $this->workspacesChangeStageMode)) {
+               if (\TYPO3\CMS\Core\Utility\GeneralUtility::inList('any,pages', $this->workspacesChangeStageMode)) {
                        if (count($liveIds) === 1) {
-                               $workspaceRecord = t3lib_BEfunc::getRecord($table, $liveIds[0], 't3ver_wsid');
+                               $workspaceRecord = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecord($table, $liveIds[0], 't3ver_wsid');
                                $workspaceId = $workspaceRecord['t3ver_wsid'];
                        } else {
                                $workspaceId = $this->getTceMain()->BE_USER->workspace;
@@ -375,13 +377,13 @@ class tx_version_tcemain_CommandMap {
        /**
         * Adds workspaces elements for staging.
         *
-        * @param t3lib_utility_Dependency $dependency
+        * @param \TYPO3\CMS\Version\Dependency\DependencyResolver $dependency
         * @param string $table
         * @param string $liveIdList
         * @param array $properties
         * @return void
         */
-       protected function addWorkspacesSetStageElements(t3lib_utility_Dependency $dependency, $table, $liveIdList, array $properties) {
+       protected function addWorkspacesSetStageElements(\TYPO3\CMS\Version\Dependency\DependencyResolver $dependency, $table, $liveIdList, array $properties) {
                $dependency->addElement($table, $liveIdList, array('properties' => $properties));
        }
 
@@ -419,11 +421,11 @@ class tx_version_tcemain_CommandMap {
         */
        protected function explodeSetStage($table, $liveIdList, array $properties) {
                $extractedCommandMap = array();
-               $liveIds = t3lib_div::trimExplode(',', $liveIdList, TRUE);
+               $liveIds = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $liveIdList, TRUE);
                if (count($liveIds) > 1) {
                        foreach ($liveIds as $liveId) {
                                if (isset($this->commandMap[$table][$liveId]['version'])) {
-                                       throw new RuntimeException(((('Command map for [' . $table) . '][') . $liveId) . '][version] was already set.', 1289391048);
+                                       throw new \RuntimeException(((('Command map for [' . $table) . '][') . $liveId) . '][version] was already set.', 1289391048);
                                }
                                $extractedCommandMap[$table][$liveId]['version'] = $properties;
                        }
@@ -436,11 +438,11 @@ class tx_version_tcemain_CommandMap {
         * Applies the workspaces dependencies and removes incomplete structures or automatically
         * completes them, depending on the options.workspaces.considerReferences setting
         *
-        * @param t3lib_utility_Dependency $dependency
+        * @param \TYPO3\CMS\Version\Dependency\DependencyResolver $dependency
         * @param string $scope
         * @return void
         */
-       protected function applyWorkspacesDependencies(t3lib_utility_Dependency $dependency, $scope) {
+       protected function applyWorkspacesDependencies(\TYPO3\CMS\Version\Dependency\DependencyResolver $dependency, $scope) {
                $transformDependentElementsToUseLiveId = $this->getScopeData($scope, self::KEY_TransformDependentElementsToUseLiveId);
                $elementsToBeVersionized = $dependency->getElements();
                // Use the uid of the live record instead of the workspace record:
@@ -448,7 +450,7 @@ class tx_version_tcemain_CommandMap {
                        $elementsToBeVersionized = $this->transformDependentElementsToUseLiveId($elementsToBeVersionized);
                }
                $outerMostParents = $dependency->getOuterMostParents();
-               /** @var $outerMostParent t3lib_utility_Dependency_Element */
+               /** @var $outerMostParent \TYPO3\CMS\Version\Dependency\ElementEntity */
                foreach ($outerMostParents as $outerMostParent) {
                        $dependentElements = $dependency->getNestedElements($outerMostParent);
                        if ($transformDependentElementsToUseLiveId) {
@@ -476,13 +478,13 @@ class tx_version_tcemain_CommandMap {
         * @return void
         */
        protected function purgeWithErrorMessage(array $elements, $scope) {
-               /** @var $element t3lib_utility_Dependency_Element */
+               /** @var $element \TYPO3\CMS\Version\Dependency\ElementEntity */
                foreach ($elements as $element) {
                        $table = $element->getTable();
                        $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(
-                               t3lib_BEfunc::getRecordTitle($table, t3lib_BEfunc::getRecord($table, $id)),
+                               \TYPO3\CMS\Backend\Utility\BackendUtility::getRecordTitle($table, \TYPO3\CMS\Backend\Utility\BackendUtility::getRecord($table, $id)),
                                $table,
                                $id
                        ));
@@ -492,18 +494,18 @@ class tx_version_tcemain_CommandMap {
        /**
         * Updates the command map accordant to valid structures and takes care of the correct order.
         *
-        * @param t3lib_utility_Dependency_Element $intersectingElement
+        * @param \TYPO3\CMS\Version\Dependency\ElementEntity $intersectingElement
         * @param array $elements
         * @param string $scope
         * @return void
         */
-       protected function update(t3lib_utility_Dependency_Element $intersectingElement, array $elements, $scope) {
+       protected function update(\TYPO3\CMS\Version\Dependency\ElementEntity $intersectingElement, array $elements, $scope) {
                $orderedCommandMap = array();
                $commonProperties = array();
                if ($this->getScopeData($scope, self::KEY_GetCommonPropertiesCallback)) {
                        $commonProperties = $this->processCallback($this->getScopeData($scope, self::KEY_GetCommonPropertiesCallback), array($intersectingElement));
                }
-               /** @var $element t3lib_utility_Dependency_Element */
+               /** @var $element \TYPO3\CMS\Version\Dependency\ElementEntity */
                foreach ($elements as $element) {
                        $table = $element->getTable();
                        $id = $this->processCallback($this->getScopeData($scope, self::KEY_UpdateGetIdCallback), array($element));
@@ -524,7 +526,7 @@ class tx_version_tcemain_CommandMap {
         * @return void
         */
        protected function mergeToTop(array $commandMap) {
-               $this->commandMap = t3lib_div::array_merge_recursive_overrule($commandMap, $this->commandMap);
+               $this->commandMap = \TYPO3\CMS\Core\Utility\GeneralUtility::array_merge_recursive_overrule($commandMap, $this->commandMap);
        }
 
        /**
@@ -534,7 +536,7 @@ class tx_version_tcemain_CommandMap {
         * @return void
         */
        protected function mergeToBottom(array $commandMap) {
-               $this->commandMap = t3lib_div::array_merge_recursive_overrule($this->commandMap, $commandMap);
+               $this->commandMap = \TYPO3\CMS\Core\Utility\GeneralUtility::array_merge_recursive_overrule($this->commandMap, $commandMap);
        }
 
        /**
@@ -556,30 +558,30 @@ class tx_version_tcemain_CommandMap {
        /**
         * Callback to get the liveId of an dependent element.
         *
-        * @param t3lib_utility_Dependency_Element $element
+        * @param \TYPO3\CMS\Version\Dependency\ElementEntity $element
         * @return integer
         */
-       protected function getElementLiveIdCallback(t3lib_utility_Dependency_Element $element) {
+       protected function getElementLiveIdCallback(\TYPO3\CMS\Version\Dependency\ElementEntity $element) {
                return $element->getDataValue('liveId');
        }
 
        /**
         * Callback to get the real id of an dependent element.
         *
-        * @param t3lib_utility_Dependency_Element $element
+        * @param \TYPO3\CMS\Version\Dependency\ElementEntity $element
         * @return integer
         */
-       protected function getElementIdCallback(t3lib_utility_Dependency_Element $element) {
+       protected function getElementIdCallback(\TYPO3\CMS\Version\Dependency\ElementEntity $element) {
                return $element->getId();
        }
 
        /**
         * Callback to get the specific properties of a dependent element for swapping/publishing.
         *
-        * @param t3lib_utility_Dependency_Element $element
+        * @param \TYPO3\CMS\Version\Dependency\ElementEntity $element
         * @return array
         */
-       protected function getElementSwapPropertiesCallback(t3lib_utility_Dependency_Element $element) {
+       protected function getElementSwapPropertiesCallback(\TYPO3\CMS\Version\Dependency\ElementEntity $element) {
                return array(
                        'swapWith' => $element->getId()
                );
@@ -588,10 +590,10 @@ class tx_version_tcemain_CommandMap {
        /**
         * Callback to get common properties of dependent elements for clearing.
         *
-        * @param t3lib_utility_Dependency_Element $element
+        * @param \TYPO3\CMS\Version\Dependency\ElementEntity $element
         * @return array
         */
-       protected function getCommonClearPropertiesCallback(t3lib_utility_Dependency_Element $element) {
+       protected function getCommonClearPropertiesCallback(\TYPO3\CMS\Version\Dependency\ElementEntity $element) {
                $commonSwapProperties = array();
                $elementProperties = $element->getDataValue('properties');
                if (isset($elementProperties['action'])) {
@@ -603,10 +605,10 @@ class tx_version_tcemain_CommandMap {
        /**
         * Callback to get common properties of dependent elements for swapping/publishing.
         *
-        * @param t3lib_utility_Dependency_Element $element
+        * @param \TYPO3\CMS\Version\Dependency\ElementEntity $element
         * @return array
         */
-       protected function getCommonSwapPropertiesCallback(t3lib_utility_Dependency_Element $element) {
+       protected function getCommonSwapPropertiesCallback(\TYPO3\CMS\Version\Dependency\ElementEntity $element) {
                $commonSwapProperties = array();
                $elementProperties = $element->getDataValue('properties');
                if (isset($elementProperties['action'])) {
@@ -621,20 +623,20 @@ class tx_version_tcemain_CommandMap {
        /**
         * Callback to get the specific properties of a dependent element for staging.
         *
-        * @param t3lib_utility_Dependency_Element $element
+        * @param \TYPO3\CMS\Version\Dependency\ElementEntity $element
         * @return array
         */
-       protected function getElementSetStagePropertiesCallback(t3lib_utility_Dependency_Element $element) {
+       protected function getElementSetStagePropertiesCallback(\TYPO3\CMS\Version\Dependency\ElementEntity $element) {
                return $this->getCommonSetStagePropertiesCallback($element);
        }
 
        /**
         * Callback to get common properties of dependent elements for staging.
         *
-        * @param t3lib_utility_Dependency_Element $element
+        * @param \TYPO3\CMS\Version\Dependency\ElementEntity $element
         * @return array
         */
-       protected function getCommonSetStagePropertiesCallback(t3lib_utility_Dependency_Element $element) {
+       protected function getCommonSetStagePropertiesCallback(\TYPO3\CMS\Version\Dependency\ElementEntity $element) {
                $commonSetStageProperties = array();
                $elementProperties = $element->getDataValue('properties');
                if (isset($elementProperties['stageId'])) {
@@ -656,20 +658,20 @@ class tx_version_tcemain_CommandMap {
         * Gets an instance of the depency resolver utility.
         *
         * @param string $scope Scope identifier
-        * @return t3lib_utility_Dependency
+        * @return \TYPO3\CMS\Version\Dependency\DependencyResolver
         */
        protected function getDependencyUtility($scope) {
-               /** @var $dependency t3lib_utility_Dependency */
-               $dependency = t3lib_div::makeInstance('t3lib_utility_Dependency');
+               /** @var $dependency \TYPO3\CMS\Version\Dependency\DependencyResolver */
+               $dependency = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Version\\Dependency\\DependencyResolver');
                $dependency->setOuterMostParentsRequireReferences(TRUE);
                if ($this->getScopeData($scope, self::KEY_ElementConstructCallback)) {
-                       $dependency->setEventCallback(t3lib_utility_Dependency_Element::EVENT_Construct, $this->getDependencyCallback($this->getScopeData($scope, self::KEY_ElementConstructCallback)));
+                       $dependency->setEventCallback(\TYPO3\CMS\Version\Dependency\ElementEntity::EVENT_Construct, $this->getDependencyCallback($this->getScopeData($scope, self::KEY_ElementConstructCallback)));
                }
                if ($this->getScopeData($scope, self::KEY_ElementCreateChildReferenceCallback)) {
-                       $dependency->setEventCallback(t3lib_utility_Dependency_Element::EVENT_CreateChildReference, $this->getDependencyCallback($this->getScopeData($scope, self::KEY_ElementCreateChildReferenceCallback)));
+                       $dependency->setEventCallback(\TYPO3\CMS\Version\Dependency\ElementEntity::EVENT_CreateChildReference, $this->getDependencyCallback($this->getScopeData($scope, self::KEY_ElementCreateChildReferenceCallback)));
                }
                if ($this->getScopeData($scope, self::KEY_ElementCreateParentReferenceCallback)) {
-                       $dependency->setEventCallback(t3lib_utility_Dependency_Element::EVENT_CreateParentReference, $this->getDependencyCallback($this->getScopeData($scope, self::KEY_ElementCreateParentReferenceCallback)));
+                       $dependency->setEventCallback(\TYPO3\CMS\Version\Dependency\ElementEntity::EVENT_CreateParentReference, $this->getDependencyCallback($this->getScopeData($scope, self::KEY_ElementCreateParentReferenceCallback)));
                }
                return $dependency;
        }
@@ -679,16 +681,16 @@ class tx_version_tcemain_CommandMap {
         *
         * @param array $callerArguments
         * @param array $targetArgument
-        * @param t3lib_utility_Dependency_Element $caller
+        * @param \TYPO3\CMS\Version\Dependency\ElementEntity $caller
         * @param string $eventName
         * @return string Skip response (if required)
         */
-       public function createNewDependentElementChildReferenceCallback(array $callerArguments, array $targetArgument, t3lib_utility_Dependency_Element $caller, $eventName) {
-               /** @var $reference t3lib_utility_Dependency_Reference */
+       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 = t3lib_BEfunc::getTcaFieldConfiguration($caller->getTable(), $reference->getField());
-               if (!$fieldCOnfiguration || !t3lib_div::inList('field,list', $this->getTceMain()->getInlineFieldType($fieldCOnfiguration))) {
-                       return t3lib_utility_Dependency_Element::RESPONSE_Skip;
+               $fieldCOnfiguration = \TYPO3\CMS\Backend\Utility\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;
                }
        }
 
@@ -697,16 +699,16 @@ class tx_version_tcemain_CommandMap {
         *
         * @param array $callerArguments
         * @param array $targetArgument
-        * @param t3lib_utility_Dependency_Element $caller
+        * @param \TYPO3\CMS\Version\Dependency\ElementEntity $caller
         * @param string $eventName
         * @return string Skip response (if required)
         */
-       public function createNewDependentElementParentReferenceCallback(array $callerArguments, array $targetArgument, t3lib_utility_Dependency_Element $caller, $eventName) {
-               /** @var $reference t3lib_utility_Dependency_Reference */
+       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 = t3lib_BEfunc::getTcaFieldConfiguration($reference->getElement()->getTable(), $reference->getField());
-               if (!$fieldCOnfiguration || !t3lib_div::inList('field,list', $this->getTceMain()->getInlineFieldType($fieldCOnfiguration))) {
-                       return t3lib_utility_Dependency_Element::RESPONSE_Skip;
+               $fieldCOnfiguration = \TYPO3\CMS\Backend\Utility\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;
                }
        }
 
@@ -716,18 +718,18 @@ class tx_version_tcemain_CommandMap {
         *
         * @param array $callerArguments
         * @param array $targetArgument
-        * @param t3lib_utility_Dependency_Element $caller
+        * @param \TYPO3\CMS\Version\Dependency\ElementEntity $caller
         * @param string $eventName
         * @return string Skip response (if required)
         */
-       public function createClearDependentElementChildReferenceCallback(array $callerArguments, array $targetArgument, t3lib_utility_Dependency_Element $caller, $eventName) {
+       public function createClearDependentElementChildReferenceCallback(array $callerArguments, array $targetArgument, \TYPO3\CMS\Version\Dependency\ElementEntity $caller, $eventName) {
                $response = $this->createNewDependentElementChildReferenceCallback($callerArguments, $targetArgument, $caller, $eventName);
                if (empty($response)) {
-                       /** @var $reference t3lib_utility_Dependency_Reference */
+                       /** @var $reference \TYPO3\CMS\Version\Dependency\ReferenceEntity */
                        $reference = $callerArguments['reference'];
                        $record = $reference->getElement()->getRecord();
                        if ($record['t3ver_state'] != 2) {
-                               $response = t3lib_utility_Dependency_Element::RESPONSE_Skip;
+                               $response = \TYPO3\CMS\Version\Dependency\ElementEntity::RESPONSE_Skip;
                        }
                }
                return $response;
@@ -739,18 +741,18 @@ class tx_version_tcemain_CommandMap {
         *
         * @param array $callerArguments
         * @param array $targetArgument
-        * @param t3lib_utility_Dependency_Element $caller
+        * @param \TYPO3\CMS\Version\Dependency\ElementEntity $caller
         * @param string $eventName
         * @return string Skip response (if required)
         */
-       public function createClearDependentElementParentReferenceCallback(array $callerArguments, array $targetArgument, t3lib_utility_Dependency_Element $caller, $eventName) {
+       public function createClearDependentElementParentReferenceCallback(array $callerArguments, array $targetArgument, \TYPO3\CMS\Version\Dependency\ElementEntity $caller, $eventName) {
                $response = $this->createNewDependentElementParentReferenceCallback($callerArguments, $targetArgument, $caller, $eventName);
                if (empty($response)) {
-                       /** @var $reference t3lib_utility_Dependency_Reference */
+                       /** @var $reference \TYPO3\CMS\Version\Dependency\ReferenceEntity */
                        $reference = $callerArguments['reference'];
                        $record = $reference->getElement()->getRecord();
                        if ($record['t3ver_state'] != 2) {
-                               $response = t3lib_utility_Dependency_Element::RESPONSE_Skip;
+                               $response = \TYPO3\CMS\Version\Dependency\ElementEntity::RESPONSE_Skip;
                        }
                }
                return $response;
@@ -759,14 +761,14 @@ class tx_version_tcemain_CommandMap {
        /**
         * Callback to add additional data to new elements created in the dependency resolver utility.
         *
-        * @param t3lib_utility_Dependency_Element $caller
+        * @param \TYPO3\CMS\Version\Dependency\ElementEntity $caller
         * @param array $callerArguments
         * @param array $targetArgument
         * @return void
         */
-       public function createNewDependentElementCallback(array $callerArguments, array $targetArgument, t3lib_utility_Dependency_Element $caller) {
+       public function createNewDependentElementCallback(array $callerArguments, array $targetArgument, \TYPO3\CMS\Version\Dependency\ElementEntity $caller) {
                if ($caller->hasDataValue('liveId') === FALSE) {
-                       $liveId = t3lib_BEfunc::getLiveVersionIdOfRecord($caller->getTable(), $caller->getId());
+                       $liveId = \TYPO3\CMS\Backend\Utility\BackendUtility::getLiveVersionIdOfRecord($caller->getTable(), $caller->getId());
                        if (is_null($liveId) === FALSE) {
                                $caller->setDataValue('liveId', $liveId);
                        }
@@ -781,9 +783,9 @@ class tx_version_tcemain_CommandMap {
         */
        protected function transformDependentElementsToUseLiveId(array $elements) {
                $transformedElements = array();
-               /** @var $element t3lib_utility_Dependency_Element */
+               /** @var $element \TYPO3\CMS\Version\Dependency\ElementEntity */
                foreach ($elements as $element) {
-                       $elementName = t3lib_utility_Dependency_Element::getIdentifier($element->getTable(), $element->getDataValue('liveId'));
+                       $elementName = \TYPO3\CMS\Version\Dependency\ElementEntity::getIdentifier($element->getTable(), $element->getDataValue('liveId'));
                        $transformedElements[$elementName] = $element;
                }
                return $transformedElements;
@@ -876,7 +878,7 @@ class tx_version_tcemain_CommandMap {
         */
        protected function getScopeData($scope, $key) {
                if (!isset($this->scopes[$scope])) {
-                       throw new RuntimeException(('Scope "' . $scope) . '" is not defined.', 1289342187);
+                       throw new \RuntimeException(('Scope "' . $scope) . '" is not defined.', 1289342187);
                }
                return $this->scopes[$scope][$key];
        }
@@ -886,10 +888,10 @@ class tx_version_tcemain_CommandMap {
         *
         * @param string $method
         * @param array $targetArguments
-        * @return t3lib_utility_Dependency_Callback
+        * @return \TYPO3\CMS\Version\Dependency\EventCallback
         */
        protected function getDependencyCallback($method, array $targetArguments = array()) {
-               return t3lib_div::makeInstance('t3lib_utility_Dependency_Callback', $this, $method, $targetArguments);
+               return \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Version\\Dependency\\DependencyResolver_Callback', $this, $method, $targetArguments);
        }
 
        /**
@@ -905,4 +907,5 @@ class tx_version_tcemain_CommandMap {
 
 }
 
+
 ?>
\ No newline at end of file
index a0a983d..84d1e30 100644 (file)
@@ -1,4 +1,6 @@
 <?php
+namespace TYPO3\CMS\Version\Dependency;
+
 /***************************************************************
  * Copyright notice
  *
@@ -27,7 +29,7 @@
 /**
  * Object to create and keep track of element or reference entities.
  */
-class t3lib_utility_Dependency_Factory {
+class DependencyEntityFactory {
 
        /**
         * @var array
@@ -45,13 +47,13 @@ class t3lib_utility_Dependency_Factory {
         * @param string $table
         * @param integer $id
         * @param array $data (optional)
-        * @param t3lib_utility_Dependency $dependency
-        * @return t3lib_utility_Dependency_Element
+        * @param \TYPO3\CMS\Version\Dependency\DependencyResolver $dependency
+        * @return \TYPO3\CMS\Version\Dependency\ElementEntity
         */
-       public function getElement($table, $id, array $data = array(), t3lib_utility_Dependency $dependency) {
+       public function getElement($table, $id, array $data = array(), \TYPO3\CMS\Version\Dependency\DependencyResolver $dependency) {
                $elementName = ($table . ':') . $id;
                if (!isset($this->elements[$elementName])) {
-                       $this->elements[$elementName] = t3lib_div::makeInstance('t3lib_utility_Dependency_Element', $table, $id, $data, $dependency);
+                       $this->elements[$elementName] = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Version\\Dependency\\DependencyResolver_Element', $table, $id, $data, $dependency);
                }
                return $this->elements[$elementName];
        }
@@ -59,14 +61,14 @@ class t3lib_utility_Dependency_Factory {
        /**
         * Gets and registers a new reference.
         *
-        * @param t3lib_utility_Dependency_Element $element
+        * @param \TYPO3\CMS\Version\Dependency\ElementEntity $element
         * @param string $field
-        * @return t3lib_utility_Dependency_Reference
+        * @return \TYPO3\CMS\Version\Dependency\ReferenceEntity
         */
-       public function getReference(t3lib_utility_Dependency_Element $element, $field) {
+       public function getReference(\TYPO3\CMS\Version\Dependency\ElementEntity $element, $field) {
                $referenceName = ($element->__toString() . '.') . $field;
                if (!isset($this->references[$referenceName][$field])) {
-                       $this->references[$referenceName][$field] = t3lib_div::makeInstance('t3lib_utility_Dependency_Reference', $element, $field);
+                       $this->references[$referenceName][$field] = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Version\\Dependency\\DependencyResolver_Reference', $element, $field);
                }
                return $this->references[$referenceName][$field];
        }
@@ -78,15 +80,16 @@ class t3lib_utility_Dependency_Factory {
         * @param integer $id
         * @param string $field
         * @param array $data (optional
-        * @param t3lib_utility_Dependency $dependency
-        * @return t3lib_utility_Dependency_Reference
+        * @param \TYPO3\CMS\Version\Dependency\DependencyResolver $dependency
+        * @return \TYPO3\CMS\Version\Dependency\ReferenceEntity
         * @see getElement
         * @see getReference
         */
-       public function getReferencedElement($table, $id, $field, array $data = array(), t3lib_utility_Dependency $dependency) {
+       public function getReferencedElement($table, $id, $field, array $data = array(), \TYPO3\CMS\Version\Dependency\DependencyResolver $dependency) {
                return $this->getReference($this->getElement($table, $id, $data, $dependency), $field);
        }
 
 }
 
+
 ?>
\ No newline at end of file
index 65ba1ad..edf2ad7 100644 (file)
@@ -1,4 +1,6 @@
 <?php
+namespace TYPO3\CMS\Version\Dependency;
+
 /***************************************************************
  * Copyright notice
  *
 /**
  * Object to handle and determine dependent references of elements.
  */
-class t3lib_utility_Dependency {
+class DependencyResolver {
 
        /**
-        * @var t3lib_utility_Dependency_Factory
+        * @var \TYPO3\CMS\Version\Dependency\DependencyEntityFactory
         */
        protected $factory;
 
@@ -58,10 +60,10 @@ class t3lib_utility_Dependency {
         * Sets a callback for a particular event.
         *
         * @param string $eventName
-        * @param t3lib_utility_Dependency_Callback $callback
-        * @return t3lib_utility_Dependency
+        * @param \TYPO3\CMS\Version\Dependency\EventCallback $callback
+        * @return \TYPO3\CMS\Version\Dependency\DependencyResolver
         */
-       public function setEventCallback($eventName, t3lib_utility_Dependency_Callback $callback) {
+       public function setEventCallback($eventName, \TYPO3\CMS\Version\Dependency\EventCallback $callback) {
                $this->eventCallbacks[$eventName] = $callback;
                return $this;
        }
@@ -76,7 +78,7 @@ class t3lib_utility_Dependency {
         */
        public function executeEventCallback($eventName, $caller, array $callerArguments = array()) {
                if (isset($this->eventCallbacks[$eventName])) {
-                       /** @var $callback t3lib_utility_Dependency_Callback */
+                       /** @var $callback \TYPO3\CMS\Version\Dependency\EventCallback */
                        $callback = $this->eventCallbacks[$eventName];
                        return $callback->execute($callerArguments, $caller, $eventName);
                }
@@ -86,7 +88,7 @@ class t3lib_utility_Dependency {
         * Sets the condition that outermost parents required at least one child or parent reference.
         *
         * @param boolean $outerMostParentsRequireReferences
-        * @return t3lib_utility_Dependency
+        * @return \TYPO3\CMS\Version\Dependency\DependencyResolver
         */
        public function setOuterMostParentsRequireReferences($outerMostParentsRequireReferences) {
                $this->outerMostParentsRequireReferences = (bool) $outerMostParentsRequireReferences;
@@ -99,7 +101,7 @@ class t3lib_utility_Dependency {
         * @param string $table
         * @param integer $id
         * @param array $data
-        * @return t3lib_utility_Dependency_Element
+        * @return \TYPO3\CMS\Version\Dependency\ElementEntity
         */
        public function addElement($table, $id, array $data = array()) {
                $element = $this->getFactory()->getElement($table, $id, $data, $this);
@@ -116,7 +118,7 @@ class t3lib_utility_Dependency {
        public function getOuterMostParents() {
                if (!isset($this->outerMostParents)) {
                        $this->outerMostParents = array();
-                       /** @var $element t3lib_utility_Dependency_Element */
+                       /** @var $element \TYPO3\CMS\Version\Dependency\ElementEntity */
                        foreach ($this->elements as $element) {
                                $this->processOuterMostParent($element);
                        }
@@ -127,10 +129,10 @@ class t3lib_utility_Dependency {
        /**
         * Processes and registers the outermost parents accordant to the registered elements.
         *
-        * @param t3lib_utility_Dependency_Element $element
+        * @param \TYPO3\CMS\Version\Dependency\ElementEntity $element
         * @return void
         */
-       protected function processOuterMostParent(t3lib_utility_Dependency_Element $element) {
+       protected function processOuterMostParent(\TYPO3\CMS\Version\Dependency\ElementEntity $element) {
                if ($this->outerMostParentsRequireReferences === FALSE || $element->hasReferences()) {
                        $outerMostParent = $element->getOuterMostParent();
                        if ($outerMostParent !== FALSE) {
@@ -146,13 +148,13 @@ class t3lib_utility_Dependency {
         * Gets all nested elements (including the parent) of a particular outermost parent element.
         *
         * @throws RuntimeException
-        * @param t3lib_utility_Dependency_Element $outerMostParent
+        * @param \TYPO3\CMS\Version\Dependency\ElementEntity $outerMostParent
         * @return array
         */
-       public function getNestedElements(t3lib_utility_Dependency_Element $outerMostParent) {
+       public function getNestedElements(\TYPO3\CMS\Version\Dependency\ElementEntity $outerMostParent) {
                $outerMostParentName = $outerMostParent->__toString();
                if (!isset($this->outerMostParents[$outerMostParentName])) {
-                       throw new RuntimeException(('Element "' . $outerMostParentName) . '" was detected as outermost parent.', 1289318609);
+                       throw new \RuntimeException(('Element "' . $outerMostParentName) . '" was detected as outermost parent.', 1289318609);
                }
                $nestedStructure = array_merge(array($outerMostParentName => $outerMostParent), $outerMostParent->getNestedChildren());
                return $nestedStructure;
@@ -170,15 +172,16 @@ class t3lib_utility_Dependency {
        /**
         * Gets an instance of the factory to keep track of element or reference entities.
         *
-        * @return t3lib_utility_Dependency_Factory
+        * @return \TYPO3\CMS\Version\Dependency\DependencyEntityFactory
         */
        public function getFactory() {
                if (!isset($this->factory)) {
-                       $this->factory = t3lib_div::makeInstance('t3lib_utility_Dependency_Factory');
+                       $this->factory = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Version\\Dependency\\DependencyEntityFactory');
                }
                return $this->factory;
        }
 
 }
 
+
 ?>
\ No newline at end of file
index 88d8edc..022c181 100644 (file)
@@ -1,4 +1,6 @@
 <?php
+namespace TYPO3\CMS\Version\Dependency;
+
 /***************************************************************
  * Copyright notice
  *
 /**
  * Object to hold information on a dependent database element in abstract.
  */
-class t3lib_utility_Dependency_Element {
+class ElementEntity {
 
        const REFERENCES_ChildOf = 'childOf';
        const REFERENCES_ParentOf = 'parentOf';
-       const EVENT_Construct = 't3lib_utility_Dependency_Element::construct';
-       const EVENT_CreateChildReference = 't3lib_utility_Dependency_Element::createChildReference';
-       const EVENT_CreateParentReference = 't3lib_utility_Dependency_Element::createParentReference';
-       const RESPONSE_Skip = 't3lib_utility_Dependency_Element->skip';
+       const EVENT_Construct = 'TYPO3\\CMS\\Version\\Dependency\\DependencyResolver_Element::construct';
+       const EVENT_CreateChildReference = 'TYPO3\\CMS\\Version\\Dependency\\DependencyResolver_Element::createChildReference';
+       const EVENT_CreateParentReference = 'TYPO3\\CMS\\Version\\Dependency\\DependencyResolver_Element::createParentReference';
+       const RESPONSE_Skip = 'TYPO3\\CMS\\Version\\Dependency\\DependencyResolver_Element->skip';
        /**
         * @var string
         */
@@ -56,7 +58,7 @@ class t3lib_utility_Dependency_Element {
        protected $record;
 
        /**
-        * @var t3lib_utility_Dependency
+        * @var \TYPO3\CMS\Version\Dependency\DependencyResolver
         */
        protected $dependency;
 
@@ -76,7 +78,7 @@ class t3lib_utility_Dependency_Element {
        protected $traversingParents = FALSE;
 
        /**
-        * @var t3lib_utility_Dependency_Element
+        * @var \TYPO3\CMS\Version\Dependency\ElementEntity
         */
        protected $outerMostParent;
 
@@ -91,9 +93,9 @@ class t3lib_utility_Dependency_Element {
         * @param string $table
         * @param integer $id
         * @param array $data (optional)
-        * @param t3lib_utility_Dependency $dependency
+        * @param \TYPO3\CMS\Version\Dependency\DependencyResolver $dependency
         */
-       public function __construct($table, $id, array $data = array(), t3lib_utility_Dependency $dependency) {
+       public function __construct($table, $id, array $data = array(), \TYPO3\CMS\Version\Dependency\DependencyResolver $dependency) {
                $this->table = $table;
                $this->id = intval($id);
                $this->data = $data;
@@ -175,7 +177,7 @@ class t3lib_utility_Dependency_Element {
        /**
         * Gets the parent dependency object.
         *
-        * @return t3lib_utility_Dependency
+        * @return \TYPO3\CMS\Version\Dependency\DependencyResolver
         */
        public function getDependency() {
                return $this->dependency;
@@ -237,7 +239,7 @@ class t3lib_utility_Dependency_Element {
        /**
         * Gets the outermost parent element.
         *
-        * @return t3lib_utility_Dependency_Element
+        * @return \TYPO3\CMS\Version\Dependency\ElementEntity
         */
        public function getOuterMostParent() {
                if (!isset($this->outerMostParent)) {
@@ -246,10 +248,10 @@ class t3lib_utility_Dependency_Element {
                                $this->outerMostParent = $this;
                        } else {
                                $this->outerMostParent = FALSE;
-                               /** @var $parent t3lib_utility_Dependency_Reference */
+                               /** @var $parent \TYPO3\CMS\Version\Dependency\ReferenceEntity */
                                foreach ($parents as $parent) {
                                        $outerMostParent = $parent->getElement()->getOuterMostParent();
-                                       if ($outerMostParent instanceof t3lib_utility_Dependency_Element) {
+                                       if ($outerMostParent instanceof \TYPO3\CMS\Version\Dependency\ElementEntity) {
                                                $this->outerMostParent = $outerMostParent;
                                                break;
                                        } elseif ($outerMostParent === FALSE) {
@@ -270,7 +272,7 @@ class t3lib_utility_Dependency_Element {
                if (!isset($this->nestedChildren)) {
                        $this->nestedChildren = array();
                        $children = $this->getChildren();
-                       /** @var $child t3lib_utility_Dependency_Reference */
+                       /** @var $child \TYPO3\CMS\Version\Dependency\ReferenceEntity */
                        foreach ($children as $child) {
                                $this->nestedChildren = array_merge($this->nestedChildren, array($child->getElement()->__toString() => $child->getElement()), $child->getElement()->getNestedChildren());
                        }
@@ -307,4 +309,5 @@ class t3lib_utility_Dependency_Element {
 
 }
 
+
 ?>
\ No newline at end of file
index c655fef..b0d2159 100644 (file)
@@ -1,4 +1,6 @@
 <?php
+namespace TYPO3\CMS\Version\Dependency;
+
 /***************************************************************
  * Copyright notice
  *
@@ -27,7 +29,7 @@
 /**
  * Object to hold information on a callback to a defined object and method.
  */
-class t3lib_utility_Dependency_Callback {
+class EventCallback {
 
        /**
         * @var object
@@ -72,4 +74,5 @@ class t3lib_utility_Dependency_Callback {
 
 }
 
+
 ?>
\ No newline at end of file
index 0c902ab..6f70608 100644 (file)
@@ -1,4 +1,6 @@
 <?php
+namespace TYPO3\CMS\Version\Dependency;
+
 /***************************************************************
  * Copyright notice
  *
 /**
  * Object to hold reference information of a database field and one accordant element.
  */
-class t3lib_utility_Dependency_Reference {
+class ReferenceEntity {
 
        /**
-        * @var t3lib_utility_Dependency_Element
+        * @var \TYPO3\CMS\Version\Dependency\ElementEntity
         */
        protected $element;
 
@@ -42,10 +44,10 @@ class t3lib_utility_Dependency_Reference {
        /**
         * Creates this object.
         *
-        * @param t3lib_utility_Dependency_Element $element
+        * @param \TYPO3\CMS\Version\Dependency\ElementEntity $element
         * @param string $field
         */
-       public function __construct(t3lib_utility_Dependency_Element $element, $field) {
+       public function __construct(\TYPO3\CMS\Version\Dependency\ElementEntity $element, $field) {
                $this->element = $element;
                $this->field = $field;
        }
@@ -53,7 +55,7 @@ class t3lib_utility_Dependency_Reference {
        /**
         * Gets the elements.
         *
-        * @return t3lib_utility_Dependency_Element
+        * @return \TYPO3\CMS\Version\Dependency\ElementEntity
         */
        public function getElement() {
                return $this->element;
@@ -79,4 +81,5 @@ class t3lib_utility_Dependency_Reference {
 
 }
 
+
 ?>
\ No newline at end of file
index 0254f54..782cefc 100644 (file)
@@ -1,4 +1,6 @@
 <?php
+namespace TYPO3\CMS\Version\Hook;
+
 /***************************************************************
  *  Copyright notice
  *
@@ -30,7 +32,7 @@
  * Contains some parts for staging, versioning and workspaces
  * to interact with the TYPO3 Core Engine
  */
-class tx_version_tcemain {
+class DataHandlerHook {
 
        /**
         * For accumulating information about workspace stages raised
@@ -61,10 +63,10 @@ class tx_version_tcemain {
        /**
         * hook that is called before any cmd of the commandmap is executed
         *
-        * @param t3lib_TCEmain $tcemainObj reference to the main tcemain object
+        * @param \TYPO3\CMS\Core\DataHandler\DataHandler $tcemainObj reference to the main tcemain object
         * @return void
         */
-       public function processCmdmap_beforeStart(t3lib_TCEmain $tcemainObj) {
+       public function processCmdmap_beforeStart(\TYPO3\CMS\Core\DataHandler\DataHandler $tcemainObj) {
                // Reset notification array
                $this->notificationEmailInfo = array();
                // Resolve dependencies of version/workspaces actions:
@@ -79,10 +81,10 @@ class tx_version_tcemain {
         * @param integer $id the ID of the record
         * @param mixed $value the value containing the data
         * @param boolean $commandIsProcessed can be set so that other hooks or
-        * @param t3lib_TCEmain $tcemainObj reference to the main tcemain object
+        * @param \TYPO3\CMS\Core\DataHandler\DataHandler $tcemainObj reference to the main tcemain object
         * @return      void
         */
-       public function processCmdmap($command, $table, $id, $value, &$commandIsProcessed, t3lib_TCEmain $tcemainObj) {
+       public function processCmdmap($command, $table, $id, $value, &$commandIsProcessed, \TYPO3\CMS\Core\DataHandler\DataHandler $tcemainObj) {
                // custom command "version"
                if ($command == 'version') {
                        $commandIsProcessed = TRUE;
@@ -93,7 +95,7 @@ class tx_version_tcemain {
                                // or if "element" version can be used
                                $versionizeTree = -1;
                                if (isset($value['treeLevels'])) {
-                                       $versionizeTree = t3lib_utility_Math::forceIntegerInRange($value['treeLevels'], -1, 100);
+                                       $versionizeTree = \TYPO3\CMS\Core\Utility\MathUtility::forceIntegerInRange($value['treeLevels'], -1, 100);
                                }
                                if ($table == 'pages' && $versionizeTree >= 0) {
                                        $this->versionizePages($id, $value['label'], $versionizeTree, $tcemainObj);
@@ -111,7 +113,7 @@ class tx_version_tcemain {
                                $this->version_clearWSID($table, $id, TRUE, $tcemainObj);
                                break;
                        case 'setStage':
-                               $elementIds = t3lib_div::trimExplode(',', $id, TRUE);
+                               $elementIds = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $id, TRUE);
                                foreach ($elementIds as $elementId) {
                                        $this->version_setStage($table, $elementId, $value['stageId'], isset($value['comment']) && $value['comment'] ? $value['comment'] : $this->generalComment, TRUE, $tcemainObj, $value['notificationAlternativeRecipients']);
                                }
@@ -132,12 +134,12 @@ class tx_version_tcemain {
         * @param string $table
         * @param int $id
         * @param mixed $value
-        * @param t3lib_TCEmain $tcemain
+        * @param \TYPO3\CMS\Core\DataHandler\DataHandler $tcemain
         */
-       public function processCmdmap_postProcess($command, $table, $id, $value, t3lib_TCEmain $tcemain) {
+       public function processCmdmap_postProcess($command, $table, $id, $value, \TYPO3\CMS\Core\DataHandler\DataHandler $tcemain) {
                if ($command === 'move') {
                        if ($value < 0) {
-                               $movePlaceHolder = t3lib_BEfunc::getMovePlaceholder($table, abs($value), 'uid');
+                               $movePlaceHolder = \TYPO3\CMS\Backend\Utility\BackendUtility::getMovePlaceholder($table, abs($value), 'uid');
                                if ($movePlaceHolder !== FALSE) {
                                        $destPid = -$movePlaceHolder['uid'];
                                        $tcemain->moveRecord_raw($table, $id, $destPid);
@@ -150,10 +152,10 @@ class tx_version_tcemain {
         * hook that is called AFTER all commands of the commandmap was
         * executed
         *
-        * @param t3lib_TCEmain $tcemainObj reference to the main tcemain object
+        * @param \TYPO3\CMS\Core\DataHandler\DataHandler $tcemainObj reference to the main tcemain object
         * @return      void
         */
-       public function processCmdmap_afterFinish(t3lib_TCEmain $tcemainObj) {
+       public function processCmdmap_afterFinish(\TYPO3\CMS\Core\DataHandler\DataHandler $tcemainObj) {
                // Empty accumulation array:
                foreach ($this->notificationEmailInfo as $notifItem) {
                        $this->notifyStageChange($notifItem['shared'][0], $notifItem['shared'][1], implode(', ', $notifItem['elements']), 0, $notifItem['shared'][2], $tcemainObj, $notifItem['alternativeRecipients']);
@@ -172,10 +174,10 @@ class tx_version_tcemain {
         * @param integer $id the ID of the record
         * @param array $record The accordant database record
         * @param boolean $recordWasDeleted can be set so that other hooks or
-        * @param t3lib_TCEmain $tcemainObj reference to the main tcemain object
+        * @param \TYPO3\CMS\Core\DataHandler\DataHandler $tcemainObj reference to the main tcemain object
         * @return      void
         */
-       public function processCmdmap_deleteAction($table, $id, array $record, &$recordWasDeleted, t3lib_TCEmain $tcemainObj) {
+       public function processCmdmap_deleteAction($table, $id, array $record, &$recordWasDeleted, \TYPO3\CMS\Core\DataHandler\DataHandler $tcemainObj) {
                // only process the hook if it wasn't processed
                // by someone else before
                if (!$recordWasDeleted) {
@@ -183,7 +185,7 @@ class tx_version_tcemain {
                        // For Live version, try if there is a workspace version because if so, rather "delete" that instead
                        // Look, if record is an offline version, then delete directly:
                        if ($record['pid'] != -1) {
-                               if ($wsVersion = t3lib_BEfunc::getWorkspaceVersionOfRecord($tcemainObj->BE_USER->workspace, $table, $id)) {
+                               if ($wsVersion = \TYPO3\CMS\Backend\Utility\BackendUtility::getWorkspaceVersionOfRecord($tcemainObj->BE_USER->workspace, $table, $id)) {
                                        $record = $wsVersion;
                                        $id = $record['uid'];
                                }
@@ -193,7 +195,7 @@ class tx_version_tcemain {
                                if ($GLOBALS['TCA'][$table]['ctrl']['versioningWS']) {
                                        // In Live workspace, delete any. In other workspaces there must be match.
                                        if ($tcemainObj->BE_USER->workspace == 0 || (int) $record['t3ver_wsid'] == $tcemainObj->BE_USER->workspace) {
-                                               $liveRec = t3lib_BEfunc::getLiveVersionOfRecord($table, $id, 'uid,t3ver_state');
+                                               $liveRec = \TYPO3\CMS\Backend\Utility\BackendUtility::getLiveVersionOfRecord($table, $id, 'uid,t3ver_state');
                                                // Processing can be skipped if a delete placeholder shall be swapped/published
                                                // during the current request. Thus it will be deleted later on...
                                                if ((((($record['t3ver_state'] == 2 && !empty($liveRec['uid'])) && !empty($tcemainObj->cmdmap[$table][$liveRec['uid']]['version']['action'])) && !empty($tcemainObj->cmdmap[$table][$liveRec['uid']]['version']['swapWith'])) && $tcemainObj->cmdmap[$table][$liveRec['uid']]['version']['action'] === 'swap') && $tcemainObj->cmdmap[$table][$liveRec['uid']]['version']['swapWith'] == $id) {
@@ -223,7 +225,7 @@ class tx_version_tcemain {
                        } elseif ((int) $record['t3ver_state'] === 3) {
                                // Placeholders for moving operations are deletable directly.
                                // Get record which its a placeholder for and reset the t3ver_state of that:
-                               if ($wsRec = t3lib_BEfunc::getWorkspaceVersionOfRecord($record['t3ver_wsid'], $table, $record['t3ver_move_id'], 'uid')) {
+                               if ($wsRec = \TYPO3\CMS\Backend\Utility\BackendUtility::getWorkspaceVersionOfRecord($record['t3ver_wsid'], $table, $record['t3ver_move_id'], 'uid')) {
                                        // Clear the state flag of the workspace version of the record
                                        // Setting placeholder state value for version (so it can know it is currently a new version...)
                                        $updateFields = array(
@@ -238,7 +240,7 @@ class tx_version_tcemain {
                                $tcemainObj->versionizeRecord($table, $id, 'DELETED!', TRUE);
                                // Determine newly created versions:
                                // (remove placeholders are copied and modified, thus they appear in the copyMappingArray)
-                               $versionizedElements = t3lib_div::arrayDiffAssocRecursive($tcemainObj->copyMappingArray, $copyMappingArray);
+                               $versionizedElements = \TYPO3\CMS\Core\Utility\GeneralUtility::arrayDiffAssocRecursive($tcemainObj->copyMappingArray, $copyMappingArray);
                                // Delete localization overlays:
                                foreach ($versionizedElements as $versionizedTableName => $versionizedOriginalIds) {
                                        foreach ($versionizedOriginalIds as $versionizedOriginalId => $_) {
@@ -262,16 +264,16 @@ class tx_version_tcemain {
         * @param boolean $recordWasMoved can be set so that other hooks or
         * @param       $table  the table
         */
-       public function moveRecord($table, $uid, $destPid, array $propArr, array $moveRec, $resolvedPid, &$recordWasMoved, t3lib_TCEmain $tcemainObj) {
+       public function moveRecord($table, $uid, $destPid, array $propArr, array $moveRec, $resolvedPid, &$recordWasMoved, \TYPO3\CMS\Core\DataHandler\DataHandler $tcemainObj) {
                // Only do something in Draft workspace
                if ($tcemainObj->BE_USER->workspace !== 0) {
                        $recordWasMoved = TRUE;
                        // Get workspace version of the source record, if any:
-                       $WSversion = t3lib_BEfunc::getWorkspaceVersionOfRecord($tcemainObj->BE_USER->workspace, $table, $uid, 'uid,t3ver_oid');
+                       $WSversion = \TYPO3\CMS\Backend\Utility\BackendUtility::getWorkspaceVersionOfRecord($tcemainObj->BE_USER->workspace, $table, $uid, 'uid,t3ver_oid');
                        // If no version exists and versioningWS is in version 2, a new placeholder is made automatically:
                        if ((!$WSversion['uid'] && (int) $GLOBALS['TCA'][$table]['ctrl']['versioningWS'] >= 2) && (int) $moveRec['t3ver_state'] != 3) {
                                $tcemainObj->versionizeRecord($table, $uid, 'Placeholder version for moving record');
-                               $WSversion = t3lib_BEfunc::getWorkspaceVersionOfRecord($tcemainObj->BE_USER->workspace, $table, $uid, 'uid,t3ver_oid');
+                               $WSversion = \TYPO3\CMS\Backend\Utility\BackendUtility::getWorkspaceVersionOfRecord($tcemainObj->BE_USER->workspace, $table, $uid, 'uid,t3ver_oid');
                        }
                        // Check workspace permissions:
                        $workspaceAccessBlocked = array();
@@ -324,18 +326,18 @@ class tx_version_tcemain {
         * @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)
         * @param string $comment User comment sent along with action
-        * @param t3lib_TCEmain $tcemainObj TCEmain object
+        * @param \TYPO3\CMS\Core\DataHandler\DataHandler $tcemainObj TCEmain object
         * @param array $notificationAlternativeRecipients List of recipients to notify instead of be_users selected by sys_workspace, list is generated by workspace extension module
         * @return void
         */
-       protected function notifyStageChange(array $stat, $stageId, $table, $id, $comment, t3lib_TCEmain $tcemainObj, array $notificationAlternativeRecipients = array()) {
-               $workspaceRec = t3lib_BEfunc::getRecord('sys_workspace', $stat['uid']);
+       protected function notifyStageChange(array $stat, $stageId, $table, $id, $comment, \TYPO3\CMS\Core\DataHandler\DataHandler $tcemainObj, array $notificationAlternativeRecipients = array()) {
+               $workspaceRec = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecord('sys_workspace', $stat['uid']);
                // So, if $id is not set, then $table is taken to be the complete element name!
                $elementName = $id ? ($table . ':') . $id : $table;
                if (is_array($workspaceRec)) {
                        // Get the new stage title from workspaces library, if workspaces extension is installed
-                       if (t3lib_extMgm::isLoaded('workspaces')) {
-                               $stageService = t3lib_div::makeInstance('Tx_Workspaces_Service_Stages');
+                       if (\TYPO3\CMS\Core\Extension\ExtensionManager::isLoaded('workspaces')) {
+                               $stageService = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Workspaces\\Service\\StagesService');
                                $newStage = $stageService->getStageTitle((int) $stageId);
                        } else {
                                // TODO: CONSTANTS SHOULD BE USED - tx_service_workspace_workspaces
@@ -383,7 +385,7 @@ class tx_version_tcemain {
                                                        // Find all implicated since the last stage-raise from editing to review:
                                                        foreach ($rows as $dat) {
                                                                $data = unserialize($dat['log_data']);
-                                                               $emails = t3lib_div::array_merge($emails, $this->getEmailsForStageChangeNotification($dat['userid'], TRUE));
+                                                               $emails = \TYPO3\CMS\Core\Utility\GeneralUtility::array_merge($emails, $this->getEmailsForStageChangeNotification($dat['userid'], TRUE));
                                                                if ($data['stage'] == 1) {
                                                                        break;
                                                                }
@@ -400,8 +402,8 @@ class tx_version_tcemain {
                                        break;
                                case 10:
                                        $emails = $this->getEmailsForStageChangeNotification($workspaceRec['adminusers'], TRUE);
-                                       $emails = t3lib_div::array_merge($emails, $this->getEmailsForStageChangeNotification($workspaceRec['reviewers']));
-                                       $emails = t3lib_div::array_merge($emails, $this->getEmailsForStageChangeNotification($workspaceRec['members']));
+                                       $emails = \TYPO3\CMS\Core\Utility\GeneralUtility::array_merge($emails, $this->getEmailsForStageChangeNotification($workspaceRec['reviewers']));
+                                       $emails = \TYPO3\CMS\Core\Utility\GeneralUtility::array_merge($emails, $this->getEmailsForStageChangeNotification($workspaceRec['members']));
                                        break;
                                }
                        } else {
@@ -412,12 +414,12 @@ class tx_version_tcemain {
                                // Path to record is found:
                                list($elementTable, $elementUid) = explode(':', $elementName);
                                $elementUid = intval($elementUid);
-                               $elementRecord = t3lib_BEfunc::getRecord($elementTable, $elementUid);
-                               $recordTitle = t3lib_BEfunc::getRecordTitle($elementTable, $elementRecord);
+                               $elementRecord = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecord($elementTable, $elementUid);
+                               $recordTitle = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecordTitle($elementTable, $elementRecord);
                                if ($elementTable == 'pages') {
                                        $pageUid = $elementUid;
                                } else {
-                                       t3lib_BEfunc::fixVersioningPid($elementTable, $elementRecord);
+                                       \TYPO3\CMS\Backend\Utility\BackendUtility::fixVersioningPid($elementTable, $elementRecord);
                                        $pageUid = ($elementUid = $elementRecord['pid']);
                                }
                                // fetch the TSconfig settings for the email
@@ -426,13 +428,13 @@ class tx_version_tcemain {
                                // new way, options are
                                // pageTSconfig: tx_version.workspaces.stageNotificationEmail.subject
                                // userTSconfig: page.tx_version.workspaces.stageNotificationEmail.subject
-                               $pageTsConfig = t3lib_BEfunc::getPagesTSconfig($pageUid);
+                               $pageTsConfig = \TYPO3\CMS\Backend\Utility\BackendUtility::getPagesTSconfig($pageUid);
                                $emailConfig = $pageTsConfig['tx_version.']['workspaces.']['stageNotificationEmail.'];
                                $markers = array(
                                        '###RECORD_TITLE###' => $recordTitle,
-                                       '###RECORD_PATH###' => t3lib_BEfunc::getRecordPath($elementUid, '', 20),
+                                       '###RECORD_PATH###' => \TYPO3\CMS\Backend\Utility\BackendUtility::getRecordPath($elementUid, '', 20),
                                        '###SITE_NAME###' => $GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename'],
-                                       '###SITE_URL###' => t3lib_div::getIndpEnv('TYPO3_SITE_URL') . TYPO3_mainDir,
+                                       '###SITE_URL###' => \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_SITE_URL') . TYPO3_mainDir,
                                        '###WORKSPACE_TITLE###' => $workspaceRec['title'],
                                        '###WORKSPACE_UID###' => $workspaceRec['uid'],
                                        '###ELEMENT_NAME###' => $elementName,
@@ -444,10 +446,10 @@ class tx_version_tcemain {
                                        '###USER_USERNAME###' => $tcemainObj->BE_USER->user['username']
                                );
                                // add marker for preview links if workspace extension is loaded
-                               if (t3lib_extMgm::isLoaded('workspaces')) {
-                                       $this->workspaceService = t3lib_div::makeInstance('tx_Workspaces_Service_Workspaces');
+                               if (\TYPO3\CMS\Core\Extension\ExtensionManager::isLoaded('workspaces')) {
+                                       $this->workspaceService = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('tx_Workspaces_Service_Workspaces');
                                        // only generate the link if the marker is in the template - prevents database from getting to much entries
-                                       if (t3lib_div::isFirstPartOfStr($emailConfig['message'], 'LLL:')) {
+                                       if (\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($emailConfig['message'], 'LLL:')) {
                                                $tempEmailMessage = $GLOBALS['LANG']->sL($emailConfig['message']);
                                        } else {
                                                $tempEmailMessage = $emailConfig['message'];
@@ -461,7 +463,7 @@ class tx_version_tcemain {
                                // Hook for preprocessing of the content for formmails:
                                if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/version/class.tx_version_tcemain.php']['notifyStageChange-postModifyMarkers'])) {
                                        foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/version/class.tx_version_tcemain.php']['notifyStageChange-postModifyMarkers'] as $_classRef) {
-                                               $_procObj =& t3lib_div::getUserObj($_classRef);
+                                               $_procObj =& \TYPO3\CMS\Core\Utility\GeneralUtility::getUserObj($_classRef);
                                                $markers = $_procObj->postModifyMarkers($markers, $this);
                                        }
                                }
@@ -485,29 +487,29 @@ class tx_version_tcemain {
                                        $emailRecipients[$recipientData['email']] = $recipientData['email'];
                                        // check if the email needs to be localized
                                        // in the users' language
-                                       if (t3lib_div::isFirstPartOfStr($emailSubject, 'LLL:') || t3lib_div::isFirstPartOfStr($emailMessage, 'LLL:')) {
+                                       if (\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($emailSubject, 'LLL:') || \TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($emailMessage, 'LLL:')) {
                                                $recipientLanguage = $recipientData['lang'] ? $recipientData['lang'] : 'default';
                                                if (!isset($languageObjects[$recipientLanguage])) {
                                                        // a LANG object in this language hasn't been
                                                        // instantiated yet, so this is done here
-                                                       /** @var $languageObject language */
-                                                       $languageObject = t3lib_div::makeInstance('language');
+                                                       /** @var $languageObject \TYPO3\CMS\Lang\LanguageService */
+                                                       $languageObject = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Lang\\LanguageService');
                                                        $languageObject->init($recipientLanguage);
                                                        $languageObjects[$recipientLanguage] = $languageObject;
                                                } else {
                                                        $languageObject = $languageObjects[$recipientLanguage];
                                                }
-                                               if (t3lib_div::isFirstPartOfStr($emailSubject, 'LLL:')) {
+                                               if (\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($emailSubject, 'LLL:')) {
                                                        $emailSubject = $languageObject->sL($emailSubject);
                                                }
-                                               if (t3lib_div::isFirstPartOfStr($emailMessage, 'LLL:')) {
+                                               if (\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($emailMessage, 'LLL:')) {
                                                        $emailMessage = $languageObject->sL($emailMessage);
                                                }
                                        }
-                                       $emailSubject = t3lib_parseHtml::substituteMarkerArray($emailSubject, $markers, '', TRUE, TRUE);
-                                       $emailMessage = t3lib_parseHtml::substituteMarkerArray($emailMessage, $markers, '', TRUE, TRUE);
+                                       $emailSubject = \t3lib_parseHtml::substituteMarkerArray($emailSubject, $markers, '', TRUE, TRUE);
+                                       $emailMessage = \t3lib_parseHtml::substituteMarkerArray($emailMessage, $markers, '', TRUE, TRUE);
                                        // Send an email to the recipient
-                                       t3lib_div::plainMailEncoded($recipientData['email'], $emailSubject, $emailMessage, $emailHeaders);
+                                       \TYPO3\CMS\Core\Utility\GeneralUtility::plainMailEncoded($recipientData['email'], $emailSubject, $emailMessage, $emailHeaders);
                                }
                                $emailRecipients = implode(',', $emailRecipients);
                                $tcemainObj->newlog2(('Notification email for stage change was sent to "' . $emailRecipients) . '"', $table, $id);
@@ -524,16 +526,16 @@ class tx_version_tcemain {
         * @return      array           Array of emails
         */
        protected function getEmailsForStageChangeNotification($listOfUsers, $noTablePrefix = FALSE) {
-               $users = t3lib_div::trimExplode(',', $listOfUsers, 1);
+               $users = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $listOfUsers, 1);
                $emails = array();
                foreach ($users as $userIdent) {
                        if ($noTablePrefix) {
                                $id = intval($userIdent);
                        } else {
-                               list($table, $id) = t3lib_div::revExplode('_', $userIdent, 2);
+                               list($table, $id) = \TYPO3\CMS\Core\Utility\GeneralUtility::revExplode('_', $userIdent, 2);
                        }
                        if ($table === 'be_users' || $noTablePrefix) {
-                               if ($userRecord = t3lib_BEfunc::getRecord('be_users', $id, 'uid,email,lang,realName', t3lib_BEfunc::BEenableFields('be_users'))) {
+                               if ($userRecord = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecord('be_users', $id, 'uid,email,lang,realName', \TYPO3\CMS\Backend\Utility\BackendUtility::BEenableFields('be_users'))) {
                                        if (strlen(trim($userRecord['email']))) {
                                                $emails[$id] = $userRecord;
                                        }
@@ -554,15 +556,15 @@ class tx_version_tcemain {
         * @param integer $stageId Stage ID to set
         * @param string $comment Comment that goes into log
         * @param boolean $notificationEmailInfo Accumulate state changes in memory for compiled notification email?
-        * @param t3lib_TCEmain $tcemainObj TCEmain object
+        * @param \TYPO3\CMS\Core\DataHandler\DataHandler $tcemainObj TCEmain object
         * @param array $notificationAlternativeRecipients comma separated list of recipients to notify instead of normal be_users
         * @return void
         */
-       protected function version_setStage($table, $id, $stageId, $comment = '', $notificationEmailInfo = FALSE, t3lib_TCEmain $tcemainObj, array $notificationAlternativeRecipients = array()) {
+       protected function version_setStage($table, $id, $stageId, $comment = '', $notificationEmailInfo = FALSE, \TYPO3\CMS\Core\DataHandler\DataHandler $tcemainObj, array $notificationAlternativeRecipients = array()) {
                if ($errorCode = $tcemainObj->BE_USER->workspaceCannotEditOfflineVersion($table, $id)) {
                        $tcemainObj->newlog('Attempt to set stage for record failed: ' . $errorCode, 1);
                } elseif ($tcemainObj->checkRecordUpdateAccess($table, $id)) {
-                       $record = t3lib_BEfunc::getRecord($table, $id);
+                       $record = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecord($table, $id);
                        $stat = $tcemainObj->BE_USER->checkWorkspace($record['t3ver_wsid']);
                        // check if the usere is allowed to the current stage, so it's also allowed to send to next stage
                        if ($GLOBALS['BE_USER']->workspaceCheckStageForCurrent($record['t3ver_stage'])) {
@@ -600,11 +602,11 @@ class tx_version_tcemain {
         * @param integer $uid Page uid to create new version of.
         * @param string $label Version label
         * @param integer $versionizeTree Indicating "treeLevel" - "page" (0) or "branch" (>=1) ["element" type must call versionizeRecord() directly]
-        * @param t3lib_TCEmain $tcemainObj TCEmain object
+        * @param \TYPO3\CMS\Core\DataHandler\DataHandler $tcemainObj TCEmain object
         * @return void
         * @see copyPages()
         */
-       protected function versionizePages($uid, $label, $versionizeTree, t3lib_TCEmain $tcemainObj) {
+       protected function versionizePages($uid, $label, $versionizeTree, \TYPO3\CMS\Core\DataHandler\DataHandler $tcemainObj) {
                $uid = intval($uid);
                // returns the branch
                $brExist = $tcemainObj->doesBranchExist('', $uid, $tcemainObj->pMap['show'], 1);
@@ -661,15 +663,15 @@ class tx_version_tcemain {
         * @param integer $id UID of the online record to swap
         * @param integer $swapWith UID of the archived version to swap with!
         * @param boolean $swapIntoWS If set, swaps online into workspace instead of publishing out of workspace.
-        * @param t3lib_TCEmain $tcemainObj TCEmain object
+        * @param \TYPO3\CMS\Core\DataHandler\DataHandler $tcemainObj TCEmain object
         * @return void
         */
-       protected function version_swap($table, $id, $swapWith, $swapIntoWS = 0, t3lib_TCEmain $tcemainObj) {
+       protected function version_swap($table, $id, $swapWith, $swapIntoWS = 0, \TYPO3\CMS\Core\DataHandler\DataHandler $tcemainObj) {
                // First, check if we may actually edit the online record
                if ($tcemainObj->checkRecordUpdateAccess($table, $id)) {
                        // Select the two versions:
-                       $curVersion = t3lib_BEfunc::getRecord($table, $id, '*');
-                       $swapVersion = t3lib_BEfunc::getRecord($table, $swapWith, '*');
+                       $curVersion = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecord($table, $id, '*');
+                       $swapVersion = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecord($table, $swapWith, '*');
                        $movePlh = array();
                        $movePlhID = 0;
                        if (is_array($curVersion) && is_array($swapVersion)) {
@@ -684,7 +686,7 @@ class tx_version_tcemain {
                                                                        $lockFileName = ((((PATH_site . 'typo3temp/swap_locking/') . $table) . ':') . $id) . '.ser';
                                                                        if (!@is_file($lockFileName)) {
                                                                                // Write lock-file:
-                                                                               t3lib_div::writeFileToTypo3tempDir($lockFileName, serialize(array(
+                                                                               \TYPO3\CMS\Core\Utility\GeneralUtility::writeFileToTypo3tempDir($lockFileName, serialize(array(
                                                                                        'tstamp' => $GLOBALS['EXEC_TIME'],
                                                                                        'user' => $tcemainObj->BE_USER->user['username'],
                                                                                        'curVersion' => $curVersion,
@@ -738,7 +740,7 @@ class tx_version_tcemain {
                                                                                // Moving element.
                                                                                if ((int) $GLOBALS['TCA'][$table]['ctrl']['versioningWS'] >= 2) {
                                                                                        //  && $t3ver_state['swapVersion']==4   // Maybe we don't need this?
-                                                                                       if ($plhRec = t3lib_BEfunc::getMovePlaceholder($table, $id, 't3ver_state,pid,uid' . ($GLOBALS['TCA'][$table]['ctrl']['sortby'] ? ',' . $GLOBALS['TCA'][$table]['ctrl']['sortby'] : ''))) {
+                                                                                       if ($plhRec = \TYPO3\CMS\Backend\Utility\BackendUtility::getMovePlaceholder($table, $id, 't3ver_state,pid,uid' . ($GLOBALS['TCA'][$table]['ctrl']['sortby'] ? ',' . $GLOBALS['TCA'][$table]['ctrl']['sortby'] : ''))) {
                                                                                                $movePlhID = $plhRec['uid'];
                                                                                                $movePlh['pid'] = $swapVersion['pid'];
                                                                                                $swapVersion['pid'] = intval($plhRec['pid']);
@@ -878,21 +880,21 @@ class tx_version_tcemain {
         * @param array $conf: TCA configuration of current field
         * @param array $curVersion: Reference to the current (original) record
         * @param array $swapVersion: Reference to the record (workspace/versionized) to publish in or swap with
-        * @param t3lib_TCEmain $tcemainObj TCEmain object
+        * @param \TYPO3\CMS\Core\DataHandler\DataHandler $tcemainObj TCEmain object
         * @return void
         */
-       protected function version_swap_procBasedOnFieldType($table, $field, array $conf, array &$curVersion, array &$swapVersion, t3lib_TCEmain $tcemainObj) {
+       protected function version_swap_procBasedOnFieldType($table, $field, array $conf, array &$curVersion, array &$swapVersion, \TYPO3\CMS\Core\DataHandler\DataHandler $tcemainObj) {
                $inlineType = $tcemainObj->getInlineFieldType($conf);
                // Process pointer fields on normalized database:
                if ($inlineType == 'field') {
                        // Read relations that point to the current record (e.g. live record):
-                       /** @var $dbAnalysisCur t3lib_loadDBGroup */
-                       $dbAnalysisCur = t3lib_div::makeInstance('t3lib_loadDBGroup');
+                       /** @var $dbAnalysisCur \TYPO3\CMS\Core\Database\RelationHandler */
+                       $dbAnalysisCur = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Database\\RelationHandler');
                        $dbAnalysisCur->setUpdateReferenceIndex(FALSE);
                        $dbAnalysisCur->start('', $conf['foreign_table'], '', $curVersion['uid'], $table, $conf);
                        // Read relations that point to the record to be swapped with e.g. draft record):
-                       /** @var $dbAnalysisSwap t3lib_loadDBGroup */
-                       $dbAnalysisSwap = t3lib_div::makeInstance('t3lib_loadDBGroup');
+                       /** @var $dbAnalysisSwap \TYPO3\CMS\Core\Database\RelationHandler */
+                       $dbAnalysisSwap = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Database\\RelationHandler');
                        $dbAnalysisSwap->setUpdateReferenceIndex(FALSE);
                        $dbAnalysisSwap->start('', $conf['foreign_table'], '', $swapVersion['uid'], $table, $conf);
                        // Update relations for both (workspace/versioning) sites:
@@ -918,12 +920,12 @@ class tx_version_tcemain {
        /**
         * Writes remapped foreign field (IRRE).
         *
-        * @param t3lib_loadDBGroup $dbAnalysis Instance that holds the sorting order of child records
+        * @param \TYPO3\CMS\Core\Database\RelationHandler $dbAnalysis Instance that holds the sorting order of child records
         * @param array $configuration The TCA field configuration
         * @param integer $parentId The uid of the parent record
         * @return void
         */
-       public function writeRemappedForeignField(t3lib_loadDBGroup $dbAnalysis, array $configuration, $parentId) {
+       public function writeRemappedForeignField(\TYPO3\CMS\Core\Database\RelationHandler $dbAnalysis, array $configuration, $parentId) {
                foreach ($dbAnalysis->itemArray as &$item) {
                        if (isset($this->remappedIds[$item['table']][$item['id']])) {
                                $item['id'] = $this->remappedIds[$item['table']][$item['id']];
@@ -938,14 +940,14 @@ class tx_version_tcemain {
         * @param string $table Table name
         * @param integer $id Record UID
         * @param boolean $flush If set, will completely delete element
-        * @param t3lib_TCEmain $tcemainObj TCEmain object
+        * @param \TYPO3\CMS\Core\DataHandler\DataHandler $tcemainObj TCEmain object
         * @return      void
         */
-       protected function version_clearWSID($table, $id, $flush = FALSE, t3lib_TCEmain $tcemainObj) {
+       protected function version_clearWSID($table, $id, $flush = FALSE, \TYPO3\CMS\Core\DataHandler\DataHandler $tcemainObj) {
                if ($errorCode = $tcemainObj->BE_USER->workspaceCannotEditOfflineVersion($table, $id)) {
                        $tcemainObj->newlog('Attempt to reset workspace for record failed: ' . $errorCode, 1);
                } elseif ($tcemainObj->checkRecordUpdateAccess($table, $id)) {
-                       if ($liveRec = t3lib_BEfunc::getLiveVersionOfRecord($table, $id, 'uid,t3ver_state')) {
+                       if ($liveRec = \TYPO3\CMS\Backend\Utility\BackendUtility::getLiveVersionOfRecord($table, $id, 'uid,t3ver_state')) {
                                // Clear workspace ID:
                                $updateData = array(
                                        't3ver_wsid' => 0,
@@ -960,13 +962,13 @@ class tx_version_tcemain {
                                }
                                // If "deleted" flag is set for the version that got released
                                // it doesn't make sense to keep that "placeholder" anymore and we delete it completly.
-                               $wsRec = t3lib_BEfunc::getRecord($table, $id);
+                               $wsRec = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecord($table, $id);
                                if ($flush || ((int) $wsRec['t3ver_state'] == 1 || (int) $wsRec['t3ver_state'] == 2)) {
                                        $tcemainObj->deleteEl($table, $id, TRUE, TRUE);
                                }
                                // Remove the move-placeholder if found for live record.
                                if ((int) $GLOBALS['TCA'][$table]['ctrl']['versioningWS'] >= 2) {
-                                       if ($plhRec = t3lib_BEfunc::getMovePlaceholder($table, $liveRec['uid'], 'uid')) {
+                                       if ($plhRec = \TYPO3\CMS\Backend\Utility\BackendUtility::getMovePlaceholder($table, $liveRec['uid'], 'uid')) {
                                                $tcemainObj->deleteEl($table, $plhRec['uid'], TRUE, TRUE);
                                        }
                                }
@@ -986,11 +988,11 @@ class tx_version_tcemain {
         * @param integer $oldPageId Current page id.
         * @param integer $newPageId New page id
         * @param array $copyTablesArray Array of tables from which to copy
-        * @param t3lib_TCEmain $tcemainObj TCEmain object
+        * @param \TYPO3\CMS\Core\DataHandler\DataHandler $tcemainObj TCEmain object
         * @return void
         * @see versionizePages()
         */
-       protected function rawCopyPageContent($oldPageId, $newPageId, array $copyTablesArray, t3lib_TCEmain $tcemainObj) {
+       protected function rawCopyPageContent($oldPageId, $newPageId, array $copyTablesArray, \TYPO3\CMS\Core\DataHandler\DataHandler $tcemainObj) {
                if ($newPageId) {
                        foreach ($copyTablesArray as $table) {
                                // all records under the page is copied.
@@ -1018,16 +1020,16 @@ class tx_version_tcemain {
         * @return array Element data. Key is table name, values are array with first element as online UID, second - offline UID
         */
        public function findPageElementsForVersionSwap($table, $id, $offlineId) {
-               $rec = t3lib_BEfunc::getRecord($table, $offlineId, 't3ver_wsid');
+               $rec = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecord($table, $offlineId, 't3ver_wsid');
                $workspaceId = $rec['t3ver_wsid'];
                $elementData = array();
                if ($workspaceId != 0) {
                        // Get page UID for LIVE and workspace
                        if ($table != 'pages') {
-                               $rec = t3lib_BEfunc::getRecord($table, $id, 'pid');
+                               $rec = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecord($table, $id, 'pid');
                                $pageId = $rec['pid'];
-                               $rec = t3lib_BEfunc::getRecord('pages', $pageId);
-                               t3lib_BEfunc::workspaceOL('pages', $rec, $workspaceId);
+                               $rec = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecord('pages', $pageId);
+                               \TYPO3\CMS\Backend\Utility\BackendUtility::workspaceOL('pages', $rec, $workspaceId);
                                $offlinePageId = $rec['_ORIG_uid'];
                        } else {
                                $pageId = $id;
@@ -1036,7 +1038,7 @@ class tx_version_tcemain {
                        // Traversing all tables supporting versioning:
                        foreach ($GLOBALS['TCA'] as $table => $cfg) {
                                if ($GLOBALS['TCA'][$table]['ctrl']['versioningWS'] && $table !== 'pages') {
-                                       $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('A.uid AS offlineUid, B.uid AS uid', (($table . ' A,') . $table) . ' B', ((((('A.pid=-1 AND B.pid=' . $pageId) . ' AND A.t3ver_wsid=') . $workspaceId) . ' AND B.uid=A.t3ver_oid') . t3lib_BEfunc::deleteClause($table, 'A')) . t3lib_BEfunc::deleteClause($table, 'B'));
+                                       $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('A.uid AS offlineUid, B.uid AS uid', (($table . ' A,') . $table) . ' B', ((((('A.pid=-1 AND B.pid=' . $pageId) . ' AND A.t3ver_wsid=') . $workspaceId) . ' AND B.uid=A.t3ver_oid') . \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause($table, 'A')) . \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause($table, 'B'));
                                        while (FALSE != ($row = $GLOBALS['TYPO3_DB']->sql_fetch_row($res))) {
                                                $elementData[$table][] = array($row[1], $row[0]);
                                        }
@@ -1063,7 +1065,7 @@ class tx_version_tcemain {
                        // Traversing all tables supporting versioning:
                        foreach ($GLOBALS['TCA'] as $table => $cfg) {
                                if ($GLOBALS['TCA'][$table]['ctrl']['versioningWS'] && $table !== 'pages') {
-                                       $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('DISTINCT A.uid', (($table . ' A,') . $table) . ' B', (((((('A.pid=-1' . ' AND A.t3ver_wsid=') . $workspaceId) . ' AND B.pid IN (') . implode(',', $pageIdList)) . ') AND A.t3ver_oid=B.uid') . t3lib_BEfunc::deleteClause($table, 'A')) . t3lib_BEfunc::deleteClause($table, 'B'));
+                                       $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('DISTINCT A.uid', (($table . ' A,') . $table) . ' B', (((((('A.pid=-1' . ' AND A.t3ver_wsid=') . $workspaceId) . ' AND B.pid IN (') . implode(',', $pageIdList)) . ') AND A.t3ver_oid=B.uid') . \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause($table, 'A')) . \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause($table, 'B'));
                                        while (FALSE !== ($row = $GLOBALS['TYPO3_DB']->sql_fetch_row($res))) {
                                                $elementList[$table][] = $row[0];
                                        }
@@ -1090,14 +1092,14 @@ class tx_version_tcemain {
         */
        public function findPageIdsForVersionStateChange($table, array $idList, $workspaceId, array &$pageIdList, array &$elementList) {
                if ($workspaceId != 0) {
-                       $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('DISTINCT B.pid', (($table . ' A,') . $table) . ' B', (((((('A.pid=-1' . ' AND A.t3ver_wsid=') . $workspaceId) . ' AND A.uid IN (') . implode(',', $idList)) . ') AND A.t3ver_oid=B.uid') . t3lib_BEfunc::deleteClause($table, 'A')) . t3lib_BEfunc::deleteClause($table, 'B'));
+                       $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('DISTINCT B.pid', (($table . ' A,') . $table) . ' B', (((((('A.pid=-1' . ' AND A.t3ver_wsid=') . $workspaceId) . ' AND A.uid IN (') . implode(',', $idList)) . ') AND A.t3ver_oid=B.uid') . \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause($table, 'A')) . \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause($table, 'B'));
                        while (FALSE !== ($row = $GLOBALS['TYPO3_DB']->sql_fetch_row($res))) {
                                $pageIdList[] = $row[0];
                                // Find ws version
                                // Note: cannot use t3lib_BEfunc::getRecordWSOL()
                                // here because it does not accept workspace id!
-                               $rec = t3lib_BEfunc::getRecord('pages', $row[0]);
-                               t3lib_BEfunc::workspaceOL('pages', $rec, $workspaceId);
+                               $rec = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecord('pages', $row[0]);
+                               \TYPO3\CMS\Backend\Utility\BackendUtility::workspaceOL('pages', $rec, $workspaceId);
                                if ($rec['_ORIG_uid']) {
                                        $elementList['pages'][$row[0]] = $rec['_ORIG_uid'];
                                }
@@ -1117,7 +1119,7 @@ class tx_version_tcemain {
         */
        public function findRealPageIds(array &$idList) {
                foreach ($idList as $key => $id) {
-                       $rec = t3lib_BEfunc::getRecord('pages', $id, 't3ver_oid');
+                       $rec = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecord('pages', $id, 't3ver_oid');
                        if ($rec['t3ver_oid'] > 0) {
                                $idList[$key] = $rec['t3ver_oid'];
                        }
@@ -1134,21 +1136,21 @@ class tx_version_tcemain {
         * @param integer $uid Record uid to move (online record)
         * @param integer $destPid Position to move to: $destPid: >=0 then it points to a page-id on which to insert the record (as the first element). <0 then it points to a uid from its own table after which to insert it (works if
         * @param integer $wsUid UID of offline version of online record
-        * @param t3lib_TCEmain $tcemainObj TCEmain object
+        * @param \TYPO3\CMS\Core\DataHandler\DataHandler $tcemainObj TCEmain object
         * @return void
         * @see moveRecord()
         */
-       protected function moveRecord_wsPlaceholders($table, $uid, $destPid, $wsUid, t3lib_TCEmain $tcemainObj) {
+       protected function moveRecord_wsPlaceholders($table, $uid, $destPid, $wsUid, \TYPO3\CMS\Core\DataHandler\DataHandler $tcemainObj) {
                // If a record gets moved after a record that already has a placeholder record
                // then the new placeholder record needs to be after the existing one
                $originalRecordDestinationPid = $destPid;
                if ($destPid < 0) {
-                       $movePlaceHolder = t3lib_BEfunc::getMovePlaceholder($table, abs($destPid), 'uid');
+                       $movePlaceHolder = \TYPO3\CMS\Backend\Utility\BackendUtility::getMovePlaceholder($table, abs($destPid), 'uid');
                        if ($movePlaceHolder !== FALSE) {
                                $destPid = -$movePlaceHolder['uid'];
                        }
                }
-               if ($plh = t3lib_BEfunc::getMovePlaceholder($table, $uid, 'uid')) {
+               if ($plh = \TYPO3\CMS\Backend\Utility\BackendUtility::getMovePlaceholder($table, $uid, 'uid')) {
                        // If already a placeholder exists, move it:
                        $tcemainObj->moveRecord_raw($table, $plh['uid'], $destPid);
                } else {
@@ -1167,7 +1169,7 @@ class tx_version_tcemain {
                        if ($table == 'pages') {
                                // Copy page access settings from original page to placeholder
                                $perms_clause = $tcemainObj->BE_USER->getPagePermsClause(1);
-                               $access = t3lib_BEfunc::readPageAccess($uid, $perms_clause);
+                               $access = \TYPO3\CMS\Backend\Utility\BackendUtility::readPageAccess($uid, $perms_clause);
                                $newVersion_placeholderFieldArray['perms_userid'] = $access['perms_userid'];
                                $newVersion_placeholderFieldArray['perms_groupid'] = $access['perms_groupid'];
                                $newVersion_placeholderFieldArray['perms_user'] = $access['perms_user'];
@@ -1183,7 +1185,7 @@ class tx_version_tcemain {
                        $newVersion_placeholderFieldArray[$GLOBALS['TCA'][$table]['ctrl']['label']] = ((('[MOVE-TO PLACEHOLDER for #' . $uid) . ', WS#') . $tcemainObj->BE_USER->workspace) . ']';
                        // moving localized records requires to keep localization-settings for the placeholder too
                        if (array_key_exists('languageField', $GLOBALS['TCA'][$table]['ctrl']) && array_key_exists('transOrigPointerField', $GLOBALS['TCA'][$table]['ctrl'])) {
-                               $l10nParentRec = t3lib_BEfunc::getRecord($table, $uid);
+                               $l10nParentRec = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecord($table, $uid);
                                $newVersion_placeholderFieldArray[$GLOBALS['TCA'][$table]['ctrl']['languageField']] = $l10nParentRec[$GLOBALS['TCA'][$table]['ctrl']['languageField']];
                                $newVersion_placeholderFieldArray[$GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField']] = $l10nParentRec[$GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField']];
                                unset($l10nParentRec);
@@ -1214,7 +1216,7 @@ class tx_version_tcemain {
         * @return array
         */
        protected function getPossibleInlineChildTablesOfParentTable($parentTable, array $possibleInlineChildren = array()) {
-               t3lib_div::loadTCA($parentTable);
+               \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($parentTable);
                foreach ($GLOBALS['TCA'][$parentTable]['columns'] as $parentField => $parentFieldDefinition) {
                        if (isset($parentFieldDefinition['config']['type'])) {
                                $parentFieldConfiguration = $parentFieldDefinition['config'];
@@ -1231,12 +1233,12 @@ class tx_version_tcemain {
        /**
         * Gets an instance of the command map helper.
         *
-        * @param t3lib_TCEmain $tceMain TCEmain object
+        * @param \TYPO3\CMS\Core\DataHandler\DataHandler $tceMain TCEmain object
         * @param array $commandMap The command map as submitted to t3lib_TCEmain
-        * @return tx_version_tcemain_CommandMap
+        * @return \TYPO3\CMS\Version\DataHandler\CommandMap
         */
-       public function getCommandMap(t3lib_TCEmain $tceMain, array $commandMap) {
-               return t3lib_div::makeInstance('tx_version_tcemain_CommandMap', $this, $tceMain, $commandMap);
+       public function getCommandMap(\TYPO3\CMS\Core\DataHandler\DataHandler $tceMain, array $commandMap) {
+               return \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Version\\DataHandler\\CommandMap', $this, $tceMain, $commandMap);
        }
 
        /**
@@ -1247,11 +1249,11 @@ class tx_version_tcemain {
         */
        protected function getUniqueFields($table) {
                $listArr = array();
-               t3lib_div::loadTCA($table);
+               \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($table);
                if ($GLOBALS['TCA'][$table]['columns']) {
                        foreach ($GLOBALS['TCA'][$table]['columns'] as $field => $configArr) {
                                if ($configArr['config']['type'] === 'input') {
-                                       $evalCodesArray = t3lib_div::trimExplode(',', $configArr['config']['eval'], 1);
+                                       $evalCodesArray = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $configArr['config']['eval'], 1);
                                        if (in_array('uniqueInPid', $evalCodesArray) || in_array('unique', $evalCodesArray)) {
                                                $listArr[] = $field;
                                        }
@@ -1263,4 +1265,5 @@ class tx_version_tcemain {
 
 }
 
+
 ?>
\ No newline at end of file
index 27a47a0..ed29cfa 100644 (file)
@@ -1,4 +1,6 @@
 <?php
+namespace TYPO3\CMS\Version\Hook;
+
 /***************************************************************
  *  Copyright notice
  *
@@ -28,7 +30,7 @@
 /**
  * Implements a hook for t3lib_iconworks
  */
-class tx_version_iconworks {
+class IconUtilityHook {
 
        /**
         * Visualizes the deleted status for a versionized record.
@@ -46,4 +48,5 @@ class tx_version_iconworks {
 
 }
 
+
 ?>
\ No newline at end of file
index b41661b..3b23365 100644 (file)
@@ -1,4 +1,6 @@
 <?php
+namespace TYPO3\CMS\Version\Hook;
+
 /***************************************************************
  *  Copyright notice
  *
@@ -31,7 +33,7 @@
  * @author Workspaces Team (http://forge.typo3.org/projects/show/typo3v4-workspaces)
  * @package Version
  */
-class Tx_Version_Preview implements t3lib_Singleton {
+class PreviewHook implements \TYPO3\CMS\Core\SingletonInterface {
 
        /**
         * the GET parameter to be used
@@ -43,7 +45,7 @@ class Tx_Version_Preview implements t3lib_Singleton {
        /**
         * instance of the tslib_fe object
         *
-        * @var tslib_fe
+        * @var \TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController
         */
        protected $tsfeObj;
 
@@ -70,7 +72,7 @@ class Tx_Version_Preview implements t3lib_Singleton {
                        // re-initialize the TSFE object:
                        // because the GET variables are taken from the preview
                        // configuration
-                       $GLOBALS['TSFE'] = ($this->tsfeObj = t3lib_div::makeInstance('tslib_fe', $GLOBALS['TYPO3_CONF_VARS'], t3lib_div::_GP('id'), t3lib_div::_GP('type'), t3lib_div::_GP('no_cache'), t3lib_div::_GP('cHash'), t3lib_div::_GP('jumpurl'), t3lib_div::_GP('MP'), t3lib_div::_GP('RDCT')));
+                       $GLOBALS['TSFE'] = ($this->tsfeObj = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Frontend\\Controller\\TypoScriptFrontendController', $GLOBALS['TYPO3_CONF_VARS'], \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('id'), \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('type'), \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('no_cache'), \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('cHash'), \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('jumpurl'), \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('MP'), \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('RDCT')));
                        // Configuration after initialization of TSFE object.
                        // Basically this unsets the BE cookie if any and forces
                        // the BE user set according to the preview configuration.
@@ -92,7 +94,7 @@ class Tx_Version_Preview implements t3lib_Singleton {
        public function initializePreviewUser(&$params, &$pObj) {
                if (((is_null($params['BE_USER']) || $params['BE_USER'] === FALSE) && $this->previewConfiguration !== FALSE) && $this->previewConfiguration['BEUSER_uid'] > 0) {
                        // New backend user object
-                       $BE_USER = t3lib_div::makeInstance('t3lib_tsfeBeUserAuth');
+                       $BE_USER = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\FrontendBackendUserAuthentication');
                        $BE_USER->userTS_dontGetCached = 1;
                        $BE_USER->OS = TYPO3_OS;
                        $BE_USER->setBeUserByUid($this->previewConfiguration['BEUSER_uid']);
@@ -111,7 +113,7 @@ class Tx_Version_Preview implements t3lib_Singleton {
                // if there is a valid BE user, and the full workspace should be
                // previewed, the workspacePreview option shouldbe set
                $workspaceUid = $this->previewConfiguration['fullWorkspace'];
-               if (($pObj->beUserLogin && is_object($params['BE_USER'])) && t3lib_utility_Math::canBeInterpretedAsInteger($workspaceUid)) {
+               if (($pObj->beUserLogin && is_object($params['BE_USER'])) && \TYPO3\CMS\Core\Utility\MathUtility::canBeInterpretedAsInteger($workspaceUid)) {
                        if ($workspaceUid == 0 || $workspaceUid >= -1 && $params['BE_USER']->checkWorkspace($workspaceUid)) {
                                // Check Access to workspace. Live (0) is OK to preview for all.
                                $pObj->workspacePreview = intval($workspaceUid);
@@ -138,18 +140,18 @@ class Tx_Version_Preview implements t3lib_Singleton {
                if ($inputCode) {
                        // "log out"
                        if ($inputCode == 'LOGOUT') {
-                               setcookie($this->previewKey, '', 0, t3lib_div::getIndpEnv('TYPO3_SITE_PATH'));
+                               setcookie($this->previewKey, '', 0, \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_SITE_PATH'));
                                if ($this->tsfeObj->TYPO3_CONF_VARS['FE']['workspacePreviewLogoutTemplate']) {
                                        $templateFile = PATH_site . $this->tsfeObj->TYPO3_CONF_VARS['FE']['workspacePreviewLogoutTemplate'];
                                        if (@is_file($templateFile)) {
-                                               $message = t3lib_div::getUrl(PATH_site . $this->tsfeObj->TYPO3_CONF_VARS['FE']['workspacePreviewLogoutTemplate']);
+                                               $message = \TYPO3\CMS\Core\Utility\GeneralUtility::getUrl(PATH_site . $this->tsfeObj->TYPO3_CONF_VARS['FE']['workspacePreviewLogoutTemplate']);
                                        } else {
                                                $message = ('<strong>ERROR!</strong><br>Template File "' . $this->tsfeObj->TYPO3_CONF_VARS['FE']['workspacePreviewLogoutTemplate']) . '" configured with $TYPO3_CONF_VARS["FE"]["workspacePreviewLogoutTemplate"] not found. Please contact webmaster about this problem.';
                                        }
                                } else {
                                        $message = 'You logged out from Workspace preview mode. Click this link to <a href="%1$s">go back to the website</a>';
                                }
-                               $returnUrl = t3lib_div::sanitizeLocalUrl(t3lib_div::_GET('returnUrl'));
+                               $returnUrl = \TYPO3\CMS\Core\Utility\GeneralUtility::sanitizeLocalUrl(\TYPO3\CMS\Core\Utility\GeneralUtility::_GET('returnUrl'));
                                die(sprintf($message, htmlspecialchars(preg_replace(('/\\&?' . $this->previewKey) . '=[[:alnum:]]+/', '', $returnUrl))));
                        }
                        // Look for keyword configuration record:
@@ -158,7 +160,7 @@ class Tx_Version_Preview implements t3lib_Singleton {
                        // - Make sure to remove fe/be cookies (temporarily);
                        // BE already done in ADMCMD_preview_postInit()
                        if (is_array($previewData)) {
-                               if (!count(t3lib_div::_POST())) {
+                               if (!count(\TYPO3\CMS\Core\Utility\GeneralUtility::_POST())) {
                                        // Unserialize configuration:
                                        $previewConfig = unserialize($previewData['config']);
                                        // For full workspace preview we only ADD a get variable
@@ -169,33 +171,33 @@ class Tx_Version_Preview implements t3lib_Singleton {
                                        // users can use those credentials.
                                        if ($previewConfig['fullWorkspace']) {
                                                // Set the workspace preview value:
-                                               t3lib_div::_GETset($previewConfig['fullWorkspace'], 'ADMCMD_previewWS');
+                                               \TYPO3\CMS\Core\Utility\GeneralUtility::_GETset($previewConfig['fullWorkspace'], 'ADMCMD_previewWS');
                                                // If ADMCMD_prev is set the $inputCode value cannot come
                                                // from a cookie and we set that cookie here. Next time it will
                                                // be found from the cookie if ADMCMD_prev is not set again...
-                                               if (t3lib_div::_GP($this->previewKey)) {
+                                               if (\TYPO3\CMS\Core\Utility\GeneralUtility::_GP($this->previewKey)) {
                                                        // Lifetime is 1 hour, does it matter much?
                                                        // Requires the user to click the link from their email again if it expires.
-                                                       SetCookie($this->previewKey, t3lib_div::_GP($this->previewKey), 0, t3lib_div::getIndpEnv('TYPO3_SITE_PATH'));
+                                                       SetCookie($this->previewKey, \TYPO3\CMS\Core\Utility\GeneralUtility::_GP($this->previewKey), 0, \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_SITE_PATH'));
                                                }
                                                return $previewConfig;
-                                       } elseif ((((t3lib_div::getIndpEnv('TYPO3_SITE_URL') . 'index.php?') . $this->previewKey) . '=') . $inputCode === t3lib_div::getIndpEnv('TYPO3_REQUEST_URL')) {
+                                       } elseif ((((\TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_SITE_URL') . 'index.php?') . $this->previewKey) . '=') . $inputCode === \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_REQUEST_URL')) {
                                                // Set GET variables
                                                $GET_VARS = '';
                                                parse_str($previewConfig['getVars'], $GET_VARS);
-                                               t3lib_div::_GETset($GET_VARS);
+                                               \TYPO3\CMS\Core\Utility\GeneralUtility::_GETset($GET_VARS);
                                                // Return preview keyword configuration
                                                return $previewConfig;
                                        } else {
                                                // This check is to prevent people from setting additional
                                                // GET vars via realurl or other URL path based ways of passing parameters.
-                                               throw new Exception(htmlspecialchars(((((('Request URL did not match "' . t3lib_div::getIndpEnv('TYPO3_SITE_URL')) . 'index.php?') . $this->previewKey) . '=') . $inputCode) . '"', 1294585190));
+                                               throw new \Exception(htmlspecialchars(((((('Request URL did not match "' . \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_SITE_URL')) . 'index.php?') . $this->previewKey) . '=') . $inputCode) . '"', 1294585190));
                                        }
                                } else {
-                                       throw new Exception('POST requests are incompatible with keyword preview.', 1294585191);
+                                       throw new \Exception('POST requests are incompatible with keyword preview.', 1294585191);
                                }
                        } else {
-                               throw new Exception('ADMCMD command could not be executed! (No keyword configuration found)', 1294585192);
+                               throw new \Exception('ADMCMD command could not be executed! (No keyword configuration found)', 1294585192);
                        }
                }
                return FALSE;
@@ -207,7 +209,7 @@ class Tx_Version_Preview implements t3lib_Singleton {
         * @param input code
         */
        protected function getPreviewInputCode() {
-               $inputCode = t3lib_div::_GP($this->previewKey);
+               $inputCode = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP($this->previewKey);
                // If no inputcode and a cookie is set, load input code from cookie:
                if (!$inputCode && $_COOKIE[$this->previewKey]) {
                        $inputCode = $_COOKIE[$this->previewKey];
@@ -259,4 +261,5 @@ class Tx_Version_Preview implements t3lib_Singleton {
 
 }
 
+
 ?>
\ No newline at end of file
index 0b7780c..e61e353 100644 (file)
@@ -4,5 +4,5 @@
  * and will be removed by 7.0. The class was renamed and is now located at:
  * typo3/sysext/version/Classes/Hook/PreviewHook.php
  */
-require_once t3lib_extMgm::extPath('version') . 'Classes/Hook/PreviewHook.php';
+require_once \TYPO3\CMS\Core\Extension\ExtensionManager::extPath('version') . 'Classes/Hook/PreviewHook.php';
 ?>
\ No newline at end of file
index 1401d8f..110c553 100644 (file)
@@ -1,4 +1,6 @@
 <?php
+namespace TYPO3\CMS\Version\Task;
+
 /***************************************************************
  *  Copyright notice
  *
@@ -29,7 +31,7 @@
  * @package            TYPO3
  * @subpackage         tx_version
  */
-class tx_version_tasks_AutoPublish extends tx_scheduler_Task {
+class AutoPublishTask extends \TYPO3\CMS\Scheduler\Task {
 
        /**
         * Method executed from the Scheduler.
@@ -40,8 +42,8 @@ class tx_version_tasks_AutoPublish extends tx_scheduler_Task {
         */
        public function execute() {
                // Load the workspace library class and instatiate it
-               require_once t3lib_extMgm::extPath('version') . 'ws/class.wslib.php';
-               $autopubObj = t3lib_div::makeInstance('wslib');
+               require_once \TYPO3\CMS\Core\Extension\ExtensionManager::extPath('version') . 'ws/class.wslib.php';
+               $autopubObj = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Version\\Utility\\WorkspacesUtility');
                // Publish the workspaces that need to be
                $autopubObj->autoPublishWorkspaces();
                // There's no feedback from the publishing process,
@@ -52,4 +54,5 @@ class tx_version_tasks_AutoPublish extends tx_scheduler_Task {
 
 }
 
+
 ?>
\ No newline at end of file
index 19cea72..b56aa64 100644 (file)
@@ -1,4 +1,6 @@
 <?php
+namespace TYPO3\CMS\Version\Utility;
+
 /***************************************************************
  *  Copyright notice
  *
@@ -31,7 +33,7 @@
  * @package TYPO3
  * @subpackage core
  */
-class wslib {
+class WorkspacesUtility {
 
        /**
         * Building tcemain CMD-array for swapping all versions in a workspace.
@@ -49,7 +51,7 @@ class wslib {
                        // Define stage to select:
                        $stage = -99;
                        if ($wsid > 0) {
-                               $workspaceRec = t3lib_BEfunc::getRecord('sys_workspace', $wsid);
+                               $workspaceRec = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecord('sys_workspace', $wsid);
                                if ($workspaceRec['publish_access'] & 1) {
                                        $stage = 10;
                                }
@@ -92,7 +94,7 @@ class wslib {
                        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') . t3lib_BEfunc::deleteClause($table, 'A')) . t3lib_BEfunc::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') . \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause($table, 'A')) . \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause($table, 'B'), '', 'B.uid');
                                if (count($recs)) {
                                        $output[$table] = $recs;
                                }
@@ -124,7 +126,7 @@ class wslib {
                $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'])) . '))') . t3lib_BEfunc::deleteClause('sys_workspace'));
+                               OR (publish_time=0 AND unpublish_time!=0 AND unpublish_time<=') . intval($GLOBALS['EXEC_TIME'])) . '))') . \TYPO3\CMS\Backend\Utility\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);
@@ -133,7 +135,7 @@ class wslib {
                        $cmd = $this->getCmdArrayForPublishWS($rec['uid'], $rec['swap_modes'] == 1);
                        // $rec['swap_modes']==1 means that auto-publishing will swap versions, not just publish and empty the workspace.
                        // Execute CMD array:
-                       $tce = t3lib_div::makeInstance('t3lib_TCEmain');
+                       $tce = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\DataHandler\\DataHandler');
                        $tce->stripslashes_values = 0;
                        $tce->start(array(), $cmd);
                        $tce->process_cmdmap();
@@ -144,4 +146,5 @@ class wslib {
 
 }
 
+
 ?>
\ No newline at end of file
index 649d241..6b30720 100644 (file)
@@ -1,4 +1,6 @@
 <?php
+namespace TYPO3\CMS\Version\View;
+
 /***************************************************************
  *  Copyright notice
  *
@@ -30,7 +32,7 @@
  * Contains some parts for staging, versioning and workspaces
  * to interact with the TYPO3 Core Engine
  */
-class tx_version_gui {
+class VersionView {
 
        /**
         * Creates the version selector for the page id inputted.
@@ -46,11 +48,11 @@ class tx_version_gui {
                }
                if ($GLOBALS['BE_USER']->workspace == 0) {
                        // Get Current page record:
-                       $curPage = t3lib_BEfunc::getRecord('pages', $id);
+                       $curPage = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecord('pages', $id);
                        // If the selected page is not online, find the right ID
                        $onlineId = $curPage['pid'] == -1 ? $curPage['t3ver_oid'] : $id;
                        // Select all versions of online version:
-                       $versions = t3lib_BEfunc::selectVersionsOfRecord('pages', $onlineId, 'uid,pid,t3ver_label,t3ver_oid,t3ver_wsid,t3ver_id');
+                       $versions = \TYPO3\CMS\Backend\Utility\BackendUtility::selectVersionsOfRecord('pages', $onlineId, 'uid,pid,t3ver_label,t3ver_oid,t3ver_wsid,t3ver_id');
                        // If more than one was found...:
                        if (count($versions) > 1) {
                                $selectorLabel = ('<strong>' . $GLOBALS['LANG']->sL('LLL:EXT:version/locallang.xml:versionSelect.label', TRUE)) . '</strong>';
@@ -63,17 +65,17 @@ class tx_version_gui {
                                        } else {
                                                $label = ((((($vRow['t3ver_label'] . ' (') . $GLOBALS['LANG']->sL('LLL:EXT:version/locallang.xml:versionId', TRUE)) . ' ') . $vRow['t3ver_id']) . ($vRow['t3ver_wsid'] != 0 ? ((' ' . $GLOBALS['LANG']->sL('LLL:EXT:version/locallang.xml:workspaceId', TRUE)) . ' ') . $vRow['t3ver_wsid'] : '')) . ')';
                                        }
-                                       $opt[] = ((((('<option value="' . htmlspecialchars(t3lib_div::linkThisScript(array('id' => $vRow['uid'])))) . '"') . ($id == $vRow['uid'] ? ' selected="selected"' : '')) . '>') . htmlspecialchars($label)) . '</option>';
+                                       $opt[] = ((((('<option value="' . htmlspecialchars(\TYPO3\CMS\Core\Utility\GeneralUtility::linkThisScript(array('id' => $vRow['uid'])))) . '"') . ($id == $vRow['uid'] ? ' selected="selected"' : '')) . '>') . htmlspecialchars($label)) . '</option>';
                                }
                                // Add management link:
-                               $management = ((('<input type="button" value="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:ver.mgm', TRUE)) . '" onclick="window.location.href=\'') . htmlspecialchars(((($GLOBALS['BACK_PATH'] . t3lib_extMgm::extRelPath('version')) . 'cm1/index.php?table=pages&uid=') . $onlineId))) . '\';" />';
+                               $management = ((('<input type="button" value="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:ver.mgm', TRUE)) . '" onclick="window.location.href=\'') . htmlspecialchars(((($GLOBALS['BACK_PATH'] . \TYPO3\CMS\Core\Extension\ExtensionManager::extRelPath('version')) . 'cm1/index.php?table=pages&uid=') . $onlineId))) . '\';" />';
                                // Create onchange handler:
                                $onChange = 'window.location.href=this.options[this.selectedIndex].value;';
                                // Controls:
                                if ($id == $onlineId) {
-                                       $controls .= ((('<img' . t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'], 'gfx/blinkarrow_left.gif', 'width="5" height="9"')) . ' class="absmiddle" alt="" /> <strong>') . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:ver.online', TRUE)) . '</strong>';
+                                       $controls .= ((('<img' . \TYPO3\CMS\Backend\Utility\IconUtility::skinImg($GLOBALS['BACK_PATH'], 'gfx/blinkarrow_left.gif', 'width="5" height="9"')) . ' class="absmiddle" alt="" /> <strong>') . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:ver.online', TRUE)) . '</strong>';
                                } elseif (!$noAction) {
-                                       $controls .= ((((('<a href="' . $GLOBALS['TBE_TEMPLATE']->issueCommand((((((('&cmd[pages][' . $onlineId) . '][version][swapWith]=') . $id) . '&cmd[pages][') . $onlineId) . '][version][action]=swap'), t3lib_div::linkThisScript(array('id' => $onlineId)))) . '" class="nobr">') . t3lib_iconWorks::getSpriteIcon('actions-version-swap-version', array(
+                                       $controls .= ((((('<a href="' . $GLOBALS['TBE_TEMPLATE']->issueCommand((((((('&cmd[pages][' . $onlineId) . '][version][swapWith]=') . $id) . '&cmd[pages][') . $onlineId) . '][version][action]=swap'), \TYPO3\CMS\Core\Utility\GeneralUtility::linkThisScript(array('id' => $onlineId)))) . '" class="nobr">') . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-version-swap-version', array(
                                                'title' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:ver.swapPage', TRUE),
                                                'style' => 'margin-left:5px;vertical-align:bottom;'
                                        ))) . '<strong>') . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:ver.swap', TRUE)) . '</strong></a>';
@@ -110,15 +112,15 @@ class tx_version_gui {
                                break;
                        }
                        // Get Current page record:
-                       $curPage = t3lib_BEfunc::getRecord('pages', $id);
+                       $curPage = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecord('pages', $id);
                        // If the selected page is not online, find the right ID
                        $onlineId = $curPage['pid'] == -1 ? $curPage['t3ver_oid'] : $id;
                        // The version of page:
-                       $verPage = t3lib_BEfunc::getWorkspaceVersionOfRecord($GLOBALS['BE_USER']->workspace, 'pages', $onlineId);
+                       $verPage = \TYPO3\CMS\Backend\Utility\BackendUtility::getWorkspaceVersionOfRecord($GLOBALS['BE_USER']->workspace, 'pages', $onlineId);
                        if (!$verPage) {
-                               if (!count(t3lib_BEfunc::countVersionsOfRecordsOnPage($GLOBALS['BE_USER']->workspace, $onlineId))) {
+                               if (!count(\TYPO3\CMS\Backend\Utility\BackendUtility::countVersionsOfRecordsOnPage($GLOBALS['BE_USER']->workspace, $onlineId))) {
                                        if ($GLOBALS['BE_USER']->workspaceVersioningTypeAccess(0)) {
-                                               $onClick = $GLOBALS['TBE_TEMPLATE']->issueCommand(((('&cmd[pages][' . $onlineId) . '][version][action]=new&cmd[pages][') . $onlineId) . '][version][treeLevels]=0', t3lib_div::linkThisScript(array(
+                                               $onClick = $GLOBALS['TBE_TEMPLATE']->issueCommand(((('&cmd[pages][' . $onlineId) . '][version][action]=new&cmd[pages][') . $onlineId) . '][version][treeLevels]=0', \TYPO3\CMS\Core\Utility\GeneralUtility::linkThisScript(array(
                                                        'id' => $onlineId
                                                )));
                                                $onClick = ('window.location.href=\'' . $onClick) . '\'; return false;';
@@ -145,4 +147,5 @@ class tx_version_gui {
 
 }
 
+
 ?>
\ No newline at end of file
index 6bcb2b5..87afd9b 100755 (executable)
@@ -4,5 +4,5 @@
  * and will be removed by 7.0. The class was renamed and is now located at:
  * typo3/sysext/version/Classes/ClickMenu/VersionClickMenu.php
  */
-require_once t3lib_extMgm::extPath('version') . 'Classes/ClickMenu/VersionClickMenu.php';
+require_once \TYPO3\CMS\Core\Extension\ExtensionManager::extPath('version') . 'Classes/ClickMenu/VersionClickMenu.php';
 ?>
\ No newline at end of file
index b16788c..2154067 100644 (file)
@@ -4,5 +4,5 @@
  * and will be removed by 7.0. The class was renamed and is now located at:
  * typo3/sysext/version/Classes/View/VersionView.php
  */
-require_once t3lib_extMgm::extPath('version') . 'Classes/View/VersionView.php';
+require_once \TYPO3\CMS\Core\Extension\ExtensionManager::extPath('version') . 'Classes/View/VersionView.php';
 ?>
\ No newline at end of file
index 35ea943..40a3efe 100644 (file)
@@ -4,5 +4,5 @@
  * and will be removed by 7.0. The class was renamed and is now located at:
  * typo3/sysext/version/Classes/Hook/IconUtilityHook.php
  */
-require_once t3lib_extMgm::extPath('version') . 'Classes/Hook/IconUtilityHook.php';
+require_once \TYPO3\CMS\Core\Extension\ExtensionManager::extPath('version') . 'Classes/Hook/IconUtilityHook.php';
 ?>
\ No newline at end of file
index 2fafa37..cb1df51 100644 (file)
@@ -4,5 +4,5 @@
  * and will be removed by 7.0. The class was renamed and is now located at:
  * typo3/sysext/version/Classes/Hook/DataHandlerHook.php
  */
-require_once t3lib_extMgm::extPath('version') . 'Classes/Hook/DataHandlerHook.php';
+require_once \TYPO3\CMS\Core\Extension\ExtensionManager::extPath('version') . 'Classes/Hook/DataHandlerHook.php';
 ?>
\ No newline at end of file
index a9cf59b..42c6858 100644 (file)
@@ -4,5 +4,5 @@
  * and will be removed by 7.0. The class was renamed and is now located at:
  * typo3/sysext/version/Classes/DataHandler/CommandMap.php
  */
-require_once t3lib_extMgm::extPath('version') . 'Classes/DataHandler/CommandMap.php';
+require_once \TYPO3\CMS\Core\Extension\ExtensionManager::extPath('version') . 'Classes/DataHandler/CommandMap.php';
 ?>
\ No newline at end of file
index f07dfd9..30749d0 100755 (executable)
@@ -29,6 +29,8 @@ require $BACK_PATH . 'template.php';
 $GLOBALS['LANG']->includeLLFile('EXT:version/locallang.xml');
 // DEFAULT initialization of a module [END]
 require_once '../ws/class.wslib.php';
+namespace TYPO3\CMS\Version\ClickMenu;
+
 /**
  * Versioning module, including workspace management
  *
@@ -36,7 +38,7 @@ require_once '../ws/class.wslib.php';
  * @package TYPO3
  * @subpackage core
  */
-class tx_version_cm1 extends t3lib_SCbase {
+class VersionModuleController extends \TYPO3\CMS\Backend\Module\BaseScriptClass {
 
        // Default variables for backend modules
        /**
@@ -60,7 +62,7 @@ class tx_version_cm1 extends t3lib_SCbase {
        /**
         * document template object
         *
-        * @var mediumDoc
+        * @var \TYPO3\CMS\Backend\Template\MediumDocumentTemplate
         * @todo Define visibility
         */
        public $doc;
@@ -158,8 +160,8 @@ class tx_version_cm1 extends t3lib_SCbase {
                        $this->MOD_MENU['display'][-1] = $GLOBALS['LANG']->getLL('defaultDraft');
                }
                // Add workspaces (only if the live workspace is currently active):
-               if (t3lib_extMgm::isLoaded('workspaces') && $GLOBALS['BE_USER']->workspace === 0) {
-                       $workspaces = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('uid,title,adminusers,members,reviewers', 'sys_workspace', 'pid=0' . t3lib_BEfunc::deleteClause('sys_workspace'), '', 'title');
+               if (\t3lib_extMgm::isLoaded('workspaces') && $GLOBALS['BE_USER']->workspace === 0) {
+                       $workspaces = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('uid,title,adminusers,members,reviewers', 'sys_workspace', 'pid=0' . \t3lib_BEfunc::deleteClause('sys_workspace'), '', 'title');
                        foreach ($workspaces as $rec) {
                                if ($GLOBALS['BE_USER']->checkWorkspace($rec)) {
                                        $this->MOD_MENU['display'][$rec['uid']] = (('[' . $rec['uid']) . '] ') . $rec['title'];
@@ -167,7 +169,7 @@ class tx_version_cm1 extends t3lib_SCbase {
                        }
                }
                // CLEANSE SETTINGS
-               $this->MOD_SETTINGS = t3lib_BEfunc::getModuleData($this->MOD_MENU, t3lib_div::_GP('SET'), $this->MCONF['name'], 'ses');
+               $this->MOD_SETTINGS = \t3lib_BEfunc::getModuleData($this->MOD_MENU, \t3lib_div::_GP('SET'), $this->MCONF['name'], 'ses');
        }
 
        /**
@@ -186,9 +188,9 @@ class tx_version_cm1 extends t3lib_SCbase {
                );
                // Setting module configuration:
                $this->MCONF = $GLOBALS['MCONF'];
-               $this->REQUEST_URI = str_replace('&sendToReview=1', '', t3lib_div::getIndpEnv('REQUEST_URI'));
+               $this->REQUEST_URI = str_replace('&sendToReview=1', '', \t3lib_div::getIndpEnv('REQUEST_URI'));
                // Draw the header.
-               $this->doc = t3lib_div::makeInstance('template');
+               $this->doc = \t3lib_div::makeInstance('TYPO3\\CMS\\Backend\\Template\\DocumentTemplate');
                $this->doc->backPath = $GLOBALS['BACK_PATH'];
                $this->doc->setModuleTemplate('templates/version.html');
                // Add styles
@@ -199,27 +201,27 @@ class tx_version_cm1 extends t3lib_SCbase {
                // Setting up the context sensitive menu:
                $this->doc->getContextMenuCode();
                // Getting input data:
-               $this->id = intval(t3lib_div::_GP('id'));
+               $this->id = intval(\t3lib_div::_GP('id'));
                // Page id. If set, indicates activation from Web>Versioning module
                if (!$this->id) {
-                       $this->uid = intval(t3lib_div::_GP('uid'));
+                       $this->uid = intval(\t3lib_div::_GP('uid'));
                        // Record uid. Goes with table name to indicate specific record
-                       $this->table = t3lib_div::_GP('table');
+                       $this->table = \t3lib_div::_GP('table');
                } else {
                        $this->uid = $this->id;
                        $this->table = 'pages';
                }
-               $this->details = t3lib_div::_GP('details');
+               $this->details = \t3lib_div::_GP('details');
                // Page id. If set, indicates activation from Web>Versioning module
-               $this->diffOnly = t3lib_div::_GP('diffOnly');
+               $this->diffOnly = \t3lib_div::_GP('diffOnly');
                // Flag. If set, shows only the offline version and with diff-view
                // Force this setting:
                $this->MOD_SETTINGS['expandSubElements'] = TRUE;
                $this->MOD_SETTINGS['diff'] = $this->details || $this->MOD_SETTINGS['diff'] ? 1 : 0;
                // Reading the record:
-               $record = t3lib_BEfunc::getRecord($this->table, $this->uid);
+               $record = \t3lib_BEfunc::getRecord($this->table, $this->uid);
                if ($record['pid'] == -1) {
-                       $record = t3lib_BEfunc::getRecord($this->table, $record['t3ver_oid']);
+                       $record = \t3lib_BEfunc::getRecord($this->table, $record['t3ver_oid']);
                }
                $this->recordFound = is_array($record);
                $pidValue = $this->table === 'pages' ? $this->uid : $record['pid'];
@@ -230,7 +232,7 @@ class tx_version_cm1 extends t3lib_SCbase {
                        // Might have changed if new live record was found!
                        // 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 = t3lib_BEfunc::readPageAccess($pidValue, $this->perms_clause);
+                       $this->pageinfo = \t3lib_BEfunc::readPageAccess($pidValue, $this->perms_clause);
                        $access = is_array($this->pageinfo) ? 1 : 0;
                        if ($pidValue && $access || $GLOBALS['BE_USER']->user['admin'] && !$pidValue) {
                                // JavaScript
@@ -260,7 +262,7 @@ class tx_version_cm1 extends t3lib_SCbase {
                                ';
                                // If another page module was specified, replace the default Page module with the new one
                                $newPageModule = trim($GLOBALS['BE_USER']->getTSConfigVal('options.overridePageModule'));
-                               $this->pageModule = t3lib_BEfunc::isModuleSetInTBE_MODULES($newPageModule) ? $newPageModule : 'web_layout';
+                               $this->pageModule = \t3lib_BEfunc::isModuleSetInTBE_MODULES($newPageModule) ? $newPageModule : 'web_layout';
                                // Setting publish access permission for workspace:
                                $this->publishAccess = $GLOBALS['BE_USER']->workspacePublishAccess($GLOBALS['BE_USER']->workspace);
                                // Render content:
@@ -274,7 +276,7 @@ class tx_version_cm1 extends t3lib_SCbase {
                        // Setting up the buttons and markers for docheader
                        $docHeaderButtons = $this->getButtons();
                        $markers['CSH'] = $docHeaderButtons['csh'];
-                       $markers['FUNC_MENU'] = t3lib_BEfunc::getFuncMenu($this->id, 'SET[function]', $this->MOD_SETTINGS['function'], $this->MOD_MENU['function']);
+                       $markers['FUNC_MENU'] = \t3lib_BEfunc::getFuncMenu($this->id, 'SET[function]', $this->MOD_SETTINGS['function'], $this->MOD_MENU['function']);
                        $markers['WS_MENU'] = $this->workspaceMenu();
                        $markers['CONTENT'] = $this->content;
                } else {
@@ -317,15 +319,15 @@ class tx_version_cm1 extends t3lib_SCbase {
                //$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(t3lib_BEfunc::viewOnClick($this->pageinfo['uid'], $GLOBALS['BACK_PATH'], t3lib_BEfunc::BEgetRootLine($this->pageinfo['uid'])))) . '" title="') . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.showPage', TRUE)) . '">') . t3lib_iconWorks::getSpriteIcon('actions-document-view')) . '</a>';
+                       $buttons['view'] = ((((('<a href="#" onclick="' . htmlspecialchars(\t3lib_BEfunc::viewOnClick($this->pageinfo['uid'], $GLOBALS['BACK_PATH'], \t3lib_BEfunc::BEgetRootLine($this->pageinfo['uid'])))) . '" title="') . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.showPage', TRUE)) . '">') . \t3lib_iconWorks::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']);
                        }
                        // If access to Web>List for user, then link to that module.
-                       $buttons['record_list'] = t3lib_BEfunc::getListViewLink(array(
+                       $buttons['record_list'] = \t3lib_BEfunc::getListViewLink(array(
                                'id' => $this->pageinfo['uid'],
-                               'returnUrl' => t3lib_div::getIndpEnv('REQUEST_URI')
+                               'returnUrl' => \t3lib_div::getIndpEnv('REQUEST_URI')
                        ), '', $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.showList'));
                }
                return $buttons;
@@ -344,17 +346,17 @@ class tx_version_cm1 extends t3lib_SCbase {
         */
        public function versioningMgm() {
                // Diffing:
-               $diff_1 = t3lib_div::_POST('diff_1');
-               $diff_2 = t3lib_div::_POST('diff_2');
-               if (t3lib_div::_POST('do_diff')) {
+               $diff_1 = \t3lib_div::_POST('diff_1');
+               $diff_2 = \t3lib_div::_POST('diff_2');
+               if (\t3lib_div::_POST('do_diff')) {
                        $content = '';
                        $content .= ('<h3>' . $GLOBALS['LANG']->getLL('diffing')) . ':</h3>';
                        if ($diff_1 && $diff_2) {
-                               $diff_1_record = t3lib_BEfunc::getRecord($this->table, $diff_1);
-                               $diff_2_record = t3lib_BEfunc::getRecord($this->table, $diff_2);
+                               $diff_1_record = \t3lib_BEfunc::getRecord($this->table, $diff_1);
+                               $diff_2_record = \t3lib_BEfunc::getRecord($this->table, $diff_2);
                                if (is_array($diff_1_record) && is_array($diff_2_record)) {
-                                       t3lib_div::loadTCA($this->table);
-                                       $t3lib_diff_Obj = t3lib_div::makeInstance('t3lib_diff');
+                                       \t3lib_div::loadTCA($this->table);
+                                       $t3lib_diff_Obj = \t3lib_div::makeInstance('TYPO3\\CMS\\Core\\Utility\\DiffUtility');
                                        $tRows = array();
                                        $tRows[] = ((('
                                                                        <tr class="bgColor5 tableheader">
@@ -363,9 +365,9 @@ class tx_version_cm1 extends t3lib_SCbase {
                                                                        </tr>
                                                                ';
                                        foreach ($diff_1_record as $fN => $fV) {
-                                               if (($GLOBALS['TCA'][$this->table]['columns'][$fN] && $GLOBALS['TCA'][$this->table]['columns'][$fN]['config']['type'] !== 'passthrough') && !t3lib_div::inList('t3ver_label', $fN)) {
+                                               if (($GLOBALS['TCA'][$this->table]['columns'][$fN] && $GLOBALS['TCA'][$this->table]['columns'][$fN]['config']['type'] !== 'passthrough') && !\t3lib_div::inList('t3ver_label', $fN)) {
                                                        if (strcmp($diff_1_record[$fN], $diff_2_record[$fN])) {
-                                                               $diffres = $t3lib_diff_Obj->makeDiffDisplay(t3lib_BEfunc::getProcessedValue($this->table, $fN, $diff_2_record[$fN], 0, 1), t3lib_BEfunc::getProcessedValue($this->table, $fN, $diff_1_record[$fN], 0, 1));
+                                                               $diffres = $t3lib_diff_Obj->makeDiffDisplay(\t3lib_BEfunc::getProcessedValue($this->table, $fN, $diff_2_record[$fN], 0, 1), \t3lib_BEfunc::getProcessedValue($this->table, $fN, $diff_1_record[$fN], 0, 1));
                                                                $tRows[] = ((('
                                                                        <tr class="bgColor4">
                                                                                <td>' . $fN) . '</td>
@@ -388,9 +390,9 @@ class tx_version_cm1 extends t3lib_SCbase {
                        }
                }
                // Element:
-               $record = t3lib_BEfunc::getRecord($this->table, $this->uid);
-               $recordIcon = t3lib_iconWorks::getSpriteIconForRecord($this->table, $record);
-               $recTitle = t3lib_BEfunc::getRecordTitle($this->table, $record, TRUE);
+               $record = \t3lib_BEfunc::getRecord($this->table, $this->uid);
+               $recordIcon = \t3lib_iconWorks::getSpriteIconForRecord($this->table, $record);
+               $recTitle = \t3lib_BEfunc::getRecordTitle($this->table, $record, TRUE);
                // Display versions:
                $content .= (((('
                        ' . $recordIcon) . $recTitle) . '
@@ -412,14 +414,14 @@ class tx_version_cm1 extends t3lib_SCbase {
                                        <td title="') . $GLOBALS['LANG']->getLL('tblHeaderDesc_t3ver_label')) . '">') . $GLOBALS['LANG']->getLL('tblHeader_t3ver_label')) . '</td>
                                        <td colspan="2"><input type="submit" name="do_diff" value="') . $GLOBALS['LANG']->getLL('diff')) . '" /></td>
                                </tr>';
-               $versions = t3lib_BEfunc::selectVersionsOfRecord($this->table, $this->uid, '*', $GLOBALS['BE_USER']->workspace);
+               $versions = \t3lib_BEfunc::selectVersionsOfRecord($this->table, $this->uid, '*', $GLOBALS['BE_USER']->workspace);
                foreach ($versions as $row) {
                        $adminLinks = $this->adminLinks($this->table, $row);
                        $content .= ((((((((((((((((((((((((((((((((((((((('
                                <tr class="' . ($row['uid'] != $this->uid ? 'bgColor4' : 'bgColor2 tableheader')) . '">
-                                       <td>') . ($row['uid'] != $this->uid ? ((((('<a href="' . $this->doc->issueCommand((((((((((('&cmd[' . $this->table) . '][') . $this->uid) . '][version][swapWith]=') . $row['uid']) . '&cmd[') . $this->table) . '][') . $this->uid) . '][version][action]=swap'))) . '" title="') . $GLOBALS['LANG']->getLL('swapWithCurrent', TRUE)) . '">') . t3lib_iconWorks::getSpriteIcon('actions-version-swap-version')) . '</a>' : t3lib_iconWorks::getSpriteIcon('status-status-current', array('title' => $GLOBALS['LANG']->getLL('currentOnlineVersion', TRUE))))) . '</td>
+                                       <td>') . ($row['uid'] != $this->uid ? ((((('<a href="' . $this->doc->issueCommand((((((((((('&cmd[' . $this->table) . '][') . $this->uid) . '][version][swapWith]=') . $row['uid']) . '&cmd[') . $this->table) . '][') . $this->uid) . '][version][action]=swap'))) . '" title="') . $GLOBALS['LANG']->getLL('swapWithCurrent', TRUE)) . '">') . \t3lib_iconWorks::getSpriteIcon('actions-version-swap-version')) . '</a>' : \t3lib_iconWorks::getSpriteIcon('status-status-current', array('title' => $GLOBALS['LANG']->getLL('currentOnlineVersion', TRUE))))) . '</td>
                                        <td nowrap="nowrap">') . $adminLinks) . '</td>
-                                       <td nowrap="nowrap">') . t3lib_BEfunc::getRecordTitle($this->table, $row, TRUE)) . '</td>
+                                       <td nowrap="nowrap">') . \t3lib_BEfunc::getRecordTitle($this->table, $row, TRUE)) . '</td>
                                        <td>') . $row['uid']) . '</td>
                                        <td>') . $row['t3ver_oid']) . '</td>
                                        <td>') . $row['t3ver_id']) . '</td>
@@ -428,7 +430,7 @@ class tx_version_cm1 extends t3lib_SCbase {
                                        <td>') . $row['t3ver_stage']) . '</td>
                                        <td>') . $row['t3ver_count']) . '</td>
                                        <td>') . $row['pid']) . '</td>
-                                       <td nowrap="nowrap"><a href="#" onclick="') . htmlspecialchars(t3lib_BEfunc::editOnClick((((('&edit[' . $this->table) . '][') . $row['uid']) . ']=edit&columnsOnly=t3ver_label'), $this->doc->backPath))) . '" title="') . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:cm.edit', TRUE)) . '">') . t3lib_iconWorks::getSpriteIcon('actions-document-open')) . '</a>') . htmlspecialchars($row['t3ver_label'])) . '</td>
+                                       <td nowrap="nowrap"><a href="#" onclick="') . htmlspecialchars(\t3lib_BEfunc::editOnClick((((('&edit[' . $this->table) . '][') . $row['uid']) . ']=edit&columnsOnly=t3ver_label'), $this->doc->backPath))) . '" title="') . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:cm.edit', TRUE)) . '">') . \t3lib_iconWorks::getSpriteIcon('actions-document-open')) . '</a>') . htmlspecialchars($row['t3ver_label'])) . '</td>
                                        <td class="version-diff-1"><input type="radio" name="diff_1" value="') . $row['uid']) . '"') . ($diff_1 == $row['uid'] ? ' checked="checked"' : '')) . '/></td>
                                        <td class="version-diff-2"><input type="radio" name="diff_2" value="') . $row['uid']) . '"') . ($diff_2 == $row['uid'] ? ' checked="checked"' : '')) . '/></td>
                                </tr>';
@@ -457,7 +459,7 @@ class tx_version_cm1 extends t3lib_SCbase {
                        <input type="hidden" name="prErr" value="1" />
                        <input type="hidden" name="redirect" value="') . htmlspecialchars($this->REQUEST_URI)) . '" />
                        <input type="submit" name="_" value="') . $GLOBALS['LANG']->getLL('createNewVersion')) . '" />
-                       ') . t3lib_TCEforms::getHiddenTokenField('tceAction')) . '
+                       ') . \t3lib_TCEforms::getHiddenTokenField('tceAction')) . '
                        </form>
 
                ';
@@ -474,11 +476,11 @@ class tx_version_cm1 extends t3lib_SCbase {
         * @todo Define visibility
         */
        public function pageSubContent($pid, $c = 0) {
-               $tableNames = t3lib_div::removeArrayEntryByValue(array_keys($GLOBALS['TCA']), 'pages');
+               $tableNames = \t3lib_div::removeArrayEntryByValue(array_keys($GLOBALS['TCA']), 'pages');
                $tableNames[] = 'pages';
                foreach ($tableNames as $tN) {
                        // Basically list ALL tables - not only those being copied might be found!
-                       $mres = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', $tN, ('pid=' . intval($pid)) . t3lib_BEfunc::deleteClause($tN), '', $GLOBALS['TCA'][$tN]['ctrl']['sortby'] ? $GLOBALS['TCA'][$tN]['ctrl']['sortby'] : '');
+                       $mres = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', $tN, ('pid=' . intval($pid)) . \t3lib_BEfunc::deleteClause($tN), '', $GLOBALS['TCA'][$tN]['ctrl']['sortby'] ? $GLOBALS['TCA'][$tN]['ctrl']['sortby'] : '');
                        if ($GLOBALS['TYPO3_DB']->sql_num_rows($mres)) {
                                $content .= ((((('
                                        <tr>
@@ -491,7 +493,7 @@ class tx_version_cm1 extends t3lib_SCbase {
                                                        <td>' . $this->adminLinks($tN, $subrow)) . '</td>
                                                        <td>') . $subrow['uid']) . '</td>
                                                        ') . ($ownVer > 1 ? ((((('<td style="font-weight: bold; background-color: yellow;"><a href="index.php?table=' . rawurlencode($tN)) . '&uid=') . $subrow['uid']) . '">') . ($ownVer - 1)) . '</a></td>' : '<td></td>')) . '
-                                                       <td width="98%">') . t3lib_BEfunc::getRecordTitle($tN, $subrow, TRUE)) . '</td>
+                                                       <td width="98%">') . \t3lib_BEfunc::getRecordTitle($tN, $subrow, TRUE)) . '</td>
                                                </tr>';
                                        if ($tN == 'pages' && $c < 100) {
                                                $sub = $this->pageSubContent($subrow['uid'], $c + 1);
@@ -520,7 +522,7 @@ class tx_version_cm1 extends t3lib_SCbase {
         * @todo Define visibility
         */
        public function lookForOwnVersions($table, $uid) {
-               $versions = t3lib_BEfunc::selectVersionsOfRecord($table, $uid, 'uid');
+               $versions = \t3lib_BEfunc::selectVersionsOfRecord($table, $uid, 'uid');
                if (is_array($versions)) {
                        return count($versions);
                }
@@ -537,25 +539,25 @@ class tx_version_cm1 extends t3lib_SCbase {
         */
        public function adminLinks($table, $row) {
                // Edit link:
-               $adminLink = ((((('<a href="#" onclick="' . htmlspecialchars(t3lib_BEfunc::editOnClick((((('&edit[' . $table) . '][') . $row['uid']) . ']=edit'), $this->doc->backPath))) . '" title="') . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:cm.edit', TRUE)) . '">') . t3lib_iconWorks::getSpriteIcon('actions-document-open')) . '</a>';
+               $adminLink = ((((('<a href="#" onclick="' . htmlspecialchars(\t3lib_BEfunc::editOnClick((((('&edit[' . $table) . '][') . $row['uid']) . ']=edit'), $this->doc->backPath))) . '" title="') . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:cm.edit', TRUE)) . '">') . \t3lib_iconWorks::getSpriteIcon('actions-document-open')) . '</a>';
                // Delete link:
-               $adminLink .= ((((('<a href="' . htmlspecialchars($this->doc->issueCommand((((('&cmd[' . $table) . '][') . $row['uid']) . '][delete]=1')))) . '" title="') . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:cm.delete', TRUE)) . '">') . t3lib_iconWorks::getSpriteIcon('actions-edit-delete')) . '</a>';
+               $adminLink .= ((((('<a href="' . htmlspecialchars($this->doc->issueCommand((((('&cmd[' . $table) . '][') . $row['uid']) . '][delete]=1')))) . '" title="') . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:cm.delete', TRUE)) . '">') . \t3lib_iconWorks::getSpriteIcon('actions-edit-delete')) . '</a>';
                if ($table == 'pages') {
                        // If another page module was specified, replace the default Page module with the new one
                        $newPageModule = trim($GLOBALS['BE_USER']->getTSConfigVal('options.overridePageModule'));
-                       $pageModule = t3lib_BEfunc::isModuleSetInTBE_MODULES($newPageModule) ? $newPageModule : 'web_layout';
+                       $pageModule = \t3lib_BEfunc::isModuleSetInTBE_MODULES($newPageModule) ? $newPageModule : 'web_layout';
                        // Perform some acccess checks:
                        $a_wl = $GLOBALS['BE_USER']->check('modules', 'web_list');
-                       $a_wp = t3lib_extMgm::isLoaded('cms') && $GLOBALS['BE_USER']->check('modules', $pageModule);
-                       $adminLink .= ((((('<a href="#" onclick="top.loadEditId(' . $row['uid']) . ');top.goToModule(\'') . $pageModule) . '\'); return false;">') . t3lib_iconWorks::getSpriteIcon('actions-page-open')) . '</a>';
-                       $adminLink .= ((('<a href="#" onclick="top.loadEditId(' . $row['uid']) . ');top.goToModule(\'web_list\'); return false;">') . t3lib_iconWorks::getSpriteIcon('actions-system-list-open')) . '</a>';
+                       $a_wp = \t3lib_extMgm::isLoaded('cms') && $GLOBALS['BE_USER']->check('modules', $pageModule);
+                       $adminLink .= ((((('<a href="#" onclick="top.loadEditId(' . $row['uid']) . ');top.goToModule(\'') . $pageModule) . '\'); return false;">') . \t3lib_iconWorks::getSpriteIcon('actions-page-open')) . '</a>';
+                       $adminLink .= ((('<a href="#" onclick="top.loadEditId(' . $row['uid']) . ');top.goToModule(\'web_list\'); return false;">') . \t3lib_iconWorks::getSpriteIcon('actions-system-list-open')) . '</a>';
                        // "View page" icon is added:
-                       $adminLink .= ((('<a href="#" onclick="' . htmlspecialchars(t3lib_BEfunc::viewOnClick($row['uid'], $this->doc->backPath, t3lib_BEfunc::BEgetRootLine($row['uid'])))) . '">') . t3lib_iconWorks::getSpriteIcon('actions-document-view')) . '</a>';
+                       $adminLink .= ((('<a href="#" onclick="' . htmlspecialchars(\t3lib_BEfunc::viewOnClick($row['uid'], $this->doc->backPath, \t3lib_BEfunc::BEgetRootLine($row['uid'])))) . '">') . \t3lib_iconWorks::getSpriteIcon('actions-document-view')) . '</a>';
                } else {
                        if ($row['pid'] == -1) {
                                $getVars = (('&ADMCMD_vPrev[' . rawurlencode((($table . ':') . $row['t3ver_oid']))) . ']=') . $row['uid'];
                                // "View page" icon is added:
-                               $adminLink .= ((('<a href="#" onclick="' . htmlspecialchars(t3lib_BEfunc::viewOnClick($row['_REAL_PID'], $this->doc->backPath, t3lib_BEfunc::BEgetRootLine($row['_REAL_PID']), '', '', $getVars))) . '">') . t3lib_iconWorks::getSpriteIcon('actions-document-view')) . '</a>';
+                               $adminLink .= ((('<a href="#" onclick="' . htmlspecialchars(\t3lib_BEfunc::viewOnClick($row['_REAL_PID'], $this->doc->backPath, \t3lib_BEfunc::BEgetRootLine($row['_REAL_PID']), '', '', $getVars))) . '">') . \t3lib_iconWorks::getSpriteIcon('actions-document-view')) . '</a>';
                        }
                }
                return $adminLink;
@@ -597,14 +599,14 @@ class tx_version_cm1 extends t3lib_SCbase {
                if ($actionLinks || count($errors)) {
                        $this->content .= $this->doc->section('', $actionLinks . (count($errors) ? ((('<h3>' . $GLOBALS['LANG']->getLL('errors')) . '</h3><br />') . implode('<br />', $errors)) . '<hr />' : ''), 0, 1);
                }
-               if (t3lib_div::_POST('_previewLink')) {
+               if (\t3lib_div::_POST('_previewLink')) {
                        $ttlHours = intval($GLOBALS['BE_USER']->getTSConfigVal('options.workspaces.previewLinkTTLHours'));
                        $ttlHours = $ttlHours ? $ttlHours : 24 * 2;
-                       if (t3lib_div::_POST('_previewLink_wholeWorkspace')) {
-                               $previewUrl = (((t3lib_BEfunc::getViewDomain($this->id) . '/index.php?ADMCMD_prev=') . t3lib_BEfunc::compilePreviewKeyword('', $GLOBALS['BE_USER']->user['uid'], (60 * 60) * $ttlHours, $GLOBALS['BE_USER']->workspace)) . '&id=') . intval($this->id);
+                       if (\t3lib_div::_POST('_previewLink_wholeWorkspace')) {
+                               $previewUrl = (((\t3lib_BEfunc::getViewDomain($this->id) . '/index.php?ADMCMD_prev=') . \t3lib_BEfunc::compilePreviewKeyword('', $GLOBALS['BE_USER']->user['uid'], (60 * 60) * $ttlHours, $GLOBALS['BE_USER']->workspace)) . '&id=') . intval($this->id);
                        } else {
                                $params = (('id=' . $this->id) . '&ADMCMD_previewWS=') . $GLOBALS['BE_USER']->workspace;
-                               $previewUrl = (t3lib_BEfunc::getViewDomain($this->id) . '/index.php?ADMCMD_prev=') . t3lib_BEfunc::compilePreviewKeyword($params, $GLOBALS['BE_USER']->user['uid'], (60 * 60) * $ttlHours);
+                               $previewUrl = (\t3lib_BEfunc::getViewDomain($this->id) . '/index.php?ADMCMD_prev=') . \t3lib_BEfunc::compilePreviewKeyword($params, $GLOBALS['BE_USER']->user['uid'], (60 * 60) * $ttlHours);
                        }
                        $this->content .= $this->doc->section($GLOBALS['LANG']->getLL('previewUrl'), ((((sprintf($GLOBALS['LANG']->getLL('previewInstruction'), $ttlHours) . '<br /><br /><a target="_blank" href="') . htmlspecialchars($previewUrl)) . '">') . $previewUrl) . '</a>', 0, 1);
                }
@@ -620,11 +622,11 @@ class tx_version_cm1 extends t3lib_SCbase {
                if ($this->id) {
                        $menu = '';
                        if ($GLOBALS['BE_USER']->workspace === 0) {
-                               $menu .= t3lib_BEfunc::getFuncMenu($this->id, 'SET[filter]', $this->MOD_SETTINGS['filter'], $this->MOD_MENU['filter']);
-                               $menu .= t3lib_BEfunc::getFuncMenu($this->id, 'SET[display]', $this->MOD_SETTINGS['display'], $this->MOD_MENU['display']);
+                               $menu .= \t3lib_BEfunc::getFuncMenu($this->id, 'SET[filter]', $this->MOD_SETTINGS['filter'], $this->MOD_MENU['filter']);
+                               $menu .= \t3lib_BEfunc::getFuncMenu($this->id, 'SET[display]', $this->MOD_SETTINGS['display'], $this->MOD_MENU['display']);
                        }
                        if ((!$this->details && $GLOBALS['BE_USER']->workspace) && !$this->diffOnly) {
-                               $menu .= ((t3lib_BEfunc::getFuncCheck($this->id, 'SET[diff]', $this->MOD_SETTINGS['diff'], '', '', 'id="checkDiff"') . ' <label for="checkDiff">') . $GLOBALS['LANG']->getLL('showDiffView')) . '</label>';
+                               $menu .= ((\t3lib_BEfunc::getFuncCheck($this->id, 'SET[diff]', $this->MOD_SETTINGS['diff'], '', '', 'id="checkDiff"') . ' <label for="checkDiff">') . $GLOBALS['LANG']->getLL('showDiffView')) . '</label>';
                        }
                        if ($menu) {
                                return $menu;
@@ -643,11 +645,11 @@ class tx_version_cm1 extends t3lib_SCbase {
                // Initialize variables:
                $this->showWorkspaceCol = $GLOBALS['BE_USER']->workspace === 0 && $this->MOD_SETTINGS['display'] <= -98;
                // Get usernames and groupnames
-               $be_group_Array = t3lib_BEfunc::getListGroupNames('title,uid');
+               $be_group_Array = \t3lib_BEfunc::getListGroupNames('title,uid');
                $groupArray = array_keys($be_group_Array);
-               $this->be_user_Array = t3lib_BEfunc::getUserNames();
+               $this->be_user_Array = \t3lib_BEfunc::getUserNames();
                if (!$GLOBALS['BE_USER']->isAdmin()) {
-                       $this->be_user_Array = t3lib_BEfunc::blindUserNames($this->be_user_Array, $groupArray, 1);
+                       $this->be_user_Array = \t3lib_BEfunc::blindUserNames($this->be_user_Array, $groupArray, 1);
                }
                // Initialize Workspace ID and filter-value:
                if ($GLOBALS['BE_USER']->workspace === 0) {
@@ -659,7 +661,7 @@ class tx_version_cm1 extends t3lib_SCbase {
                        $filter = 0;
                }
                // Initialize workspace object and request all pending versions:
-               $wslibObj = t3lib_div::makeInstance('wslib');
+               $wslibObj = \t3lib_div::makeInstance('TYPO3\\CMS\\Version\\Utility\\WorkspacesUtility');
                // Selecting ALL versions belonging to the workspace:
                $versions = $wslibObj->selectVersionsInWorkspace($wsid, $filter, -99, $this->uid);
                // $this->uid is the page id of LIVE record.
@@ -686,8 +688,8 @@ class tx_version_cm1 extends t3lib_SCbase {
                } else {
                        $table = '';
                }
-               $returnUrl = t3lib_div::sanitizeLocalUrl(t3lib_div::_GP('returnUrl'));
-               $linkBack = t3lib_div::_GP('returnUrl') ? (((('<a href="' . htmlspecialchars($returnUrl)) . '" class="typo3-goBack">') . t3lib_iconWorks::getSpriteIcon('actions-view-go-back')) . $GLOBALS['LANG']->getLL('goBack', TRUE)) . '</a><br /><br />' : '';
+               $returnUrl = \t3lib_div::sanitizeLocalUrl(\t3lib_div::_GP('returnUrl'));
+               $linkBack = \t3lib_div::_GP('returnUrl') ? (((('<a href="' . htmlspecialchars($returnUrl)) . '" class="typo3-goBack">') . \t3lib_iconWorks::getSpriteIcon('actions-view-go-back')) . $GLOBALS['LANG']->getLL('goBack', TRUE)) . '</a><br /><br />' : '';
                $resetDiffOnly = $this->diffOnly ? ((('<a href="index.php?id=' . intval($this->id)) . '" class="typo3-goBack">') . $GLOBALS['LANG']->getLL('showAllInformation')) . '</a><br /><br />' : '';
                $versionSelector = $GLOBALS['BE_USER']->workspace ? $this->doc->getVersionSelector($this->id) : '';
                return ((($versionSelector . $linkBack) . $resetDiffOnly) . $table) . $this->markupNewOriginals();
@@ -709,8 +711,8 @@ class tx_version_cm1 extends t3lib_SCbase {
                        foreach ($pArray as $table => $oidArray) {
                                foreach ($oidArray as $oid => $recs) {
                                        // Get CURRENT online record and icon based on "t3ver_oid":
-                                       $rec_on = t3lib_BEfunc::getRecord($table, $oid);
-                                       $icon = t3lib_iconWorks::getSpriteIconForRecord($table, $rec_on, array('title' => t3lib_BEfunc::getRecordIconAltText($rec_on, $table)));
+                                       $rec_on = \t3lib_BEfunc::getRecord($table, $oid);
+                                       $icon = \t3lib_iconWorks::getSpriteIconForRecord($table, $rec_on, array('title' => \t3lib_BEfunc::getRecordIconAltText($rec_on, $table)));
                                        if ($GLOBALS['BE_USER']->workspace === 0) {
                                                // Only edit online records if in ONLINE workspace:
                                                $icon = $this->doc->wrapClickMenuOnIcon($icon, $table, $rec_on['uid'], 1, '', '+edit,view,info,delete');
@@ -718,7 +720,7 @@ class tx_version_cm1 extends t3lib_SCbase {
                                        // Online version display:
                                        // Create the main cells which will span over the number of versions there is.
                                        $verLinkUrl = $GLOBALS['TCA'][$table]['ctrl']['versioningWS'];
-                                       $origElement = (($icon . ($verLinkUrl ? ('<a href="' . htmlspecialchars(((('index.php?table=' . $table) . '&uid=') . $rec_on['uid']))) . '">' : '')) . t3lib_BEfunc::getRecordTitle($table, $rec_on, TRUE)) . ($verLinkUrl ? '</a>' : '');
+                                       $origElement = (($icon . ($verLinkUrl ? ('<a href="' . htmlspecialchars(((('index.php?table=' . $table) . '&uid=') . $rec_on['uid']))) . '">' : '')) . \t3lib_BEfunc::getRecordTitle($table, $rec_on, TRUE)) . ($verLinkUrl ? '</a>' : '');
                                        $mainCell_rowSpan = count($recs) > 1 ? (' rowspan="' . count($recs)) . '"' : '';
                                        $mainCell = (((((((('
                                                                <td align="center"' . $mainCell_rowSpan) . '>') . $this->formatVerId($rec_on['t3ver_id'])) . '</td>
@@ -727,10 +729,10 @@ class tx_version_cm1 extends t3lib_SCbase {
                                        // Traverse the versions of the element
                                        foreach ($recs as $rec) {
                                                // Get the offline version record and icon:
-                                               $rec_off = t3lib_BEfunc::getRecord($table, $rec['uid']);
+                                               $rec_off = \t3lib_BEfunc::getRecord($table, $rec['uid']);
                                                $vType = 'element';
                                                // Get icon
-                                               $icon = t3lib_iconWorks::getSpriteIconForRecord($table, $rec_off, array('title' => t3lib_BEfunc::getRecordIconAltText($rec_off, $table)));
+                                               $icon = \t3lib_iconWorks::getSpriteIconForRecord($table, $rec_off, array('title' => \t3lib_BEfunc::getRecordIconAltText($rec_off, $table)));
                                                $tempUid = ($table != 'pages' || $vType === 'branch') || $GLOBALS['BE_USER']->workspace === 0 ? $rec_off['uid'] : $rec_on['uid'];
                                                $icon = $this->doc->wrapClickMenuOnIcon($icon, $table, $tempUid, 1, '', ('+edit,' . ($table == 'pages' ? 'view,info,' : '')) . 'delete');
                                                // Prepare diff-code:
@@ -780,7 +782,7 @@ class tx_version_cm1 extends t3lib_SCbase {
                                                $versionsInOtherWSWarning = $versionsInOtherWS && $GLOBALS['BE_USER']->workspace !== 0 ? (('<br />' . $this->doc->icons(2)) . $GLOBALS['LANG']->getLL('otherVersions')) . $versionsInOtherWS : '';
                                                $multipleWarning = !$mainCell && $GLOBALS['BE_USER']->workspace !== 0 ? ((('<br />' . $this->doc->icons(3)) . '<strong>') . $GLOBALS['LANG']->getLL('multipleVersions')) . '</strong>' : '';
                                                $verWarning = $warnAboutVersions || $warnAboutVersions_nonPages && $GLOBALS['TCA'][$table]['ctrl']['versioning_followPages'] ? ((('<br />' . $this->doc->icons(3)) . '<strong>') . $GLOBALS['LANG']->getLL('versionInVersion')) . '</strong>' : '';
-                                               $verElement = ((((($icon . (!$this->details ? ('<a href="' . htmlspecialchars(((((((($this->doc->backPath . t3lib_extMgm::extRelPath('version')) . 'cm1/index.php?id=') . ($table === 'pages' ? $rec_on['uid'] : $rec_on['pid'])) . '&details=') . rawurlencode((($table . ':') . $rec_off['uid']))) . '&returnUrl=') . rawurlencode($this->REQUEST_URI)))) . '">' : '')) . t3lib_BEfunc::getRecordTitle($table, $rec_off, TRUE)) . (!$this->details ? '</a>' : '')) . $versionsInOtherWSWarning) . $multipleWarning) . $verWarning;
+                                               $verElement = ((((($icon . (!$this->details ? ('<a href="' . htmlspecialchars(((((((($this->doc->backPath . \t3lib_extMgm::extRelPath('version')) . 'cm1/index.php?id=') . ($table === 'pages' ? $rec_on['uid'] : $rec_on['pid'])) . '&details=') . rawurlencode((($table . ':') . $rec_off['uid']))) . '&returnUrl=') . rawurlencode($this->REQUEST_URI)))) . '">' : '')) . \t3lib_BEfunc::getRecordTitle($table, $rec_off, TRUE)) . (!$this->details ? '</a>' : '')) . $versionsInOtherWSWarning) . $multipleWarning) . $verWarning;
                                                $ctrlTable = ((((((('
                                                                <td nowrap="nowrap">' . $this->showStageChangeLog($table, $rec_off['uid'], $this->displayWorkspaceOverview_stageCmd($table, $rec_off))) . '</td>
                                                                <td nowrap="nowrap" class="') . $swapClass) . '">') . $this->displayWorkspaceOverview_commandLinks($table, $rec_on, $rec_off, $vType)) . htmlspecialchars($swapLabel)) . '&nbsp;&nbsp;</td>
@@ -839,10 +841,10 @@ class tx_version_cm1 extends t3lib_SCbase {
         * @todo Define visibility
         */
        public function displayWorkspaceOverview_allStageCmd() {
-               $table = t3lib_div::_GP('table');
+               $table = \t3lib_div::_GP('table');
                if ($table && $table != 'pages') {
-                       $uid = t3lib_div::_GP('uid');
-                       if ($rec_off = t3lib_BEfunc::getRecordWSOL($table, $uid)) {
+                       $uid = \t3lib_div::_GP('uid');
+                       if ($rec_off = \t3lib_BEfunc::getRecordWSOL($table, $uid)) {
                                $uid = $rec_off['_ORIG_uid'];
                        }
                } else {
@@ -893,14 +895,14 @@ class tx_version_cm1 extends t3lib_SCbase {
                        }
                        $onClick = ((('var commentTxt=window.prompt("' . sprintf($label, $itemCount)) . '","");
                                if (commentTxt!=null) {window.location.href="') . $this->doc->issueCommand($issueCmd, $this->REQUEST_URI)) . '&generalComment="+escape(commentTxt);}';
-                       if (t3lib_div::_GP('sendToReview')) {
+                       if (\t3lib_div::_GP('sendToReview')) {
                                $onClick .= (' else {window.location.href = "' . $this->REQUEST_URI) . '"}';
                                $actionLinks .= $this->doc->wrapScriptTags($onClick);
                        } else {
                                $onClick .= ' return false;';
                                $actionLinks .= ((('<input type="submit" name="_" value="' . htmlspecialchars($titleAttrib)) . '" onclick="') . htmlspecialchars($onClick)) . '" />';
                        }
-               } elseif (t3lib_div::_GP('sendToReview')) {
+               } elseif (\t3lib_div::_GP('sendToReview')) {
                        $onClick = ('window.location.href = "' . $this->REQUEST_URI) . '";';
                        $actionLinks .= $this->doc->wrapScriptTags($onClick);
                } else {
@@ -944,7 +946,7 @@ class tx_version_cm1 extends t3lib_SCbase {
                                // Does not output anything for ONLINE because it might confuse people to think that the elemnet IS online which is not the case - only that it exists as an offline version in the online workspace...
                                break;
                        default:
-                               $titleRec = $GLOBALS['TYPO3_DB']->exec_SELECTgetSingleRow('title', 'sys_workspace', ('uid=' . intval($wsid)) . t3lib_BEfunc::deleteClause('sys_workspace'));
+                               $titleRec = $GLOBALS['TYPO3_DB']->exec_SELECTgetSingleRow('title', 'sys_workspace', ('uid=' . intval($wsid)) . \t3lib_BEfunc::deleteClause('sys_workspace'));
                                $this->formatWorkspace_cache[$wsid] = (('[' . $wsid) . '] ') . $titleRec['title'];
                                break;
                        }
@@ -991,7 +993,7 @@ class tx_version_cm1 extends t3lib_SCbase {
                $rows = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('t3ver_wsid', $table, (((('pid=-1
                                AND t3ver_oid=' . intval($uid)) . '
                                AND t3ver_wsid!=') . intval($GLOBALS['BE_USER']->workspace)) . '
-                               AND (t3ver_wsid=-1 OR t3ver_wsid>0)') . t3lib_BEfunc::deleteClause($table), '', 't3ver_wsid', '', 't3ver_wsid');
+                               AND (t3ver_wsid=-1 OR t3ver_wsid>0)') . \t3lib_BEfunc::deleteClause($table), '', 't3ver_wsid', '', 't3ver_wsid');
                if (count($rows)) {
                        return implode(',', array_keys($rows));
                }
@@ -1031,7 +1033,7 @@ class tx_version_cm1 extends t3lib_SCbase {
                                $text = $GLOBALS['LANG']->getLL('stage.undefined');
                                break;
                        }
-                       $text = (((t3lib_BEfunc::dateTime($dat['tstamp']) . ': "') . $username) . '" ') . $text;
+                       $text = (((\t3lib_BEfunc::dateTime($dat['tstamp']) . ': "') . $username) . '" ') . $text;
                        $text .= $data['comment'] ? ((('<br />' . $GLOBALS['LANG']->getLL('userComment')) . ': <em>') . htmlspecialchars($data['comment'])) . '</em>' : '';
                        $entry[] = $text;
                }
@@ -1051,7 +1053,7 @@ class tx_version_cm1 extends t3lib_SCbase {
                // In online workspace we have a reduced view because otherwise it will bloat the listing:
                if (!$this->details && ($GLOBALS['BE_USER']->workspace === 0 || !$this->MOD_SETTINGS['expandSubElements'])) {
                        return (('<br />
-                                       <img' . t3lib_iconWorks::skinImg($this->doc->backPath, 'gfx/ol/joinbottom.gif', 'width="18" height="16"')) . ' align="top" alt="" title="" />') . ($origId ? (((('<a href="' . htmlspecialchars(((((((($this->doc->backPath . t3lib_extMgm::extRelPath('version')) . 'cm1/index.php?id=') . $uid) . '&details=') . rawurlencode(('pages:' . $uid))) . '&returnUrl=') . rawurlencode($this->REQUEST_URI)))) . '">') . '<span class="typo3-dimmed"><em>') . $GLOBALS['LANG']->getLL('subElementsClick')) . '</em><span></a>' : ('<span class="typo3-dimmed"><em>' . $GLOBALS['LANG']->getLL('subElements')) . '</em><span>');
+                                       <img' . \t3lib_iconWorks::skinImg($this->doc->backPath, 'gfx/ol/joinbottom.gif', 'width="18" height="16"')) . ' align="top" alt="" title="" />') . ($origId ? (((('<a href="' . htmlspecialchars(((((((($this->doc->backPath . \t3lib_extMgm::extRelPath('version')) . 'cm1/index.php?id=') . $uid) . '&details=') . rawurlencode(('pages:' . $uid))) . '&returnUrl=') . rawurlencode($this->REQUEST_URI)))) . '">') . '<span class="typo3-dimmed"><em>') . $GLOBALS['LANG']->getLL('subElementsClick')) . '</em><span></a>' : ('<span class="typo3-dimmed"><em>' . $GLOBALS['LANG']->getLL('subElements')) . '</em><span>');
                } else {
                        // For an offline workspace, show sub elements:
                        $tCell = array();
@@ -1071,7 +1073,7 @@ class tx_version_cm1 extends t3lib_SCbase {
                        // For branch, dive into the subtree:
                        if ($treeLevel > 0) {
                                // Drawing tree:
-                               $tree = t3lib_div::makeInstance('t3lib_pageTree');
+                               $tree = \t3lib_div::makeInstance('TYPO3\\CMS\\Backend\\Tree\\View\\PageTreeView');
                                $tree->init('AND ' . $GLOBALS['BE_USER']->getPagePermsClause(1));
                                $tree->makeHTML = 2;
                                // 2=Also rendering depth-data into the result array
@@ -1079,7 +1081,7 @@ class tx_version_cm1 extends t3lib_SCbase {
                                // Traverse page tree:
                                foreach ($tree->tree as $data) {
                                        // Render page in table cell:
-                                       $this->subElements_renderItem($tCell, 'pages', $uid, t3lib_BEfunc::getRecord('pages', $data['row']['uid']), $origId, 2, $data['HTML']);
+                                       $this->subElements_renderItem($tCell, 'pages', $uid, \t3lib_BEfunc::getRecord('pages', $data['row']['uid']), $origId, 2, $data['HTML']);
                                        // Find all records from page and collect in $recList:
                                        $recList = array();
                                        foreach ($GLOBALS['TCA'] as $tN => $tCfg) {
@@ -1113,7 +1115,7 @@ class tx_version_cm1 extends t3lib_SCbase {
         * @todo Define visibility
         */
        public function subElements_getNonPageRecords($tN, $uid, &$recList) {
-               $records = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('*', $tN, (('pid=' . intval($uid)) . ($GLOBALS['TCA'][$tN]['ctrl']['versioningWS'] ? ' AND t3ver_state=0' : '')) . t3lib_BEfunc::deleteClause($tN), '', $GLOBALS['TCA'][$tN]['ctrl']['sortby'] ? $GLOBALS['TCA'][$tN]['ctrl']['sortby'] : $GLOBALS['TYPO3_DB']->stripOrderBy($GLOBALS['TCA'][$tN]['ctrl']['default_sortby']));
+               $records = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('*', $tN, (('pid=' . intval($uid)) . ($GLOBALS['TCA'][$tN]['ctrl']['versioningWS'] ? ' AND t3ver_state=0' : '')) . \t3lib_BEfunc::deleteClause($tN), '', $GLOBALS['TCA'][$tN]['ctrl']['sortby'] ? $GLOBALS['TCA'][$tN]['ctrl']['sortby'] : $GLOBALS['TYPO3_DB']->stripOrderBy($GLOBALS['TCA'][$tN]['ctrl']['default_sortby']));
                foreach ($records as $rec) {
                        $recList[] = array($tN, $rec);
                }
@@ -1172,7 +1174,7 @@ class tx_version_cm1 extends t3lib_SCbase {
                // Compile the cell:
                $tCell[] = ((((((((('
                                                <tr' . $tdParams) . '>
-                                                       <td class="iconTitle">') . $HTMLdata) . ($iconMode < 2 ? (('<img' . t3lib_iconWorks::skinImg($this->doc->backPath, (('gfx/ol/join' . ($iconMode ? 'bottom' : '')) . '.gif'), 'width="18" height="16"')) . ' alt="" />') . t3lib_iconWorks::getSpriteIconForRecord($tN, $rec) : '')) . t3lib_BEfunc::getRecordTitle($tN, $rec, TRUE)) . '</td>
+                                                       <td class="iconTitle">') . $HTMLdata) . ($iconMode < 2 ? (('<img' . \t3lib_iconWorks::skinImg($this->doc->backPath, (('gfx/ol/join' . ($iconMode ? 'bottom' : '')) . '.gif'), 'width="18" height="16"')) . ' alt="" />') . \t3lib_iconWorks::getSpriteIconForRecord($tN, $rec) : '')) . \t3lib_BEfunc::getRecordTitle($tN, $rec, TRUE)) . '</td>
                                                        <td class="cmdCell">') . $this->displayWorkspaceOverview_commandLinksSub($tN, $rec, $origId)) . '</td>') . ($origId ? ('<td class="diffCell">' . $diffCode) . '</td>' : '')) . '
                                                </tr>';
        }
@@ -1210,8 +1212,8 @@ class tx_version_cm1 extends t3lib_SCbase {
                // Check that records are arrays:
                if (is_array($diff_1_record) && is_array($diff_2_record)) {
                        // Load full table description and initialize diff-object:
-                       t3lib_div::loadTCA($table);
-                       $t3lib_diff_Obj = t3lib_div::makeInstance('t3lib_diff');
+                       \t3lib_div::loadTCA($table);
+                       $t3lib_diff_Obj = \t3lib_div::makeInstance('TYPO3\\CMS\\Core\\Utility\\DiffUtility');
                        // Add header row:
                        $tRows = array();
                        $tRows[] = ((('
@@ -1225,20 +1227,20 @@ class tx_version_cm1 extends t3lib_SCbase {
                        $diffStrLen = 0;
                        // Traversing the first record and process all fields which are editable:
                        foreach ($diff_1_record as $fN => $fV) {
-                               if (($GLOBALS['TCA'][$table]['columns'][$fN] && $GLOBALS['TCA'][$table]['columns'][$fN]['config']['type'] !== 'passthrough') && !t3lib_div::inList('t3ver_label', $fN)) {
+                               if (($GLOBALS['TCA'][$table]['columns'][$fN] && $GLOBALS['TCA'][$table]['columns'][$fN]['config']['type'] !== 'passthrough') && !\t3lib_div::inList('t3ver_label', $fN)) {
                                        // Check if it is files:
                                        $isFiles = FALSE;
                                        if ((strcmp(trim($diff_1_record[$fN]), trim($diff_2_record[$fN])) && $GLOBALS['TCA'][$table]['columns'][$fN]['config']['type'] === 'group') && $GLOBALS['TCA'][$table]['columns'][$fN]['config']['internal_type'] === 'file') {
                                                // Initialize:
                                                $uploadFolder = $GLOBALS['TCA'][$table]['columns'][$fN]['config']['uploadfolder'];
-                                               $files1 = array_flip(t3lib_div::trimExplode(',', $diff_1_record[$fN], 1));
-                                               $files2 = array_flip(t3lib_div::trimExplode(',', $diff_2_record[$fN], 1));
+                                               $files1 = array_flip(\t3lib_div::trimExplode(',', $diff_1_record[$fN], 1));
+                                               $files2 = array_flip(\t3lib_div::trimExplode(',', $diff_2_record[$fN], 1));
                                                // Traverse filenames and read their md5 sum:
                                                foreach ($files1 as $filename => $tmp) {
-                                                       $files1[$filename] = @is_file((((PATH_site . $uploadFolder) . '/') . $filename)) ? md5(t3lib_div::getUrl(((PATH_site . $uploadFolder) . '/') . $filename)) : $filename;
+                                                       $files1[$filename] = @is_file((((PATH_site . $uploadFolder) . '/') . $filename)) ? md5(\t3lib_div::getUrl(((PATH_site . $uploadFolder) . '/') . $filename)) : $filename;
                                                }
                                                foreach ($files2 as $filename => $tmp) {
-                                                       $files2[$filename] = @is_file((((PATH_site . $uploadFolder) . '/') . $filename)) ? md5(t3lib_div::getUrl(((PATH_site . $uploadFolder) . '/') . $filename)) : $filename;
+                                                       $files2[$filename] = @is_file((((PATH_site . $uploadFolder) . '/') . $filename)) ? md5(\t3lib_div::getUrl(((PATH_site . $uploadFolder) . '/') . $filename)) : $filename;
                                                }
                                                // Implode MD5 sums and set flag:
                                                $diff_1_record[$fN] = implode(' ', $files1);
@@ -1248,8 +1250,8 @@ class tx_version_cm1 extends t3lib_SCbase {
                                        // If there is a change of value:
                                        if (strcmp(trim($diff_1_record[$fN]), trim($diff_2_record[$fN]))) {
                                                // Get the best visual presentation of the value and present that:
-                                               $val1 = t3lib_BEfunc::getProcessedValue($table, $fN, $diff_2_record[$fN], 0, 1);
-                                               $val2 = t3lib_BEfunc::getProcessedValue($table, $fN, $diff_1_record[$fN], 0, 1);
+                                               $val1 = \t3lib_BEfunc::getProcessedValue($table, $fN, $diff_2_record[$fN], 0, 1);
+                                               $val2 = \t3lib_BEfunc::getProcessedValue($table, $fN, $diff_1_record[$fN], 0, 1);
                                                // Make diff result and record string lenghts:
                                                $diffres = $t3lib_diff_Obj->makeDiffDisplay($val1, $val2, $isFiles ? 'div' : 'span');
                                                $diffStrLen += $t3lib_diff_Obj->differenceLgd;
@@ -1259,7 +1261,7 @@ class tx_version_cm1 extends t3lib_SCbase {
                                                        $allFiles = array_merge($files1, $files2);
                                                        foreach ($allFiles as $filename => $token) {
                                                                if (strlen($token) == 32 && strstr($diffres, $token)) {
-                                                                       $filename = t3lib_BEfunc::thumbCode(array($fN => $filename), $table, $fN, $this->doc->backPath) . $filename;
+                                                                       $filename = \t3lib_BEfunc::thumbCode(array($fN => $filename), $table, $fN, $this->doc->backPath) . $filename;
                                                                        $diffres = str_replace($token, $filename, $diffres);
                                                                }
                                                        }
@@ -1267,7 +1269,7 @@ class tx_version_cm1 extends t3lib_SCbase {
                                                // Add table row with result:
                                                $tRows[] = ((('
                                                        <tr class="bgColor4">
-                                                               <td>' . htmlspecialchars($GLOBALS['LANG']->sL(t3lib_BEfunc::getItemLabel($table, $fN)))) . '</td>
+                                                               <td>' . htmlspecialchars($GLOBALS['LANG']->sL(\t3lib_BEfunc::getItemLabel($table, $fN)))) . '</td>
                                                                <td width="98%">') . $diffres) . '</td>
                                                        </tr>
                                                ';
@@ -1338,7 +1340,7 @@ class tx_version_cm1 extends t3lib_SCbase {
                        $onClick = (((((((('var commentTxt=window.prompt("' . $GLOBALS['LANG']->getLL('rejectExplain')) . '","");
                                                        if (commentTxt!=null) {window.location.href="') . $this->doc->issueCommand(((((((((('&cmd[' . $table) . '][') . $rec_off['uid']) . '][version][action]=setStage') . '&cmd[') . $table) . '][') . $rec_off['uid']) . '][version][stageId]=-1'))) . '&cmd[') . $table) . '][') . $rec_off['uid']) . '][version][comment]="+escape(commentTxt);}') . ' return false;';
                        // Reject:
-                       $actionLinks .= ((((('<a href="#" onclick="' . htmlspecialchars($onClick)) . '" title="') . $GLOBALS['LANG']->getLL('reject', TRUE)) . '">') . t3lib_iconWorks::getSpriteIcon('actions-move-down')) . '</a>';
+                       $actionLinks .= ((((('<a href="#" onclick="' . htmlspecialchars($onClick)) . '" title="') . $GLOBALS['LANG']->getLL('reject', TRUE)) . '">') . \t3lib_iconWorks::getSpriteIcon('actions-move-down')) . '</a>';
                } else {
                        // Reject:
                        $actionLinks .= ('<img src="' . $this->doc->backPath) . 'gfx/clear.gif" width="14" height="14" alt="" align="top" title="" />';
@@ -1349,7 +1351,7 @@ class tx_version_cm1 extends t3lib_SCbase {
                        $onClick = (((((((('var commentTxt=window.prompt("' . $label) . '","");
                                                        if (commentTxt!=null) {window.location.href="') . $this->doc->issueCommand((((((((((('&cmd[' . $table) . '][') . $rec_off['uid']) . '][version][action]=setStage') . '&cmd[') . $table) . '][') . $rec_off['uid']) . '][version][stageId]=') . $sId))) . '&cmd[') . $table) . '][') . $rec_off['uid']) . '][version][comment]="+escape(commentTxt);}') . ' return false;';
                        if ($rec_off['t3ver_stage'] != 10) {
-                               $actionLinks .= ((((('<a href="#" onclick="' . htmlspecialchars($onClick)) . '" title="') . htmlspecialchars($titleAttrib)) . '">') . t3lib_iconWorks::getSpriteIcon('actions-move-up')) . '</a>';
+                               $actionLinks .= ((((('<a href="#" onclick="' . htmlspecialchars($onClick)) . '" title="') . htmlspecialchars($titleAttrib)) . '">') . \t3lib_iconWorks::getSpriteIcon('actions-move-up')) . '</a>';
                                $this->stageIndex[$sId][$table][] = $rec_off['uid'];
                                $this->recIndex[$table][$rec_off['uid']] = $sId;
                        }
@@ -1369,29 +1371,29 @@ class tx_version_cm1 extends t3lib_SCbase {
         */
        public function displayWorkspaceOverview_commandLinks($table, &$rec_on, &$rec_off, $vType) {
                if ($this->publishAccess && (!($GLOBALS['BE_USER']->workspaceRec['publish_access'] & 1) || (int) $rec_off['t3ver_stage'] === -10)) {
-                       $actionLinks = ((((('<a href="' . htmlspecialchars($this->doc->issueCommand((((((((((('&cmd[' . $table) . '][') . $rec_on['uid']) . '][version][action]=swap') . '&cmd[') . $table) . '][') . $rec_on['uid']) . '][version][swapWith]=') . $rec_off['uid'])))) . '" title="') . $GLOBALS['LANG']->getLL('publish', TRUE)) . '">') . t3lib_iconWorks::getSpriteIcon('actions-version-swap-version')) . '</a>';
+                       $actionLinks = ((((('<a href="' . htmlspecialchars($this->doc->issueCommand((((((((((('&cmd[' . $table) . '][') . $rec_on['uid']) . '][version][action]=swap') . '&cmd[') . $table) . '][') . $rec_on['uid']) . '][version][swapWith]=') . $rec_off['uid'])))) . '" title="') . $GLOBALS['LANG']->getLL('publish', TRUE)) . '">') . \t3lib_iconWorks::getSpriteIcon('actions-version-swap-version')) . '</a>';
                        if ($GLOBALS['BE_USER']->workspaceSwapAccess()) {
-                               $actionLinks .= ((((('<a href="' . htmlspecialchars($this->doc->issueCommand(((((((((((((((('&cmd[' . $table) . '][') . $rec_on['uid']) . '][version][action]=swap') . '&cmd[') . $table) . '][') . $rec_on['uid']) . '][version][swapWith]=') . $rec_off['uid']) . '&cmd[') . $table) . '][') . $rec_on['uid']) . '][version][swapIntoWS]=1')))) . '" title="') . $GLOBALS['LANG']->getLL('swap', TRUE)) . '">') . t3lib_iconWorks::getSpriteIcon('actions-version-swap-workspace')) . '</a>';
+                               $actionLinks .= ((((('<a href="' . htmlspecialchars($this->doc->issueCommand(((((((((((((((('&cmd[' . $table) . '][') . $rec_on['uid']) . '][version][action]=swap') . '&cmd[') . $table) . '][') . $rec_on['uid']) . '][version][swapWith]=') . $rec_off['uid']) . '&cmd[') . $table) . '][') . $rec_on['uid']) . '][version][swapIntoWS]=1')))) . '" title="') . $GLOBALS['LANG']->getLL('swap', TRUE)) . '">') . \t3lib_iconWorks::getSpriteIcon('actions-version-swap-workspace')) . '</a>';
                        }
                }
                if (!$GLOBALS['BE_USER']->workspaceCannotEditOfflineVersion($table, $rec_off)) {
                        // Release
-                       $actionLinks .= ((((((('<a href="' . htmlspecialchars($this->doc->issueCommand((((('&cmd[' . $table) . '][') . $rec_off['uid']) . '][version][action]=clearWSID')))) . '" onclick="return confirm(\'') . $GLOBALS['LANG']->getLL('removeFromWorkspace', TRUE)) . '?\');" title="') . $GLOBALS['LANG']->getLL('removeFromWorkspace', TRUE)) . '">') . t3lib_iconWorks::getSpriteIcon('actions-version-document-remove')) . '</a>';
+                       $actionLinks .= ((((((('<a href="' . htmlspecialchars($this->doc->issueCommand((((('&cmd[' . $table) . '][') . $rec_off['uid']) . '][version][action]=clearWSID')))) . '" onclick="return confirm(\'') . $GLOBALS['LANG']->getLL('removeFromWorkspace', TRUE)) . '?\');" title="') . $GLOBALS['LANG']->getLL('removeFromWorkspace', TRUE)) . '">') . \t3lib_iconWorks::getSpriteIcon('actions-version-document-remove')) . '</a>';
                        // Edit
                        if ($table === 'pages' && $vType !== 'element') {
                                $tempUid = $vType === 'branch' || $GLOBALS['BE_USER']->workspace === 0 ? $rec_off['uid'] : $rec_on['uid'];
-                               $actionLinks .= ((((((('<a href="#" onclick="top.loadEditId(' . $tempUid) . ');top.goToModule(\'') . $this->pageModule) . '\'); return false;" title="') . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_user_ws.xml:img_title_edit_page', TRUE)) . '">') . t3lib_iconWorks::getSpriteIcon('actions-version-page-open')) . '</a>';
+                               $actionLinks .= ((((((('<a href="#" onclick="top.loadEditId(' . $tempUid) . ');top.goToModule(\'') . $this->pageModule) . '\'); return false;" title="') . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_user_ws.xml:img_title_edit_page', TRUE)) . '">') . \t3lib_iconWorks::getSpriteIcon('actions-version-page-open')) . '</a>';
                        } else {
                                $params = ((('&edit[' . $table) . '][') . $rec_off['uid']) . ']=edit';
-                               $actionLinks .= ((((('<a href="#" onclick="' . htmlspecialchars(t3lib_BEfunc::editOnClick($params, $this->doc->backPath))) . '" title="') . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_user_ws.xml:img_title_edit_element', TRUE)) . '">') . t3lib_iconWorks::getSpriteIcon('actions-document-open')) . '</a>';
+                               $actionLinks .= ((((('<a href="#" onclick="' . htmlspecialchars(\t3lib_BEfunc::editOnClick($params, $this->doc->backPath))) . '" title="') . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_user_ws.xml:img_title_edit_element', TRUE)) . '">') . \t3lib_iconWorks::getSpriteIcon('actions-document-open')) . '</a>';
                        }
                }
                // History/Log
-               $actionLinks .= ((((('<a href="' . htmlspecialchars((((($this->doc->backPath . 'show_rechis.php?element=') . rawurlencode((($table . ':') . $rec_off['uid']))) . '&returnUrl=') . rawurlencode($this->REQUEST_URI)))) . '" title="') . $GLOBALS['LANG']->getLL('showLog', TRUE)) . '">') . t3lib_iconWorks::getSpriteIcon('actions-document-history-open')) . '</a>';
+               $actionLinks .= ((((('<a href="' . htmlspecialchars((((($this->doc->backPath . 'show_rechis.php?element=') . rawurlencode((($table . ':') . $rec_off['uid']))) . '&returnUrl=') . rawurlencode($this->REQUEST_URI)))) . '" title="') . $GLOBALS['LANG']->getLL('showLog', TRUE)) . '">') . \t3lib_iconWorks::getSpriteIcon('actions-document-history-open')) . '</a>';
                // View
                if ($table === 'pages') {
                        $tempUid = $vType === 'branch' || $GLOBALS['BE_USER']->workspace === 0 ? $rec_off['uid'] : $rec_on['uid'];
-                       $actionLinks .= ((('<a href="#" onclick="' . htmlspecialchars(t3lib_BEfunc::viewOnClick($tempUid, $this->doc->backPath, t3lib_BEfunc::BEgetRootLine($tempUid)))) . '">') . t3lib_iconWorks::getSpriteIcon('actions-document-view')) . '</a>';
+                       $actionLinks .= ((('<a href="#" onclick="' . htmlspecialchars(\t3lib_BEfunc::viewOnClick($tempUid, $this->doc->backPath, \t3lib_BEfunc::BEgetRootLine($tempUid)))) . '">') . \t3lib_iconWorks::getSpriteIcon('actions-document-view')) . '</a>';
                }
                return $actionLinks;
        }
@@ -1411,18 +1413,18 @@ class tx_version_cm1 extends t3lib_SCbase {
                        if (!$GLOBALS['BE_USER']->workspaceCannotEditRecord($table, $rec)) {
                                // Edit
                                if ($table === 'pages') {
-                                       $actionLinks .= ((((((('<a href="#" onclick="top.loadEditId(' . $uid) . ');top.goToModule(\'') . $this->pageModule) . '\'); return false;" title="') . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_user_ws.xml:img_title_edit_page', TRUE)) . '">') . t3lib_iconWorks::getSpriteIcon('apps-version-page-open')) . '</a>';
+                                       $actionLinks .= ((((((('<a href="#" onclick="top.loadEditId(' . $uid) . ');top.goToModule(\'') . $this->pageModule) . '\'); return false;" title="') . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_user_ws.xml:img_title_edit_page', TRUE)) . '">') . \t3lib_iconWorks::getSpriteIcon('apps-version-page-open')) . '</a>';
                                } else {
                                        $params = ((('&edit[' . $table) . '][') . $uid) . ']=edit';
-                                       $actionLinks .= ((((('<a href="#" onclick="' . htmlspecialchars(t3lib_BEfunc::editOnClick($params, $this->doc->backPath))) . '" title="') . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_user_ws.xml:img_title_edit_element', TRUE)) . '">') . t3lib_iconWorks::getSpriteIcon('actions-document-open')) . '</a>';
+                                       $actionLinks .= ((((('<a href="#" onclick="' . htmlspecialchars(\t3lib_BEfunc::editOnClick($params, $this->doc->backPath))) . '" title="') . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_user_ws.xml:img_title_edit_element', TRUE)) . '">') . \t3lib_iconWorks::getSpriteIcon('actions-document-open')) . '</a>';
                                }
                        }
                        // History/Log
-                       $actionLinks .= ((((('<a href="' . htmlspecialchars((((($this->doc->backPath . 'show_rechis.php?element=') . rawurlencode((($table . ':') . $uid))) . '&returnUrl=') . rawurlencode($this->REQUEST_URI)))) . '" title="') . $GLOBALS['LANG']->getLL('showLog', TRUE)) . '">') . t3lib_iconWorks::getSpriteIcon('actions-document-history-open')) . '</a>';
+                       $actionLinks .= ((((('<a href="' . htmlspecialchars((((($this->doc->backPath . 'show_rechis.php?element=') . rawurlencode((($table . ':') . $uid))) . '&returnUrl=') . rawurlencode($this->REQUEST_URI)))) . '" title="') . $GLOBALS['LANG']->getLL('showLog', TRUE)) . '">') . \t3lib_iconWorks::getSpriteIcon('actions-document-history-open')) . '</a>';
                }
                // View
                if ($table === 'pages') {
-                       $actionLinks .= ((('<a href="#" onclick="' . htmlspecialchars(t3lib_BEfunc::viewOnClick($uid, $this->doc->backPath, t3lib_BEfunc::BEgetRootLine($uid)))) . '">') . t3lib_iconWorks::getSpriteIcon('actions-document-view')) . '</a>';
+                       $actionLinks .= ((('<a href="#" onclick="' . htmlspecialchars(\t3lib_BEfunc::viewOnClick($uid, $this->doc->backPath, \t3lib_BEfunc::BEgetRootLine($uid)))) . '">') . \t3lib_iconWorks::getSpriteIcon('actions-document-view')) . '</a>';
                }
                return $actionLinks;
        }
@@ -1440,18 +1442,18 @@ class tx_version_cm1 extends t3lib_SCbase {
         */
        public function publishAction() {
                // If "Publish" or "Swap" buttons are pressed:
-               if (t3lib_div::_POST('_publish') || t3lib_div::_POST('_swap')) {
+               if (\t3lib_div::_POST('_publish') || \t3lib_div::_POST('_swap')) {
                        if ($this->table === 'pages') {
                                // Making sure ->uid is a page ID!
                                // Initialize workspace object and request all pending versions:
-                               $wslibObj = t3lib_div::makeInstance('wslib');
-                               $cmd = $wslibObj->getCmdArrayForPublishWS($GLOBALS['BE_USER']->workspace, t3lib_div::_POST('_swap'), $this->uid);
+                               $wslibObj = \t3lib_div::makeInstance('TYPO3\\CMS\\Version\\Utility\\WorkspacesUtility');
+                               $cmd = $wslibObj->getCmdArrayForPublishWS($GLOBALS['BE_USER']->workspace, \t3lib_div::_POST('_swap'), $this->uid);
                                // Execute the commands:
-                               $tce = t3lib_div::makeInstance('t3lib_TCEmain');
+                               $tce = \t3lib_div::makeInstance('TYPO3\\CMS\\Core\\DataHandler\\DataHandler');
                                $tce->stripslashes_values = 0;
                                $tce->start(array(), $cmd);
                                $tce->process_cmdmap();
-                               t3lib_BEfunc::setUpdateSignal('updatePageTree');
+                               \t3lib_BEfunc::setUpdateSignal('updatePageTree');
                                return $tce->errorLog;
                        }
                }
@@ -1459,8 +1461,9 @@ class tx_version_cm1 extends t3lib_SCbase {
 
 }
 
+
 // Make instance:
-$SOBE = t3lib_div::makeInstance('tx_version_cm1');
+$SOBE = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Version\\ClickMenu\\VersionClickMenu');
 $SOBE->init();
 $SOBE->main();
 $SOBE->printContent();
index 807ee17..5b8b22a 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 // DO NOT CHANGE THIS FILE! It is automatically generated by extdeveval::buildAutoloadRegistry.
 // This file was generated on 2010-11-13 17:45
-$extensionPath = t3lib_extMgm::extPath('version');
+$extensionPath = \TYPO3\CMS\Core\Extension\ExtensionManager::extPath('version');
 return array(
        'tx_version_tcemain_commandmap' => $extensionPath . 'class.tx_version_tcemain_commandmap.php',
        'tx_version_cm1' => $extensionPath . 'cm1/index.php',
index e6e4b13..4995445 100644 (file)
@@ -4,16 +4,16 @@ if (!defined('TYPO3_MODE')) {
        die('Access denied.');
 }
 // register the hook to actually do the work within TCEmain
-$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processCmdmapClass']['version'] = t3lib_extMgm::extPath('version', 'class.tx_version_tcemain.php:&tx_version_tcemain');
-$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['moveRecordClass']['version'] = t3lib_extMgm::extPath('version', 'class.tx_version_tcemain.php:&tx_version_tcemain');
+$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processCmdmapClass']['version'] = \TYPO3\CMS\Core\Extension\ExtensionManager::extPath('version', 'class.tx_version_tcemain.php:&TYPO3\\CMS\\Version\\Hook\\DataHandlerHook');
+$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['moveRecordClass']['version'] = \TYPO3\CMS\Core\Extension\ExtensionManager::extPath('version', 'class.tx_version_tcemain.php:&TYPO3\\CMS\\Version\\Hook\\DataHandlerHook');
 // Register hook for overriding the icon status overlay
-$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_iconworks.php']['overrideIconOverlay']['version'] = t3lib_extMgm::extPath('version', 'class.tx_version_iconworks.php:&tx_version_iconworks');
+$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_iconworks.php']['overrideIconOverlay']['version'] = \TYPO3\CMS\Core\Extension\ExtensionManager::extPath('version', 'class.tx_version_iconworks.php:&TYPO3\\CMS\\Version\\Hook\\IconUtilityHook');
 // Register hook to check for the preview mode in the FE
-$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['connectToDB']['version_preview'] = 'EXT:version/Classes/Preview.php:Tx_Version_Preview->checkForPreview';
-$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/index_ts.php']['postBeUser']['version_preview'] = 'EXT:version/Classes/Preview.php:Tx_Version_Preview->initializePreviewUser';
+$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['connectToDB']['version_preview'] = 'EXT:version/Classes/Preview.php:TYPO3\\CMS\\Version\\Hook\\PreviewHook->checkForPreview';
+$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/index_ts.php']['postBeUser']['version_preview'] = 'EXT:version/Classes/Preview.php:TYPO3\\CMS\\Version\\Hook\\PreviewHook->initializePreviewUser';
 if (TYPO3_MODE == 'BE') {
        // add default notification options to every page
-       t3lib_extMgm::addPageTSconfig('
+       \TYPO3\CMS\Core\Extension\ExtensionManager::addPageTSconfig('
        tx_version.workspaces.stageNotificationEmail.subject = LLL:EXT:version/Resources/Private/Language/locallang_emails.xml:subject
        tx_version.workspaces.stageNotificationEmail.message = LLL:EXT:version/Resources/Private/Language/locallang_emails.xml:message
        # tx_version.workspaces.stageNotificationEmail.additionalHeaders =
index c3a3d43..6e39841 100644 (file)
@@ -3,10 +3,10 @@ if (!defined('TYPO3_MODE')) {
        die('Access denied.');
 }
 if (TYPO3_MODE == 'BE') {
-       if (!t3lib_extMgm::isLoaded('workspaces')) {
+       if (!\TYPO3\CMS\Core\Extension\ExtensionManager::isLoaded('workspaces')) {
                $GLOBALS['TBE_MODULES_EXT']['xMOD_alt_clickmenu']['extendCMclasses'][] = array(
-                       'name' => 'tx_version_cm1',
-                       'path' => t3lib_extMgm::extPath($_EXTKEY) . 'class.tx_version_cm1.php'
+                       'name' => 'TYPO3\\CMS\\Version\\ClickMenu\\VersionClickMenu',
+                       'path' => \TYPO3\CMS\Core\Extension\ExtensionManager::extPath($_EXTKEY) . 'class.tx_version_cm1.php'
                );
        }
 }
index beb28c3..043f29b 100644 (file)
@@ -4,5 +4,5 @@
  * and will be removed by 7.0. The class was renamed and is now located at:
  * typo3/sysext/version/Classes/Task/AutoPublishTask.php
  */
-require_once t3lib_extMgm::extPath('version') . 'Classes/Task/AutoPublishTask.php';
+require_once \TYPO3\CMS\Core\Extension\ExtensionManager::extPath('version') . 'Classes/Task/AutoPublishTask.php';
 ?>
\ No newline at end of file
index 1b675c0..118cfd0 100755 (executable)
@@ -4,5 +4,5 @@
  * and will be removed by 7.0. The class was renamed and is now located at:
  * typo3/sysext/version/Classes/Utility/WorkspacesUtility.php
  */
-require_once t3lib_extMgm::extPath('version') . 'Classes/Utility/WorkspacesUtility.php';
+require_once \TYPO3\CMS\Core\Extension\ExtensionManager::extPath('version') . 'Classes/Utility/WorkspacesUtility.php';
 ?>
\ No newline at end of file
index e01d00f..3112e9d 100755 (executable)
@@ -40,9 +40,9 @@ require_once 'class.wslib_gui.php';
  * and will be removed by 7.0. The class was renamed and is now located at:
  * typo3/sysext/version/Classes/Controller/WorkspaceModuleController.php
  */
-require_once t3lib_extMgm::extPath('version') . 'Classes/Controller/WorkspaceModuleController.php';
+require_once \TYPO3\CMS\Core\Extension\ExtensionManager::extPath('version') . 'Classes/Controller/WorkspaceModuleController.php';
 // Make instance:
-$SOBE = t3lib_div::makeInstance('SC_mod_user_ws_index');
+$SOBE = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Version\\Controller\\WorkspaceModuleController');
 $SOBE->execute();
 $SOBE->init();
 $SOBE->main();