*** lib/TWiki.pm Sun Oct 5 19:17:23 2003 --- lib/TWiki.pm Tue Oct 28 16:05:36 2003 *************** *** 1485,1495 **** my $attrHeader = extractNameValuePair( $attributes, "header" ); my $attrFormat = extractNameValuePair( $attributes, "format" ); return &TWiki::Search::searchWeb( "1", $attrWeb, $searchVal, $attrScope, $attrOrder, $attrRegex, $attrLimit, $attrReverse, $attrCasesensitive, $attrNosummary, $attrNosearch, $attrNoheader, $attrNototal, $attrBookview, $attrRenameview, ! $attrShowlock, $attrNoEmpty, $attrTemplate, $attrHeader, $attrFormat ); } --- 1485,1504 ---- my $attrHeader = extractNameValuePair( $attributes, "header" ); my $attrFormat = extractNameValuePair( $attributes, "format" ); + ## Begin Patch. See TWiki:Codev.ExcludeWebTopicsFromSearch Added by RaymondLutz 2003/10/23 + ## The following parameter added to allow topics to be excluded from the search using regex on topic name. + ## Also requires patch of Search.pm, and searchWeb calling actual parameters, below. + my $attrExcludeTopic = extractNameValuePair( $attributes, "excludetopic" ); + ## End Patch + return &TWiki::Search::searchWeb( "1", $attrWeb, $searchVal, $attrScope, $attrOrder, $attrRegex, $attrLimit, $attrReverse, $attrCasesensitive, $attrNosummary, $attrNosearch, $attrNoheader, $attrNototal, $attrBookview, $attrRenameview, ! $attrShowlock, $attrNoEmpty, $attrTemplate, $attrHeader, $attrFormat, ! ## Begin Patch. See TWiki:Codev.ExcludeWebTopicsFromSearch Added by RaymondLutz 2003/10/23 ! $attrExcludeTopic, ! ## End Patch ); } *** lib/TWiki/Search.pm Sun Oct 5 19:17:16 2003 --- lib/TWiki/Search.pm Tue Oct 28 16:05:28 2003 *************** *** 61,66 **** --- 61,73 ---- $theRegex, $theLimit, $revSort, $caseSensitive, $noSummary, $noSearch, $noHeader, $noTotal, $doBookView, $doRenameView, $doShowLock, $noEmpty, $theTemplate, $theHeader, $theFormat, + + ## Begin Patch. See TWiki:Codev.ExcludeWebTopicsFromSearch Added by RaymondLutz 2003/10/23 + ## The following parameter added to allow topics to be excluded from the search using regex on topic name. + ## Also requires patch of TWiki.pm, and searchWeb() code, below. + $theExcludeTopic, + ## End Patch + @junk ) = @_; ##TWiki::writeDebug "Search locale is $TWiki::siteLocale"; *************** *** 307,312 **** --- 314,327 ---- next if ( $noEmpty && ! @topicList ); # Nothing to show for this topic + ## Begin Patch. See TWiki:Codev.ExcludeWebTopicsFromSearch Added by RaymondLutz 2003/10/23 + ## The following code added to allow topics to be excluded from the search using regex on topic name. + ## Also requires patch of TWiki.pm, and searchWeb formal parameters, above. + if ($theExcludeTopic) { + @topicList = grep (!/$theExcludeTopic/, @topicList); + } + ## End Patch + # use hash tables for date, author, rev number and view permission my %topicRevDate = (); my %topicRevUser = ();