Changeset 7939


Ignore:
Timestamp:
06/27/10 17:12:45 (2 years ago)
Author:
MichaelTempest
Message:

Item1888: Give a consistent treatment to NOSEARCHALL and interpret its values li
ke other settings (e.g. NOAUTOLINK)

Location:
trunk/core/lib/Foswiki
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/core/lib/Foswiki/Macros/TOPICLIST.pm

    r7761 r7939  
    1919 
    2020    my $webObject = Foswiki::Meta->new( $this, $web ); 
     21    my $thisWebNoSearchAll = Foswiki::isTrue( $webObject->getPreference('NOSEARCHALL') ); 
    2122    return '' 
    2223      if !defined($params->{web}) && $web ne $this->{webName} 
    23           && $webObject->getPreference('NOSEARCHALL'); 
     24          && $thisWebNoSearchAll; 
    2425 
    2526    my @items; 
  • trunk/core/lib/Foswiki/Store/QueryAlgorithms/BruteForce.pm

    r7908 r7939  
    5959 
    6060        my $webObject = Foswiki::Meta->new( $session, $web ); 
    61         my $thisWebNoSearchAll = $webObject->getPreference('NOSEARCHALL') || ''; 
     61        my $thisWebNoSearchAll = Foswiki::isTrue( $webObject->getPreference('NOSEARCHALL') ); 
    6262 
    6363        # make sure we can report this web on an 'all' search 
     
    6666          if ( $searchAllFlag 
    6767            && !$isAdmin 
    68             && ( $thisWebNoSearchAll =~ /on/i || $web =~ /^[\.\_]/ ) 
     68            && ( $thisWebNoSearchAll || $web =~ /^[\.\_]/ ) 
    6969            && $web ne $session->{webName} ); 
    7070 
  • trunk/core/lib/Foswiki/Store/SearchAlgorithms/Forking.pm

    r7713 r7939  
    1515Forking implementation of the RCS cache search. 
    1616 
    17 ---++ search($searchString, $inputTopicSet, $session, $options) -> \%seen 
     17---++ search($searchString, $web, $inputTopicSet, $session, $options) -> \%seen 
    1818Search .txt files in $dir for $searchString. See RcsFile::searchInWebContent 
    1919for details. 
     
    161161 
    162162        my $webObject = Foswiki::Meta->new( $session, $web ); 
    163         my $thisWebNoSearchAll = $webObject->getPreference('NOSEARCHALL') || ''; 
     163        my $thisWebNoSearchAll = Foswiki::isTrue( $webObject->getPreference('NOSEARCHALL') ); 
    164164 
    165165        # make sure we can report this web on an 'all' search 
     
    168168          if ( $searchAllFlag 
    169169            && !$isAdmin 
    170             && ( $thisWebNoSearchAll =~ /on/i || $web =~ /^[\.\_]/ ) 
     170            && ( $thisWebNoSearchAll || $web =~ /^[\.\_]/ ) 
    171171            && $web ne $session->{webName} ); 
    172172 
  • trunk/core/lib/Foswiki/Store/SearchAlgorithms/PurePerl.pm

    r7732 r7939  
    111111 
    112112        my $webObject = Foswiki::Meta->new( $session, $web ); 
    113         my $thisWebNoSearchAll = $webObject->getPreference('NOSEARCHALL') || ''; 
     113        my $thisWebNoSearchAll = Foswiki::isTrue( $webObject->getPreference('NOSEARCHALL') ); 
    114114 
    115115        # make sure we can report this web on an 'all' search 
     
    118118          if ( $searchAllFlag 
    119119            && !$isAdmin 
    120             && ( $thisWebNoSearchAll =~ /on/i || $web =~ /^[\.\_]/ ) 
     120            && ( $thisWebNoSearchAll || $web =~ /^[\.\_]/ ) 
    121121            && $web ne $session->{webName} ); 
    122122 
  • trunk/core/lib/Foswiki/UI/Search.pm

    r7453 r7939  
    2727| ="text"= | Search term. Is a keyword search, literal search or regular expression search, depending on the =type= parameter. SearchHelp has more | required | 
    2828| =search="text"= | (Alternative to above) | N/A | 
    29 | =web="Name"= <br /> =web="%USERSWEB%, Know"= <br /> =web="all"= | Comma-separated list of webs to search. The special word =all= means all webs that doe *not* have the =NOSEARCHALL= variable set to =on= in their %WEBPREFSTOPIC%. You can specifically *exclude* webs from an =all= search using a minus sign - for example, =web="all,-Secretweb"=. | Current web | 
     29| =web="Name"= <br /> =web="%USERSWEB%, Know"= <br /> =web="all"= | Comma-separated list of webs to search. The special word =all= means all webs that do *not* have the =NOSEARCHALL= variable set to =on= in their %WEBPREFSTOPIC%. You can specifically *exclude* webs from an =all= search using a minus sign - for example, =web="all,-Secretweb"=. | Current web | 
    3030| =topic="%WEBPREFSTOPIC%"= <br /> =topic="*Bug"= | Limit search to topics: A topic, a topic with asterisk wildcards, or a list of topics separated by comma. | All topics in a web | 
    3131| =excludetopic="Web*"= <br /> =excludetopic="%HOMETOPIC%, <nop>WebChanges"= | Exclude topics from search: A topic, a topic with asterisk wildcards, or a list of topics separated by comma. | None | 
  • trunk/core/lib/Foswiki/WebFilter.pm

    r7452 r7939  
    3737 
    3838    my $webObject = Foswiki::Meta->new( $session, $web ); 
     39    my $thisWebNoSearchAll = Foswiki::isTrue( $webObject->getPreference('NOSEARCHALL') ); 
    3940 
    4041    return 0 
    4142      if $this->{public} 
    4243          && !$session->{users}->isAdmin( $session->{user} ) 
    43           && $webObject->getPreference('NOSEARCHALL'); 
     44          && $thisWebNoSearchAll; 
    4445 
    4546    return 0 if $this->{allowed} && !$webObject->haveAccess('VIEW'); 
Note: See TracChangeset for help on using the changeset viewer.