Fixed bug #15738: TCA field for versioning type (vtype) should only be available...
authorSteffen Kamper <info@sk-typo3.de>
Wed, 22 Sep 2010 08:45:04 +0000 (08:45 +0000)
committerSteffen Kamper <info@sk-typo3.de>
Wed, 22 Sep 2010 08:45:04 +0000 (08:45 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@8853 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/sysext/version/tca.php

index a73ea9f..4bf8e84 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,6 @@
 2010-09-22  Steffen Kamper  <steffen@typo3.org>
 
+       * Fixed bug #15738: TCA field for versioning type (vtype) should only be available if elementVersioningOnly is not set (Thanks to Benjamin Mack)
        * Fixed bug #15465: sys_action: setting mountpoints as non-admin (Thanks to Georg Ringer)
        * Fixed bug #15761: tslib_menu misses test of html5
 
index bc10aec..744446a 100644 (file)
@@ -169,17 +169,6 @@ $TCA['sys_workspace'] = array(
                                ),
                        )
                ),
-               'vtypes' => array(
-                       'label' => 'LLL:EXT:lang/locallang_tca.xml:sys_workspace.vtypes',
-                       'config' => array(
-                               'type' => 'check',
-                               'items' => array(
-                                       array('Element', 0),
-                                       array('Page', 0),
-                                       array('Branch', 0)
-                               ),
-                       )
-               ),
                'publish_access' => array(
                        'label' => 'LLL:EXT:lang/locallang_tca.xml:sys_workspace.publish_access',
                        'config' => array(
@@ -207,9 +196,31 @@ $TCA['sys_workspace'] = array(
                        --div--;LLL:EXT:lang/locallang_tca.xml:sys_filemounts.tabs.users,adminusers,members,reviewers,stagechg_notification,
                        --div--;LLL:EXT:lang/locallang_tca.xml:sys_filemounts.tabs.mountpoints,db_mountpoints,file_mountpoints,
                        --div--;LLL:EXT:lang/locallang_tca.xml:sys_filemounts.tabs.publishing,publish_time,unpublish_time,
-                       --div--;LLL:EXT:lang/locallang_tca.xml:sys_filemounts.tabs.other,freeze,live_edit,review_stage_edit,disable_autocreate,swap_modes,vtypes,publish_access'
+                       --div--;LLL:EXT:lang/locallang_tca.xml:sys_filemounts.tabs.other,freeze,live_edit,review_stage_edit,disable_autocreate,swap_modes,publish_access'
                )
        )
 );
 
+// if other versioning options than element versions are active, 
+// the TCA column needs to be added as well
+if (isset($GLOBALS['TYPO3_CONF_VARS']['BE']['elementVersioningOnly'])
+       && !$GLOBALS['TYPO3_CONF_VARS']['BE']['elementVersioningOnly']) {
+       $additionalWorkspaceTcaColumn = array(
+               'vtypes' => array(
+                       'label' => 'LLL:EXT:lang/locallang_tca.xml:sys_workspace.vtypes',
+                       'config' => array(
+                               'type' => 'check',
+                               'items' => array(
+                                       array('Element', 0),
+                                       array('Page',    0),
+                                       array('Branch',  0)
+                               )
+                       )
+               )
+       );
+       t3lib_extMgm::addTCAcolumns('sys_workspace', $additionalWorkspaceTcaColumn, FALSE);
+       t3lib_extMgm::addToAllTCAtypes('sys_workspace', 'vtypes', '', 'after:swap_modes');
+}
+
+
 ?>
\ No newline at end of file