--- lib/TWiki/Form.pm.dist 2007-10-02 02:43:51.000000000 +0200 +++ lib/TWiki/Form.pm 2007-10-08 11:16:31.000000000 +0200 @@ -116,6 +116,7 @@ } undef $this->{fields}; undef $this->{session}; + undef $this->{base}; } =pod @@ -148,6 +149,25 @@ $text =~ s/\r//g; $text =~ s/\\\n//g; # remove trailing '\' and join continuation lines + my $baseform; + + $this->{base}=[]; + while($text=~/BASE=(.*)/gc) { + my $currentbase=$1; + my ($baseWeb,$baseForm)=split(/\./,$currentbase); + + $baseForm=new TWiki::Form($this->{session},$baseWeb,$baseForm); + + if($baseForm) { + @fields=(@fields,@{$baseForm->getFields()}); + push(@{$this->{base}},$currentbase); + # SMELL: there must be a better way to concatenate two arrays by ref + foreach(@{$baseForm->{base}}) { + push(@{$this->{base}},$_); + } + } + } + # | *Name:* | *Type:* | *Size:* | *Value:* | *Tooltip message:* | *Attributes:* | # Tooltip and attributes are optional foreach my $line ( split( /\n/, $text ) ) {