/[webpac]/trunk/WebPac.pm
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/WebPac.pm

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

revision 14 by dpavlin, Sat Feb 22 13:22:09 2003 UTC revision 35 by dpavlin, Sun Feb 23 15:47:40 2003 UTC
# Line 22  my $INDEX = '/data/webpac/index/isis.ind Line 22  my $INDEX = '/data/webpac/index/isis.ind
22  my $MAX_HITS = 500;  my $MAX_HITS = 500;
23  my $ON_PAGE = 10;  my $ON_PAGE = 10;
24    
25  Text::Iconv->raise_error(1);     # Conversion errors raise exceptions  Text::Iconv->raise_error(0);     # Conversion errors raise exceptions
26    
27  my $from_utf8 = Text::Iconv->new('UTF8', $CHARSET);  my $from_utf8 = Text::Iconv->new('UTF8', $CHARSET);
28    
# Line 91  sub show_results_list { Line 91  sub show_results_list {
91                                  $s.="$_* ";                                  $s.="$_* ";
92                          }                          }
93                  }                  }
94                    $s =~ s/\*+/*/g;
95    
96                  push @s_arr,$q->param("f$i")."_swish=($s)";                  push @s_arr,$q->param("f$i")."_swish=($s)";
97          }          }
# Line 108  sub show_results_list { Line 109  sub show_results_list {
109                          push @swish_results, {                          push @swish_results, {
110                                  nr => ($#swish_results + 2),                                  nr => ($#swish_results + 2),
111                                  path => $hit->swishdocpath,                                  path => $hit->swishdocpath,
112                                  headline => $from_utf8->convert($hit->headline),  #                               headline => $from_utf8->convert($hit->headline),
113                                  html => back2html($from_utf8->convert($hit->html)),  #                               html => back2html($from_utf8->convert($hit->html)),
114                                    headline => $hit->headline,
115                                    html => back2html($hit->html),
116                                  rank => $hit->swishrank };                                  rank => $hit->swishrank };
117    
118                  },                  },
# Line 191  sub show_index { Line 194  sub show_index {
194          $tmpl->param('limit',$limit);          $tmpl->param('limit',$limit);
195          $tmpl->param('total',$total);          $tmpl->param('total',$total);
196    
197    # FIX: I should set offset and leave out limit from fetch!!
198    #       if (! $q->param("PAGER_offset") {
199    #               $q->param("Pager_offet)
200    #       }
201    
202          my $pager = HTML::Pager->new(          my $pager = HTML::Pager->new(
203                  query => $q,                  query => $q,
204                  get_data_callback => sub {                  get_data_callback => sub {

Legend:
Removed from v.14  
changed lines
  Added in v.35

  ViewVC Help
Powered by ViewVC 1.1.26