[TASK] Remove deprecated code
authorMarkus Klein <klein.t3@mfc-linz.at>
Tue, 25 Sep 2012 07:36:25 +0000 (09:36 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Thu, 21 Mar 2013 19:29:45 +0000 (20:29 +0100)
Remove all code that was marked for removal in version 6.0.

Resolves: #39137
Related: #37081
Releases: 6.1
Change-Id: Ia3efe60b280e886436153e07438b611d92c47a2f
Reviewed-on: https://review.typo3.org/15018
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
typo3/sysext/version/Classes/Controller/VersionModuleController.php
typo3/sysext/version/Classes/Controller/WorkspaceModuleController.php
typo3/sysext/version/Classes/Hook/PreviewHook.php

index 5fe3acc..eae0d92 100644 (file)
@@ -590,13 +590,13 @@ class VersionModuleController extends \TYPO3\CMS\Backend\Module\BaseScriptClass
                        $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')) {
-                       $ttlHours = intval($GLOBALS['BE_USER']->getTSConfigVal('options.workspaces.previewLinkTTLHours'));
-                       $ttlHours = $ttlHours ? $ttlHours : 24 * 2;
+                       $workspaceService = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Workspaces\\Service\\WorkspaceService');
+                       /* @var $workspaceService TYPO3\CMS\Workspaces\Service\WorkspaceService */
                        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);
+                               $previewUrl = $workspaceService->generateWorkspacePreviewLink(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 = $workspaceService->generateWorkspacePreviewLink(intval($this->id), $params, '');
                        }
                        $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);
                }
index f58f3e6..31c5439 100644 (file)
@@ -388,10 +388,10 @@ class WorkspaceModuleController extends \TYPO3\CMS\Backend\Module\BaseScriptClas
                        }
                        // Preview of workspace link
                        if (\TYPO3\CMS\Core\Utility\GeneralUtility::_POST('_previewLink')) {
-                               $ttlHours = intval($GLOBALS['BE_USER']->getTSConfigVal('options.workspaces.previewLinkTTLHours'));
-                               $ttlHours = $ttlHours ? $ttlHours : 24 * 2;
-                               $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>';
+                               $workspaceService = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Workspaces\\Service\\WorkspaceService');
+                               /* @var $workspaceService TYPO3\CMS\Workspaces\Service\WorkspaceService */
+                               $previewUrl = $workspaceService->generateWorkspacePreviewLink(intval($GLOBALS['BE_USER']->workspaceRec['db_mountpoints']));
+                               $actionLinks .= '<br />Any user can browse the workspace frontend using this link (does not require a backend login):<br /><br /><a target="_blank" href="' . htmlspecialchars($previewUrl) . '">' . $previewUrl . '</a>';
                        } else {
                                $actionLinks .= '<input type="submit" name="_previewLink" value="Generate Workspace Preview Link" />';
                        }
index 8575817..bc43de6 100644 (file)
@@ -130,7 +130,6 @@ class PreviewHook implements \TYPO3\CMS\Core\SingletonInterface {
         * This can also be used to generate previews of hidden pages, start/endtimes, usergroups and those other settings from the Admin Panel - just not implemented yet.
         *
         * @return      array           Preview configuration array from sys_preview record.
-        * @see t3lib_BEfunc::compilePreviewKeyword()
         * @previouslyknownas TSFE->ADMCMD_preview
         */
        public function getPreviewConfiguration() {
@@ -229,7 +228,6 @@ class PreviewHook implements \TYPO3\CMS\Core\SingletonInterface {
         * @param       integer         Time-To-Live for keyword
         * @param       integer         Which workspace to preview. Workspace UID, -1 or >0. If set, the getVars is ignored in the frontend, so that string can be empty
         * @return      string          Returns keyword to use in URL for ADMCMD_prev=
-        * @formallyknownas t3lib_BEfunc::compilePreviewKeyword
         */
        public function compilePreviewKeyword($getVarsStr, $backendUserUid, $ttl = 172800, $fullWorkspace = NULL) {
                $fieldData = array(