Fixed bug #6340: JS errors with dividers2tabs and rtehtmlarea
authorIngmar Schlecht <ingmar.schlecht@typo3.org>
Mon, 22 Oct 2007 19:33:53 +0000 (19:33 +0000)
committerIngmar Schlecht <ingmar.schlecht@typo3.org>
Mon, 22 Oct 2007 19:33:53 +0000 (19:33 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/branches/TYPO3_4-1@2607 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/class.t3lib_tceforms.php

index f705906..6c3d371 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,8 @@
-2007-10-21     Thomas Hempel <thomas@typo3-unleashed.net>
+2007-10-22  Andreas Otto  <andreas.otto@dkd.de>
+
+       * Fixed bug #6340: JS errors with dividers2tabs and rtehtmlarea
+
+2007-10-21  Thomas Hempel  <thomas@typo3-unleashed.net>
        
        * Fixed bug: #6531: Function getUpdateJS doesn't work properly (Thanks to Philip Almeida)
        * Fixed bug: #434: function getUpdateJS produce JS error messages
index 88af366..b828fac 100755 (executable)
@@ -504,9 +504,11 @@ class t3lib_TCEforms       {
                                        $fields = $this->mergeFieldsWithAddedFields($fields,$this->getFieldsToAdd($table,$row,$typeNum));
 
                                                // If TCEforms will render a tab menu in the next step, push the name to the tab stack:
+                                       $tabIdentString = '';
+                                       $tabIdentStringMD5 = '';
                                        if (strstr($itemList, '--div--') !== false && $this->enableTabMenu && $TCA[$table]['ctrl']['dividers2tabs']) {
                                                $tabIdentString = 'TCEforms:'.$table.':'.$row['uid'];
-                                               $tabIdentStringMD5 = $GLOBALS['TBE_TEMPLATE']->getDynTabMenuId('TCEforms:'.$table.':'.$row['uid']);
+                                               $tabIdentStringMD5 = $GLOBALS['TBE_TEMPLATE']->getDynTabMenuId($tabIdentString);
                                                        // Remember that were currently working on the general tab:
                                                if (isset($fields[0]) && strpos($fields[0], '--div--') !== 0) {
                                                        $this->pushToDynNestedStack('tab', $tabIdentStringMD5.'-1');
@@ -566,7 +568,7 @@ class t3lib_TCEforms        {
                                                                } else {        // Setting alternative title for "General" tab if "--div--" is the very first element.
                                                                        $out_array_meta[$out_sheet]['title'] = $this->sL($parts[1]);
                                                                                // Only add the first tab to the dynNestedStack if there are more tabs:
-                                                                       if (strpos($itemList, '--div--', strlen($fieldInfo))) {
+                                                                       if ($tabIdentString && strpos($itemList, '--div--', strlen($fieldInfo))) {
                                                                                $this->pushToDynNestedStack('tab', $tabIdentStringMD5.'-1');
                                                                        }
                                                                }