(file) Return to search.cgi CVS log (file) (dir) Up to [RizwankCVS] / geekymedia_web / twiki / bin

 1 rizwank 1.1 #!/usr/bin/perl -wT
 2             #
 3             # TWiki Collaboration Platform, http://TWiki.org/
 4             #
 5             # Copyright (C) 1999-2004 Peter Thoeny, peter@thoeny.com
 6             #
 7             # For licensing info read license.txt file in the TWiki root.
 8             # This program is free software; you can redistribute it and/or
 9             # modify it under the terms of the GNU General Public License
10             # as published by the Free Software Foundation; either version 2
11             # of the License, or (at your option) any later version.
12             #
13             # This program is distributed in the hope that it will be useful,
14             # but WITHOUT ANY WARRANTY; without even the implied warranty of
15             # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16             # GNU General Public License for more details, published at 
17             # http://www.gnu.org/copyleft/gpl.html
18             #
19             # 20000501 Kevin Kinnell : Changed to support new search functionality.
20             #                          Move a block of code to wikisearch.pm, removed
21             #                          hardcoded flags (except the inline flag) from
22 rizwank 1.1 #                          the searchWikiWeb call, added new params.
23             
24             BEGIN {
25                 # Set default current working directory
26                 if( $ENV{"SCRIPT_FILENAME"} && $ENV{"SCRIPT_FILENAME"} =~ /^(.+)\/[^\/]+$/ ) {
27                     chdir $1;
28                 }
29                 # Set library paths in @INC at compile time
30                 unshift @INC, '.';
31                 require 'setlib.cfg';
32             }
33             
34             use CGI::Carp qw(fatalsToBrowser);
35             use CGI;
36             use TWiki;
37             use TWiki::UI::Search;
38             
39             my $query = new CGI;
40             my $thePathInfo = $query->path_info(); 
41             my $theRemoteUser = $query->remote_user();
42             my $theTopic = $query->param( 'topic' );
43 rizwank 1.1 my $theUrl = $query->url;
44             
45             my( $topic, $webName ) = 
46               &TWiki::initialize( $thePathInfo, $theRemoteUser,
47                                   $theTopic, $theUrl, $query );
48             
49             TWiki::UI::Search::search( $webName, $topic, $query );
50             

Rizwan Kassim
Powered by
ViewCVS 0.9.2