From: <Art...@nt...> - 2005-05-04 23:37:37
|
Author: ArthurClemens Date: 2005-05-04 16:35:57 -0700 (Wed, 04 May 2005) New Revision: 4269 Modified: twiki/branches/DEVELOP/lib/TWiki/Search.pm Log: WhyDoesWebSearchContainASearchQuery: implemented new parameter =nozeroresults=. Modified: twiki/branches/DEVELOP/lib/TWiki/Search.pm =================================================================== --- twiki/branches/DEVELOP/lib/TWiki/Search.pm 2005-05-04 23:17:44 UTC (rev 4268) +++ twiki/branches/DEVELOP/lib/TWiki/Search.pm 2005-05-04 23:35:57 UTC (rev 4269) @@ -365,6 +365,7 @@ my $noHeader = $params{noheader} || ''; my $noSearch = $params{nosearch} || ''; my $noSummary = $params{nosummary} || ''; + my $noZeroResults = $params{nozeroresults} || ''; my $noTotal = $params{nototal} || ''; my $newLine = $params{newline} || ''; my $theOrder = $params{order} || ''; @@ -474,7 +475,7 @@ my $output = ''; my $tmpl = ''; - my $topicCount = 0; + #my $topicCount = 0; # SMELL: not used?? my $originalSearch = $theSearchVal; my $spacedTopic; @@ -918,6 +919,8 @@ } } } + + return '' if ( $ntopics == 0 && $noZeroResults ); } if( $theFormat ) { |