From: <de...@de...> - 2008-08-26 21:43:24
|
Author: ColasNahaboo Date: 2008-08-26 16:43:35 -0500 (Tue, 26 Aug 2008) New Revision: 17459 Trac url: http://develop.twiki.org/trac/changeset/17459 Modified: twiki/branches/TWikiRelease04x02/lib/TWiki/Form/FieldDefinition.pm twiki/branches/TWikiRelease04x02/lib/TWiki/Search.pm Log: Item5922: $formfield() not displayed in formatted searches for hidden fields this fix: * when formatted search calls $meta->renderFormFieldForDisplay adds a new attribute showhidden to the $attrs parameter * the check for the H attribute in renderForDisplay is skipped if showhidden is there This was the formfield-hiddens-v1.patch on the wiki page http://develop.twiki.org/~twiki4/cgi-bin/view/Bugs/Item5922 Modified: twiki/branches/TWikiRelease04x02/lib/TWiki/Form/FieldDefinition.pm =================================================================== --- twiki/branches/TWikiRelease04x02/lib/TWiki/Form/FieldDefinition.pm 2008-08-26 21:41:45 UTC (rev 17458) +++ twiki/branches/TWikiRelease04x02/lib/TWiki/Form/FieldDefinition.pm 2008-08-26 21:43:35 UTC (rev 17459) @@ -313,10 +313,12 @@ my( $this, $format, $value, $attrs ) = @_; ASSERT(!$attrs || ref($attrs) eq 'HASH') if DEBUG; - my $fa = $this->{attributes} || ''; - if ( $fa =~ /H/ ) { - return ''; - } + if ( !$attrs->{showhidden} ) { + my $fa = $this->{attributes} || ''; + if ( $fa =~ /H/ ) { + return ''; + } + } require TWiki::Render; $value = TWiki::Render::protectFormFieldValue( $value, $attrs ); Modified: twiki/branches/TWikiRelease04x02/lib/TWiki/Search.pm =================================================================== --- twiki/branches/TWikiRelease04x02/lib/TWiki/Search.pm 2008-08-26 21:41:45 UTC (rev 17458) +++ twiki/branches/TWikiRelease04x02/lib/TWiki/Search.pm 2008-08-26 21:43:35 UTC (rev 17459) @@ -1195,7 +1195,8 @@ } return $meta->renderFormFieldForDisplay( - $name, '$value', { break => $breakArgs, protectdollar => 1 } ); + $name, '$value', + { break => $breakArgs, protectdollar => 1, showhidden => 1} ); } # Returns the topic revision info of the base version, |