From: Oliver Hader Date: Tue, 8 Apr 2008 12:33:16 +0000 (+0000) Subject: Followup to #8014: Fixed bug with usage of t3lib_TCEforms::getDynTabMenu() X-Git-Tag: TYPO3_4-2-0RC2~41 X-Git-Url: http://git.typo3.org/Packages/TYPO3.CMS.git/commitdiff_plain/10b83279a76f77524bae317923cc07334fa5de39 Followup to #8014: Fixed bug with usage of t3lib_TCEforms::getDynTabMenu() git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@3546 709f56b5-9817-0410-a4d7-c38de5d9e867 --- diff --git a/ChangeLog b/ChangeLog index 1d6d7b0a1ea8..bd6924e33eb0 100755 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2008-04-08 Oliver Hader + + * Followup to #8014: Fixed bug with usage of t3lib_TCEforms::getDynTabMenu() + 2008-04-08 Benjamin Mack * Fixed bug #8041: EM has wrong image tag for headers in extension listing (Thanks to Steffen Kamper) diff --git a/t3lib/class.t3lib_tceforms.php b/t3lib/class.t3lib_tceforms.php index 2e25593c0c73..209eaa1eb9c3 100755 --- a/t3lib/class.t3lib_tceforms.php +++ b/t3lib/class.t3lib_tceforms.php @@ -657,21 +657,19 @@ class t3lib_TCEforms { if ($content) { // Wrap content (row) with table-tag, otherwise tab/sheet will be disabled (see getdynTabMenu() ) $content = ''.$content.'
'; - $parts[$idx] = array( - 'label' => $out_array_meta[$idx]['title'], - 'content' => $content, - 'newline' => $out_array_meta[$idx]['newline'], // Newline for this tab/sheet - ); - } - - + } + $parts[$idx] = array( + 'label' => $out_array_meta[$idx]['title'], + 'content' => $content, + 'newline' => $out_array_meta[$idx]['newline'], // Newline for this tab/sheet + ); } if (count($parts) > 1) { // Unset the current level of tab menus: $this->popFromDynNestedStack('tab', $tabIdentStringMD5.'-'.($out_sheet+1)); - - $output = $this->getDynTabMenu($parts, $tabIdentString, $table); + $dividersToTabsBehaviour = (isset($TCA[$table]['ctrl']['dividers2tabs']) ? $TCA[$table]['ctrl']['dividers2tabs'] : 1); + $output = $this->getDynTabMenu($parts, $tabIdentString, $dividersToTabsBehaviour); } else { // If there is only one tab/part there is no need to wrap it into the dynTab code @@ -2371,7 +2369,8 @@ class t3lib_TCEforms { } if (is_array($dataStructArray['sheets'])) { - $item.= $this->getDynTabMenu($tabParts, 'TCEFORMS:flexform:'.$PA['itemFormElName'].$PA['_lang'], $table); + $dividersToTabsBehaviour = (isset($GLOBALS['TCA'][$table]['ctrl']['dividers2tabs']) ? $GLOBALS['TCA'][$table]['ctrl']['dividers2tabs'] : 1); + $item.= $this->getDynTabMenu($tabParts, 'TCEFORMS:flexform:'.$PA['itemFormElName'].$PA['_lang'], $dividersToTabsBehaviour); } else { $item.= $sheetContent; } @@ -4066,12 +4065,12 @@ class t3lib_TCEforms { * * @param array Parts for the tab menu, fed to template::getDynTabMenu() * @param string ID string for the tab menu - * @param string Name of the table to get the tab menu for (must not be empty) + * @param integer If set to '1' empty tabs will be removed, If set to '2' empty tabs will be disabled * @return string HTML for the menu */ - function getDynTabMenu($parts, $idString, $table) { + function getDynTabMenu($parts, $idString, $dividersToTabsBehaviour = 1) { if (is_object($GLOBALS['TBE_TEMPLATE'])) { - return $GLOBALS['TBE_TEMPLATE']->getDynTabMenu($parts, $idString, 0, false, 50, 1, false, 1, $GLOBALS[$table]['ctrl']['dividers2tabs']); + return $GLOBALS['TBE_TEMPLATE']->getDynTabMenu($parts, $idString, 0, false, 50, 1, false, 1, $dividersToTabsBehaviour); } else { $output = ''; foreach($parts as $singlePad) {