/[swish]/trunk/html/swish.cgi
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/html/swish.cgi

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

revision 82 by dpavlin, Sun Aug 29 18:17:15 2004 UTC revision 83 by dpavlin, Sun Aug 29 18:26:58 2004 UTC
# Line 16  sub get_snippet { Line 16  sub get_snippet {
16    
17          my $desc = shift || return '';          my $desc = shift || return '';
18          $desc = substr($desc,0,$max_desc) if (length($desc) > $max_desc);          $desc = substr($desc,0,$max_desc) if (length($desc) > $max_desc);
19            $desc = e($desc);
20          # test if $desc contains any of our query words          # test if $desc contains any of our query words
21          my @snips;          my @snips;
22    
# Line 195  if (param('search')) { Line 196  if (param('search')) {
196          # default format for output          # default format for output
197          my $hit_fmt = "<a href=\"%s\">%s</a> [%s]<br>\n";          my $hit_fmt = "<a href=\"%s\">%s</a> [%s]<br>\n";
198    
         # output start of table  
         print qq{  
 <table border="0">  
         };  
         # html before and after each hit  
         my $tr_pre = qq{  
 <tr><td>  
         };  
         my $tr_post = qq{  
 </td></tr>  
         };  
   
199          if (@properties) {          if (@properties) {
200                  $hit_fmt = x($config->{hit}) if (! param('no_properties'));                  $hit_fmt = x($config->{hit}) if (! param('no_properties'));
201                  $params{properties} = \@properties;                  $params{properties} = \@properties;
# Line 243  if (param('search')) { Line 232  if (param('search')) {
232          }          }
233    
234          my %path2title;          my %path2title;
         use Data::Dumper;  
235          foreach my $p (@{$config->{path2title}->{path}}) {          foreach my $p (@{$config->{path2title}->{path}}) {
236                  $path2title{$p->{dir}} = $p->{content};                  $path2title{$p->{dir}} = $p->{content};
237          }          }
238    
239            # output start of table
240            print qq{
241    <table border="0">
242            };
243            # html before and after each hit
244            my $tr_pre = qq{
245    <tr><td>
246            };
247            my $tr_post = qq{
248    </td></tr>
249            };
250    
251          for(my $i=$pager->first; $i<=$pager->last; $i++) {          for(my $i=$pager->first; $i<=$pager->last; $i++) {
252    
253                  my $result = $results->NextResult;                  my $result = $results->NextResult;

Legend:
Removed from v.82  
changed lines
  Added in v.83

  ViewVC Help
Powered by ViewVC 1.1.26