From 490d8a0b0ad3dbc5b696f507f9523265214531c7 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Sun, 16 Sep 2007 16:05:59 +0000 Subject: [PATCH] bfojcapell: Added function insertBeforeRecursive (see www.silverstripe.com/google-summer-of-code-forum/show/3005). This function is only called in Translatable.php at this moment, so if finally insertBefore gets a recursive behaviour then the call can be changed and insertBeforeRecursive deleted. (merged from branches/gsoc) git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@42111 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- forms/TabSet.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/forms/TabSet.php b/forms/TabSet.php index e06a2e7db..bca5faac8 100644 --- a/forms/TabSet.php +++ b/forms/TabSet.php @@ -77,6 +77,12 @@ class TabSet extends CompositeField { $field->setTabSet($this); } + public function insertBeforeRecursive($field, $insertBefore, $level) { + $level = parent::insertBeforeRecursive($field, $insertBefore, $level+1); + if ($level === 0) $field->setTabSet($this); + return $level; + } + public function removeByName( $tabName ) { parent::removeByName( $tabName ); }