[BUGFIX] Properly check disabled versioning within tcemain
authorTolleiv Nietsch <info@tolleiv.de>
Sat, 4 Feb 2012 08:53:31 +0000 (09:53 +0100)
committerGeorg Ringer <mail@ringerge.org>
Tue, 31 Jul 2012 05:51:52 +0000 (07:51 +0200)
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: I75a994c5eb09c4cc5b4c68e986f42b4592fd1043
Fixes: #33625
Releases: 4.7, 4.6, 4.5
Reviewed-on: http://review.typo3.org/12834
Reviewed-by: Tymoteusz Motylewski
Reviewed-by: Marcus Schwemer
Reviewed-by: Georg Ringer
Tested-by: Georg Ringer
t3lib/class.t3lib_tcemain.php

index dfc9772..d4a2f39 100644 (file)
@@ -3437,7 +3437,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';
                }
 
@@ -3787,7 +3787,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);
@@ -4534,7 +4534,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';
                }