[TASK] Remove reference to deprecated function
authorMarkus Klein <klein.t3@mfc-linz.at>
Fri, 11 May 2012 08:11:02 +0000 (10:11 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Thu, 21 Mar 2013 18:40:07 +0000 (19:40 +0100)
workspaceVersioningTypeAccess() is deprecated for a long time now.
Remove the references and dead code.

Change-Id: I4f96201ced2df361a90ba0782230d2307a336fb5
Resolves: #37081
Releases: 6.1
Reviewed-on: https://review.typo3.org/11143
Reviewed-by: Wouter Wolters
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
typo3/sysext/version/Classes/Hook/DataHandlerHook.php
typo3/sysext/version/Classes/View/VersionView.php

index accbc75..0c254c9 100644 (file)
@@ -635,7 +635,7 @@ class DataHandlerHook {
                        // Remove the possible inline child tables from the tables to be versioniozed automatically:
                        $verTablesArray = array_diff($verTablesArray, $this->getPossibleInlineChildTablesOfParentTable('pages'));
                        // Begin to copy pages if we're allowed to:
-                       if ($tcemainObj->BE_USER->workspaceVersioningTypeAccess($versionizeTree)) {
+                       if ($versionizeTree === -1) {
                                // Versionize this page:
                                $theNewRootID = $tcemainObj->versionizeRecord('pages', $uid, $label, FALSE, $versionizeTree);
                                if ($theNewRootID) {
@@ -1293,4 +1293,4 @@ class DataHandlerHook {
 }
 
 
-?>
\ No newline at end of file
+?>
index 2c4f7b0..9aec36f 100644 (file)
@@ -98,54 +98,8 @@ class VersionView {
                                        </table>
                                ';
                        }
-               } elseif ($GLOBALS['BE_USER']->workspace !== 0) {
-                       // Write out HTML code:
-                       switch ($GLOBALS['BE_USER']->workspace) {
-                       case 0:
-                               $wsTitle = $GLOBALS['LANG']->sL('LLL:EXT:version/locallang.xml:live', TRUE);
-                               break;
-                       case -1:
-                               $wsTitle = $GLOBALS['LANG']->sL('LLL:EXT:version/locallang.xml:draft', TRUE);
-                               break;
-                       default:
-                               $wsTitle = $GLOBALS['BE_USER']->workspaceRec['title'];
-                               break;
-                       }
-                       // Get Current page record:
-                       $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 = \TYPO3\CMS\Backend\Utility\BackendUtility::getWorkspaceVersionOfRecord($GLOBALS['BE_USER']->workspace, 'pages', $onlineId);
-                       if (!$verPage) {
-                               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', \TYPO3\CMS\Core\Utility\GeneralUtility::linkThisScript(array(
-                                                       'id' => $onlineId
-                                               )));
-                                               $onClick = 'window.location.href=\'' . $onClick . '\'; return false;';
-                                               // Write out HTML code:
-                                               return '
-
-                                                       <!--
-                                                               No version yet, create one?
-                                                       -->
-                                                       <table border="0" cellpadding="0" cellspacing="0" id="typo3-versionSelector">
-                                                               <tr>
-                                                                       <td>' . $selectorLabel . '</td>
-                                                                       <td>' . $GLOBALS['LANG']->sL('LLL:EXT:version/locallang.xml:workspace', TRUE) . ': "' . htmlspecialchars($wsTitle) . '"</td>
-                                                                       <td>
-                                                                               <input type="button" value="New version of page" name="_" onclick="' . htmlspecialchars($onClick) . '" /></td>
-                                                               </tr>
-                                                       </table>
-                                               ';
-                                       }
-                               }
-                       }
                }
        }
-
 }
 
-
-?>
\ No newline at end of file
+?>