Added feature #11825: Override FE labels with XML files
[Packages/TYPO3.CMS.git] / t3lib / class.t3lib_flexformtools.php
index 0b6d952..0c5a875 100644 (file)
@@ -2,7 +2,7 @@
 /***************************************************************
 *  Copyright notice
 *
-*  (c) 2006 Kasper Skaarhoj (kasperYYYY@typo3.com)
+*  (c) 2006-2009 Kasper Skaarhoj (kasperYYYY@typo3.com)
 *  All rights reserved
 *
 *  This script is part of the TYPO3 project. The TYPO3 project is
@@ -72,7 +72,7 @@ class t3lib_flexformtools {
 
        var $convertCharset = FALSE;            // If set, the charset of data XML is converted to system charset.
        var $reNumberIndexesOfSectionData = FALSE;      // If set, section indexes are re-numbered before processing
-       
+
        var $traverseFlexFormXMLData_DS = array();      // Contains data structure when traversing flexform
        var $traverseFlexFormXMLData_Data = array();    // Contains data array when traversing flexform
 
@@ -364,6 +364,14 @@ class t3lib_flexformtools {
                #debug(array($dsArr, $data, $PA),$path);
                        // Just setting value in our own result array, basically replicating the structure:
                $pObj->setArrayValueByPath($path,$this->cleanFlexFormXML,$data);
+
+                       // Looking if an "extension" called ".vDEFbase" is found and if so, accept that too:
+               if ($GLOBALS['TYPO3_CONF_VARS']['BE']['flexFormXMLincludeDiffBase'])    {
+                       $vDEFbase = $pObj->getArrayValueByPath($path.'.vDEFbase',$pObj->traverseFlexFormXMLData_Data);
+                       if (isset($vDEFbase))   {
+                               $pObj->setArrayValueByPath($path.'.vDEFbase',$this->cleanFlexFormXML,$vDEFbase);
+                       }
+               }
        }
 
 
@@ -447,6 +455,9 @@ class t3lib_flexformtools {
         * @return      string          XML content.
         */
        function flexArray2Xml($array, $addPrologue=FALSE)      {
+               if ($GLOBALS['TYPO3_CONF_VARS']['BE']['flexformForceCDATA']) {
+                       $this->flexArray2Xml_options['useCDATA'] = 1;
+               }
 
                $options = $GLOBALS['TYPO3_CONF_VARS']['BE']['niceFlexFormXMLtags'] ? $this->flexArray2Xml_options : array();
                $spaceInd = ($GLOBALS['TYPO3_CONF_VARS']['BE']['compactFlexFormXML'] ? -1 : 4);
@@ -463,4 +474,4 @@ class t3lib_flexformtools {
 if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['t3lib/class.t3lib_flexformtools.php'])    {
        include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['t3lib/class.t3lib_flexformtools.php']);
 }
-?>
\ No newline at end of file
+?>