Changeset 5077


Ignore:
Timestamp:
09/21/09 15:47:50 (3 years ago)
Author:
AndrewJones
Message:

Item1363: Missed a preference setting when I moved them to configure

Location:
trunk/SearchEngineKinoSearchAddOn/lib/Foswiki/Contrib/SearchEngineKinoSearchAddOn
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/SearchEngineKinoSearchAddOn/lib/Foswiki/Contrib/SearchEngineKinoSearchAddOn/Config.spec

    r4962 r5077  
    3434 
    3535# **BOOLEAN** 
    36 # Search attachments only 
     36# Provide a link in the templates to search attachments only 
    3737$Foswiki::cfg{SearchEngineKinoSearchAddOn}{SearchAttachmentsOnly} = '0'; 
     38 
     39# **STRING** 
     40# Attachments only label. Provides a link to search for attachments only if $Foswiki::cfg{SearchEngineKinoSearchAddOn}{SearchAttachmentsOnly} is true. 
     41$Foswiki::cfg{SearchEngineKinoSearchAddOn}{AttachmentsOnlyLabel} = 'Show only attachments'; 
    3842 
    3943# **SELECT antiword,wv,abiword** 
  • trunk/SearchEngineKinoSearchAddOn/lib/Foswiki/Contrib/SearchEngineKinoSearchAddOn/Search.pm

    r4835 r5077  
    3636    my $searcher = Foswiki::Contrib::SearchEngineKinoSearchAddOn::Search->newSearch(); 
    3737     
    38     my $text = $searcher->search($Foswiki::cfg{SearchEngineKinoSearchAddOn}{Debug}, $session); 
     38    my $text = $searcher->search(undef, $session); 
    3939   
    4040    $session->writeCompletePage($text, 'view'); 
     
    4545    my ($self, $debug, $session) = (@_); 
    4646     
    47     $self->{Debug}   = $debug; 
     47    $self->{Debug}   = $debug || $Foswiki::cfg{SearchEngineKinoSearchAddOn}{Debug} || 0; 
    4848    $session ||= $Foswiki::Plugins::SESSION; 
    4949     
     
    6666    my $showlock      = $query->param( "showlock" )  || ""; 
    6767    my $rss           = $query->param( "rss" )       || ""; 
     68     
     69    $debug && Foswiki::Func::writeDebug( "searching:'$search' from:'$webName.$topicName' in web:'$websStr' by:'$remoteUser'" ); 
    6870 
    6971    # usersearch will be printed out 
     
    127129        $tempVal =~ s/\+/\%2B/go; # just for the above URL 
    128130        $tempVal =~ s/\"/\%22/go; # just for the above URL 
    129         my $attachmentsOnlyLabel = Foswiki::Func::getPreferencesValue( "KINOSEARCHATTACHMENTSONLYLABEL" ) || "Show only attachments"; 
     131        my $attachmentsOnlyLabel = $Foswiki::cfg{SearchEngineKinoSearchAddOn}{AttachmentsOnlyLabel} || "Show only attachments"; 
    130132        $tmplSearch =~ s/%SEARCHATTACHMENTSONLY%/<a href="%SCRIPTURLPATH%\/kinosearch\/$webName\/?search=$tempVal\%20\%2Battachment:yes">$attachmentsOnlyLabel<\/a>/go; 
    131133        $tmplSearch = Foswiki::Func::expandCommonVariables ( $tmplSearch, $topicName, $webName ); 
Note: See TracChangeset for help on using the changeset viewer.