git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@3012 709f56b5-9817-0410-a4d7...
authorKasper Skårhøj <kasper@typo3.org>
Sat, 2 Feb 2008 00:44:50 +0000 (00:44 +0000)
committerKasper Skårhøj <kasper@typo3.org>
Sat, 2 Feb 2008 00:44:50 +0000 (00:44 +0000)
ChangeLog
t3lib/class.t3lib_tcemain.php

index 1205cb2..0650620 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2008-02-02  Kasper Sk\8crh¿j <kasper2008@typo3.com>
+       
+       * Fixed a bug in tcemain that replicated FlexForm .vDEFbase tags in a strange way. Not critical but built up garbage in FlexForm XML (the XML can be cleaned with the lowlevel_cleaner or manually per recording using the Content Menu Item "FlexForm XML")
+
 2008-02-01  Kasper Sk\8crh¿j <kasper2008@typo3.com>
        
        * Feature added to disable automatic update of diff data for translation when saving records. Instead a button is added to explicitly do this. Feature is called "explicitConfirmationOfTranslation" in $TYPO3_CONF_VARS
index 8886f1c..5b829c0 100755 (executable)
@@ -2291,17 +2291,19 @@ class t3lib_TCEmain     {
 
                                                                // Finally, check if new and old values are different (or no .vDEFbase value is found) and if so, we record the vDEF value for diff'ing.
                                                                // We do this after $dataValues has been updated since I expect that $dataValues_current holds evaluated values from database (so this must be the right value to compare with).
-                                                       if ($this->clear_flexFormData_vDEFbase) {
-                                                               $dataValues[$key][$vKey.'.vDEFbase'] = '';
-                                                       } elseif ($this->updateModeL10NdiffData && $GLOBALS['TYPO3_CONF_VARS']['BE']['flexFormXMLincludeDiffBase'] && $vKey!=='vDEF' && (strcmp($dataValues[$key][$vKey],$dataValues_current[$key][$vKey]) || !isset($dataValues_current[$key][$vKey.'.vDEFbase']) || $this->updateModeL10NdiffData==='FORCE_FFUPD'))   {
-                                                                       // Now, check if a vDEF value is submitted in the input data, if so we expect this has been processed prior to this operation (normally the case since those fields are higher in the form) and we can use that:
-                                                               if (isset($dataValues[$key]['vDEF']))   {
-                                                                       $diffValue = $dataValues[$key]['vDEF'];
-                                                               } else {        // If not found (for translators with no access to the default language) we use the one from the current-value data set:
-                                                                       $diffValue = $dataValues_current[$key]['vDEF'];
+                                                       if (substr($vKey,-9)!='.vDEFbase')      {
+                                                               if ($this->clear_flexFormData_vDEFbase) {
+                                                                       $dataValues[$key][$vKey.'.vDEFbase'] = '';
+                                                               } elseif ($this->updateModeL10NdiffData && $GLOBALS['TYPO3_CONF_VARS']['BE']['flexFormXMLincludeDiffBase'] && $vKey!=='vDEF' && (strcmp($dataValues[$key][$vKey],$dataValues_current[$key][$vKey]) || !isset($dataValues_current[$key][$vKey.'.vDEFbase']) || $this->updateModeL10NdiffData==='FORCE_FFUPD'))   {
+                                                                               // Now, check if a vDEF value is submitted in the input data, if so we expect this has been processed prior to this operation (normally the case since those fields are higher in the form) and we can use that:
+                                                                       if (isset($dataValues[$key]['vDEF']))   {
+                                                                               $diffValue = $dataValues[$key]['vDEF'];
+                                                                       } else {        // If not found (for translators with no access to the default language) we use the one from the current-value data set:
+                                                                               $diffValue = $dataValues_current[$key]['vDEF'];
+                                                                       }
+                                                                               // Setting the reference value for vDEF for this translation. This will be used for translation tools to make a diff between the vDEF and vDEFbase to see if an update would be fitting.
+                                                                       $dataValues[$key][$vKey.'.vDEFbase'] = $diffValue;
                                                                }
-                                                                       // Setting the reference value for vDEF for this translation. This will be used for translation tools to make a diff between the vDEF and vDEFbase to see if an update would be fitting.
-                                                               $dataValues[$key][$vKey.'.vDEFbase'] = $diffValue;
                                                        }
                                                }
                                        }