Changeset 8189
- Timestamp:
- 07/16/10 00:59:44 (23 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/core/lib/Foswiki/Store/SearchAlgorithms/Forking.pm
r7967 r8189 63 63 if ( $Foswiki::cfg{DetailedOS} eq 'MSWin32' ) { 64 64 65 #try to escape the ^ a d "" for native windows grep and apache65 #try to escape the ^ and "" for native windows grep and apache 66 66 $searchString =~ s/\[\^/[^^/g; 67 $searchString =~ s/"/""/g; 67 68 # Fix escaping and quoting for Windows 69 $searchString =~ s#\\#\\\\#g; 70 $searchString =~ s#"#\\"#g; 71 $searchString = q(") . $searchString . q("); 68 72 } 69 73 … … 79 83 ##heck, on pre WinXP its only 2048, post XP its 8191 - http://support.microsoft.com/kb/830473 80 84 if ( $Foswiki::cfg{DetailedOS} eq 'MSWin32' ) { 85 81 86 #tune the number based on the length of "$sDir/WebSearchAdvanced.txt" 82 87 #30 is a guess - wotamess 83 $maxTopicsInSet = ((8191-(length($program)+length($searchString)+30)) / (length("$sDir/LongWebSearchAdvanced.txt")+10)); 88 $maxTopicsInSet = 89 ( ( 8191 - ( length($program) + length($searchString) + 30 ) ) / 90 ( length("$sDir/LongWebSearchAdvanced.txt") + 10 ) ); 91 84 92 #print STDERR "++++++++++++ $maxTopicsInSet \n"; 85 93 } … … 161 169 162 170 my $webObject = Foswiki::Meta->new( $session, $web ); 163 my $thisWebNoSearchAll = Foswiki::isTrue( $webObject->getPreference('NOSEARCHALL') ); 171 my $thisWebNoSearchAll = 172 Foswiki::isTrue( $webObject->getPreference('NOSEARCHALL') ); 164 173 165 174 # make sure we can report this web on an 'all' search … … 231 240 while ( $topicSet->hasNext() ) { 232 241 my $webtopic = $topicSet->next(); 233 my ( $itrWeb, $topic ) = Foswiki::Func::normalizeWebTopicName( $web, $webtopic ); 242 my ( $itrWeb, $topic ) = 243 Foswiki::Func::normalizeWebTopicName( $web, $webtopic ); 234 244 235 245 if ( $options->{'casesensitive'} ) { … … 251 261 my $textMatches = 252 262 search( $tokenCopy, $web, $topicSet, $session, $options ); 263 253 264 #bring the text matches into the topicMatch hash 254 265 if ($textMatches) { … … 277 288 @scopeTextList = keys(%topicMatches); 278 289 } 290 279 291 # reduced topic list for next token 280 292 $topicSet =
Note: See TracChangeset
for help on using the changeset viewer.
