/[mws]/trunk/httpd.pl
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/httpd.pl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 52 by dpavlin, Tue May 25 18:55:46 2004 UTC revision 53 by dpavlin, Fri Jun 18 14:56:40 2004 UTC
# Line 1  Line 1 
1  #!/usr/bin/perl  #!/usr/bin/perl
2    
3    my $basedir = '';
4  BEGIN {  BEGIN {
5          my $basedir = readlink($0) || $0; $basedir =~ s#/[^/]+$#/lib#;          $basedir = $0;
6          unshift(@INC, $basedir);          my $loop = 0;   # to prevent symlink loops
7            while (-l $basedir && $loop++ < 20) {
8                    $basedir = readlink($basedir);
9            }
10            $basedir =~ s#/+[^/]+$#/lib#;
11    }
12    if ($basedir) {
13            use lib "$basedir";
14  }  }
15    
16  =head1 NAME  =head1 NAME
# Line 155  sub request($$) { Line 163  sub request($$) {
163                  $tpl_var->{total_hits} = $mws->{total_hits} || 0;                  $tpl_var->{total_hits} = $mws->{total_hits} || 0;
164    
165                  # no hits, offer suggestions                  # no hits, offer suggestions
166                  if (! $tpl_var->{results}) {                  if (! $tpl_var->{results} && $param->{'search_fld'} && $param->{'search_val'}) {
167                          @{$tpl_var->{apropos}} = $mws->apropos_index($param->{'search_fld'}, $param->{'search_val'});                          @{$tpl_var->{apropos}} = $mws->apropos_index($param->{'search_fld'}, $param->{'search_val'});
168                  }                  }
169    

Legend:
Removed from v.52  
changed lines
  Added in v.53

  ViewVC Help
Powered by ViewVC 1.1.26