[BUGFIX] Properly check disabled versioning within tcemain
authorTolleiv Nietsch <info@tolleiv.de>
Sat, 4 Feb 2012 08:53:31 +0000 (09:53 +0100)
committerSteffen Ritter <info@rs-websystems.de>
Tue, 13 Mar 2012 09:00:14 +0000 (10:00 +0100)
Setting $GLOBALS['TCA'][$table]['ctrl']['versioningWS'] = FALSE; isn't
fully working within tcemain because some isset() checks don't
look at the value atm.

Change-Id: I5cfca5fa73a7f30b56342052ef0193f21999bce1
Fixes: #33625
Releases: 4.7, 4.6, 4.5
Reviewed-on: http://review.typo3.org/8836
Reviewed-by: Philipp Gampe
Reviewed-by: Wouter Wolters
Reviewed-by: Markus Klein
Tested-by: Markus Klein
Reviewed-by: Stefan Neufeind
Reviewed-by: Steffen Ritter
Tested-by: Steffen Ritter
t3lib/class.t3lib_tcemain.php

index 7963364..6aa2635 100644 (file)
@@ -3270,7 +3270,7 @@ class t3lib_TCEmain {
                }
 
                $where = '';
-               if (isset($GLOBALS['TCA'][$table]['ctrl']['versioningWS'])) {
+               if (isset($GLOBALS['TCA'][$table]['ctrl']['versioningWS']) && $GLOBALS['TCA'][$table]['ctrl']['versioningWS']) {
                        $where = ' AND t3ver_oid=0';
                }
 
@@ -3616,7 +3616,7 @@ class t3lib_TCEmain {
                }
 
                $where = '';
-               if (isset($GLOBALS['TCA'][$table]['ctrl']['versioningWS'])) {
+               if (isset($GLOBALS['TCA'][$table]['ctrl']['versioningWS']) && $GLOBALS['TCA'][$table]['ctrl']['versioningWS']) {
                        $where = ' AND t3ver_oid=0';
                }
                $l10nRecords = t3lib_BEfunc::getRecordsByField($table, $GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField'], $uid, $where);
@@ -4360,7 +4360,7 @@ class t3lib_TCEmain {
                }
 
                $where = '';
-               if (isset($GLOBALS['TCA'][$table]['ctrl']['versioningWS'])) {
+               if (isset($GLOBALS['TCA'][$table]['ctrl']['versioningWS']) && $GLOBALS['TCA'][$table]['ctrl']['versioningWS']) {
                        $where = ' AND t3ver_oid=0';
                }