Changeset 5077
- Timestamp:
- 09/21/09 15:47:50 (3 years ago)
- Location:
- trunk/SearchEngineKinoSearchAddOn/lib/Foswiki/Contrib/SearchEngineKinoSearchAddOn
- Files:
-
- 2 edited
-
Config.spec (modified) (1 diff)
-
Search.pm (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/SearchEngineKinoSearchAddOn/lib/Foswiki/Contrib/SearchEngineKinoSearchAddOn/Config.spec
r4962 r5077 34 34 35 35 # **BOOLEAN** 36 # Search attachments only36 # Provide a link in the templates to search attachments only 37 37 $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'; 38 42 39 43 # **SELECT antiword,wv,abiword** -
trunk/SearchEngineKinoSearchAddOn/lib/Foswiki/Contrib/SearchEngineKinoSearchAddOn/Search.pm
r4835 r5077 36 36 my $searcher = Foswiki::Contrib::SearchEngineKinoSearchAddOn::Search->newSearch(); 37 37 38 my $text = $searcher->search( $Foswiki::cfg{SearchEngineKinoSearchAddOn}{Debug}, $session);38 my $text = $searcher->search(undef, $session); 39 39 40 40 $session->writeCompletePage($text, 'view'); … … 45 45 my ($self, $debug, $session) = (@_); 46 46 47 $self->{Debug} = $debug ;47 $self->{Debug} = $debug || $Foswiki::cfg{SearchEngineKinoSearchAddOn}{Debug} || 0; 48 48 $session ||= $Foswiki::Plugins::SESSION; 49 49 … … 66 66 my $showlock = $query->param( "showlock" ) || ""; 67 67 my $rss = $query->param( "rss" ) || ""; 68 69 $debug && Foswiki::Func::writeDebug( "searching:'$search' from:'$webName.$topicName' in web:'$websStr' by:'$remoteUser'" ); 68 70 69 71 # usersearch will be printed out … … 127 129 $tempVal =~ s/\+/\%2B/go; # just for the above URL 128 130 $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"; 130 132 $tmplSearch =~ s/%SEARCHATTACHMENTSONLY%/<a href="%SCRIPTURLPATH%\/kinosearch\/$webName\/?search=$tempVal\%20\%2Battachment:yes">$attachmentsOnlyLabel<\/a>/go; 131 133 $tmplSearch = Foswiki::Func::expandCommonVariables ( $tmplSearch, $topicName, $webName );
Note: See TracChangeset
for help on using the changeset viewer.
