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

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

trunk/WebPac.pm revision 202 by dpavlin, Sun Jan 18 16:23:03 2004 UTC branches/humanistika/WebPac.pm revision 731 by dpavlin, Thu Apr 13 19:47:32 2006 UTC
# Line 3  package WebPac; Line 3  package WebPac;
3  use base 'CGI::Application';  use base 'CGI::Application';
4  use strict;  use strict;
5    
 use HTML::Pager;  
6  use HTML::FillInForm;  use HTML::FillInForm;
7  use SWISH;  use SWISH::API;
8  use Text::Iconv;  use Text::Iconv;
9  use DBI;  use DBI;
10  use Config::IniFiles;  use Config::IniFiles;
11  use Text::Unaccent;  use Text::Unaccent;
12    use Data::Pageset;
13    use POSIX qw(locale_h);
14    
15  use lib '..';  use lib '..';
16  use index_DBI_cache;  use index_DBI_filter;
17  use back2html;  use back2html;
18    
19    
# Line 28  my $MAX_HITS = $cfg_global->val('webpac' Line 29  my $MAX_HITS = $cfg_global->val('webpac'
29  my $ON_PAGE =$cfg_global->val('webpac', 'on_page') || 10;  my $ON_PAGE =$cfg_global->val('webpac', 'on_page') || 10;
30  my $MIN_WILDCARD =$cfg_global->val('webpac', 'min_wildcard') || 1;  my $MIN_WILDCARD =$cfg_global->val('webpac', 'min_wildcard') || 1;
31  my $TEMPLATE =$cfg_global->val('webpac', 'template');  my $TEMPLATE =$cfg_global->val('webpac', 'template');
32  my $UNAC_FILTER =$cfg_global->val('global', 'unac_filter');  my $UNAC_FILTER =$cfg_global->val('global', 'my_unac_filter');
33  my $BASE_PATH =$cfg_global->val('webpac', 'base_path');  my $BASE_PATH =$cfg_global->val('webpac', 'base_path');
34    # for pager
35  if ($UNAC_FILTER) {  my $pages_per_set = $cfg_global->val('webpac', 'pages_per_set') || 10;
36          require $UNAC_FILTER;  my $locale = $cfg_global->val('locale') || 'hr_HR';
 }  
37    
38  Text::Iconv->raise_error(0);     # Conversion errors raise exceptions  Text::Iconv->raise_error(0);     # Conversion errors raise exceptions
39    
40  my $from_utf8 = Text::Iconv->new('UTF8', $CHARSET);  my $from_utf8 = Text::Iconv->new('UTF8', $CHARSET);
41    
42    setlocale(LC_CTYPE, $locale);
43    setlocale(LC_COLLATE, $locale);
44    
45    if ($UNAC_FILTER) {
46            require $UNAC_FILTER;
47    } else {
48            sub WebPac::my_unac_string {
49                    my ($charset, $string) = (@_);
50                    return $string;
51            }
52    }
53    
54  # use path from cgi script to support templates in subdirs  # use path from cgi script to support templates in subdirs
55  sub url_ex {  sub url_ex {
56          my $q = shift || die "suff2file needs CGI object!";          my $q = shift || die "suff2file needs CGI object!";
57          my $tpl = shift || die "url_ex needs template name!";          my $tpl = shift || die "url_ex needs template name!";
58          return suff2file($BASE_PATH, $q->url(-path => 1),$TEMPLATE_PATH,$tpl);          return suff2file($BASE_PATH, $q->url(-absolute => 1,-path => 1),$TEMPLATE_PATH,$tpl);
59  }  }
60    
61  sub suff2file($$$$) {  sub suff2file($$$$) {
# Line 53  sub suff2file($$$$) { Line 65  sub suff2file($$$$) {
65    
66          # strip everything to and including base path, leaving only          # strip everything to and including base path, leaving only
67          # additional (virtual) path          # additional (virtual) path
68          if ($p =~ s,^.*?$base_path,,) {          if ($base_path eq "/") {
69                    $p =~ s,/*,,g;
70                    my ($name,$ext) = split(/\./,$tpl);
71                    $p = $name . "-" . $p . "." . $ext;
72            } elsif ($p =~ s,^.*?$base_path,,) {
73                  $p =~ s,/*,,g;                  $p =~ s,/*,,g;
74                  my ($name,$ext) = split(/\./,$tpl);                  my ($name,$ext) = split(/\./,$tpl);
75                  $p = $name . $p . "." . $ext;                  $p = $name . $p . "." . $ext;
# Line 97  sub in_template { Line 113  sub in_template {
113                  die "can't parse TEMPLATE path";                  die "can't parse TEMPLATE path";
114          }          }
115    
116          my $master_tpl = suff2file($BASE_PATH, $q->url(-path => 1),$dir,$tpl);          my $master_tpl = suff2file($BASE_PATH, $q->url(-absolute => 1, -path => 1),$dir,$tpl);
117          if (open(T, $master_tpl)) {          if (open(T, $master_tpl)) {
118                  my $template_html = join("\n",<T>);                  my $template_html = join("\n",<T>);
119                  close(T);                  close(T);
# Line 108  sub in_template { Line 124  sub in_template {
124          }          }
125  }  }
126    
127    #--------------------------------------------------------------------------
128    
129    #
130    # make pager navigation and fill template variables
131    # compatibile with HTML::Pager
132    #
133    
134    sub make_pager($$$) {
135            my ($q,$tmpl,$pager) = @_;
136    
137            #
138            # pager navigation
139            #
140            my ($pager_prev,$pager_next, $pager_jump) = ('','','');
141    
142            my $nav_fmt=qq{ <a href="%s">%s</a> };
143    
144            if ($pager->current_page() > $pager->first_page) {
145                    $q->param('PAGER_offset', $pager->current_page - 1);
146                    $pager_prev .= sprintf($nav_fmt,$q->url(-relative=>1, -query=>1),'&lt;&lt;');
147            }
148    
149            if ($pager->previous_set) {
150                    $q->param('PAGER_offset', $pager->previous_set);
151                    $pager_prev .= sprintf($nav_fmt,$q->url(-relative=>1, -query=>1),'..');
152            }
153    
154    
155            foreach my $p (@{$pager->pages_in_set()}) {
156                    next if ($p <= 0);
157                    if($p == $pager->current_page()) {
158                            $pager_jump .= "<b>$p</b> ";
159                    } else {
160                            $q->param('PAGER_offset', $p);
161                            $pager_jump .= sprintf($nav_fmt,$q->url(-relative=>1, -query=>1),$p);
162                    }
163            }
164    
165            if ($pager->next_set) {
166                    $q->param('PAGER_offset', $pager->next_set);
167                    $pager_next .= sprintf($nav_fmt,$q->url(-relative=>1, -query=>1),'..');
168            }
169    
170            if ($pager->current_page() < $pager->last_page) {
171                    $q->param('PAGER_offset', $pager->current_page + 1);
172                    $pager_next .= sprintf($nav_fmt,$q->url(-relative=>1, -query=>1),'&gt;&gt;');
173            }
174    
175            $tmpl->param('PAGER_PREV', $pager_prev);
176            $tmpl->param('PAGER_JUMP', $pager_jump);
177            $tmpl->param('PAGER_NEXT', $pager_next);
178    
179    }
180    
181    #
182    # put persisten variables in template
183    #
184    
185    sub make_pager_vars {
186            my $q = shift @_;
187            my $tmpl = shift @_;
188            my @persist_vars = @_;
189            my $hidden_vars = '';
190            my $hidden_search = '';
191            foreach my $v (@persist_vars) {
192                    foreach my $val ($q->param($v)) {
193                            next if (! $val || $val eq '');
194                            $val =~ s/"/&quot;/g;
195                            $hidden_vars .= '<input type="hidden" name="'.$v.'" value="'.$val.'"/>'."\n";
196                            $hidden_search .= '<input type="hidden" name="'.$v.'" value="'.$val.'"/>'."\n" if ($v ne "rm");
197                    }
198            }
199    
200            $tmpl->param('PAGER_HIDDEN', $hidden_vars);
201            $tmpl->param('SEARCH_HIDDEN', $hidden_search);
202            $tmpl->param('PAGER_JAVASCRIPT', qq#
203    <SCRIPT LANGUAGE="Javascript">
204    <!-- Begin
205            // dummy emulator for HTML::Pager templates
206            function PAGER_set_offset_and_submit() {
207                    return true;
208            }
209    // End -->
210    </script>  
211            #);
212    }
213    
214    #--------------------------------------------------------------------------
215    
216  sub show_search_form {  sub show_search_form {
217          my $self = shift;          my $self = shift;
218    
# Line 128  sub show_results_list { Line 233  sub show_results_list {
233    
234          my $q = $self->query();          my $q = $self->query();
235    
236          my @swish_results;      # results from swish          # submit was reset?
237            if ($q->param('reset')) {
238                    $q->delete_all;
239                    return $self->show_search_form();
240            }
241    
242          # load template for this page          # load template for this page
243    
# Line 137  sub show_results_list { Line 246  sub show_results_list {
246          my @path_arr = $q->param('path');          my @path_arr = $q->param('path');
247          my $full = $q->param('full');          my $full = $q->param('full');
248    
249          my @persist_vars = ( 'rm' );          my @persist_vars = ( 'rm', 'persist_search' );
250          my @url_params = ( 'rm=results', 'show_full=1', 'last_PAGER_offset='.$q->param('PAGER_offset') || 0 );          my $url_params = {
251                    'rm' => 'results',
252                    'show_full' => 1,
253                    'last_PAGER_offset' => ($q->param('PAGER_offset') || 0),
254            };
255    
256            my @persist_search_vars;
257            my $url_params_persist = {};
258            if ($q->param("persist_search")) {
259                    @persist_search_vars = split(/\s*,\s*/, $q->param("persist_search"));
260                    $url_params_persist->{'persist_search'} = $q->url_param("persist_search");
261                    $url_params->{'persist_search'} = $q->url_param("persist_search");
262            }
263    
264          # support parametars "f" and "v" for start          # support parametars "f" and "v" for start
265          for(my $i = ""; $i <=30; $i++) {          for(my $i = 0; $i <=30; $i++) {
266    
267                    $i = '' if ($i == 0);
268    
269                  return show_index($self, $i) if ($q->param("f".$i."_index"));                  return show_index($self, $i) if ($q->param("f".$i."_index"));
270    
271                  next if (! $q->param("v$i"));                  next if (! $q->param("v$i") || $q->param("v$i") eq '');
272                  next if (! $q->param("f$i"));                  next if (! $q->param("f$i"));
273    
274                    my $persist = grep(/^$i$/,@persist_search_vars);
275            
276                  push @persist_vars, "f$i";                  push @persist_vars, "f$i";
277                  push @persist_vars, "v$i";                  push @persist_vars, "v$i";
278                  push @persist_vars, "e$i" if ($q->param("e$i"));                  push @persist_vars, "e$i" if ($q->param("e$i"));
279    
280                  push @url_params,"f$i=".$q->url_param("f$i");                  # create url parametars (and persistent ones)
281    
282                    $url_params->{"f$i"} = $q->url_param("f$i");
283                    $url_params_persist->{"f$i"} = $q->url_param("f$i") if ($persist);
284    
285                    my @v;
286    
287                  foreach my $v ($q->url_param("v$i")) {                  foreach my $v ($q->url_param("v$i")) {
288                          push @url_params,"v$i=$v";                          # escape quotes so that phrase search work
289                            $v =~ s/"/%22/g;
290                            push @v, $v;
291                    }
292                    $url_params->{"v$i"} = \@v;
293                    $url_params_persist->{"v$i"} = \@v if ($persist);
294    
295                    if ($q->param("e$i")) {
296                            $url_params->{"e$i"} = $q->url_param("e$i");
297    #                       $url_params_persist->{"e$i"} = $q->url_param("e$i");
298                  }                  }
                 push @url_params,"e$i=".$q->url_param("e$i");  
299    
300                  my $wc="*";     # swish wildcard                  my $wc="*";     # swish wildcard
301                  $wc="" if ($i eq "");   # don't apply wildcard on field 0                  $wc="" if ($i eq "");   # don't apply wildcard on field 0
# Line 168  sub show_results_list { Line 307  sub show_results_list {
307                  while (my $search = shift @param_vals) {                  while (my $search = shift @param_vals) {
308                          my $s;                          my $s;
309                          # remove accents                          # remove accents
310                          $search = unac_string($CHARSET,$search);                          $search = my_unac_string($CHARSET,$search);
311                          while ($search =~ s/\s*("[^"]+")\s*/ /) {                          while ($search =~ s/\s*("[^"]+")\s*/ /) {
312                                  $s .= "$1 ";                                  $s .= "$1 ";
313                          }                          }
# Line 177  sub show_results_list { Line 316  sub show_results_list {
316    
317                          # filed e[nr] is exact match bitmask                          # filed e[nr] is exact match bitmask
318                          # 1 = beginning, 2=end, 3=both                          # 1 = beginning, 2=end, 3=both
319                          $pre = '"xxbxx ' if ($q->param("e$i") & 1);                          my $exact_flag = $q->param("e$i") || 0;
320                          $post = ' xxexx"' if ($q->param("e$i") & 2);                          $pre = '"xxbxx ' if ($exact_flag & 1);
321                            $post = ' xxexx"' if ($exact_flag & 2);
322                          # add qotes on other side                          # add qotes on other side
323                          if ($q->param("e$i")) {                          if ($q->param("e$i")) {
324                                  $pre = '"' if (! $pre);                                  $pre = '"' if (! $pre);
# Line 204  sub show_results_list { Line 344  sub show_results_list {
344                                  }                                  }
345                          }                          }
346                          $s =~ s/\*+/*/g;                          $s =~ s/\*+/*/g;
347                            $s =~ s/[()]//g;        # () are used in query language
348                          $s = $pre.$s.$post if ($q->param("e$i"));                          $s = $pre.$s.$post if ($q->param("e$i"));
349                          push @swish_q,$s;                          push @swish_q,$s;
350                  }                  }
# Line 212  sub show_results_list { Line 353  sub show_results_list {
353                  push @s_arr, $q->param("f$i")."_swish".$exact."=(".join(" or ",@swish_q).")";                  push @s_arr, $q->param("f$i")."_swish".$exact."=(".join(" or ",@swish_q).")";
354          }          }
355    
356          my $tmpl = $self->load_tmpl(url_ex($q,'results.html'), global_vars => 1);          my $tmpl = $self->load_tmpl(url_ex($q,'results.html'), global_vars => 1, die_on_bad_params => 0);
357    
358          sub esc_html {          sub esc_html {
359                  my $html = shift;                  my $html = shift;
# Line 227  sub show_results_list { Line 368  sub show_results_list {
368                  push @persist_vars, "sort";                  push @persist_vars, "sort";
369          }          }
370    
371          # call swish          my $sortby = $q->param("sortby");
372          my $sh = SWISH->connect('Fork',          if ($sortby) {
373                  prog     => $SWISH,                  $sort = $sortby;
374                  indexes  => $INDEX,                  push @persist_vars, "sortby";
375                  properties  => [qw/swishdocpath swishrank swishtitle headline html/],          }
376                  results  => sub {          # used to filter entries in index and swish
377                          my ($sh,$hit) = @_;          my $filter = $q->param("filter");
   
                         push @swish_results, {  
                                 nr => ($#swish_results + 2),  
                                 path => $hit->swishdocpath,  
                                 headline => esc_html($from_utf8->convert($hit->headline)),  
                                 html => back2html($from_utf8->convert($hit->html)),  
                                 rank => $hit->swishrank };  
   
                 },  
                 #startnum => 0,  
                 maxhits => $MAX_HITS,  
                 sortorder => $sort,  
         );  
378    
         die $SWISH::errstr unless $sh;  
379          # construct swish query          # construct swish query
380          my $sw_q = join(" and ",@s_arr);          my $sw_q = join(" and ",@s_arr);
381          if (@path_arr && $q->param('show_full')) {          if (@path_arr && $q->param('show_full')) {
382                  $sw_q .= "and (swishdocpath=\"";                  $sw_q .= " and (swishdocpath=\"";
383                  $sw_q .= join("\" or swishdocpath=\"",@path_arr);                  $sw_q .= join("\" or swishdocpath=\"",@path_arr);
384                  $sw_q .= "\")";                  $sw_q .= "\")";
385                  $tmpl->param('full',1); # show full records                  $tmpl->param('full',1); # show full records
386    #       } elsif (@path_arr && $#path_arr == 0) {
387    #               # I will assume that it's a filter since there isn't show_full
388    #               $filter = shift @path_arr;
389          } elsif ($q->param('show_full')) {          } elsif ($q->param('show_full')) {
390                  # just show full path, no path defined                  # just show full path, no path defined
391                  $tmpl->param('full',1);                  $tmpl->param('full',1);
# Line 263  sub show_results_list { Line 393  sub show_results_list {
393                  $tmpl->param('full',0);                  $tmpl->param('full',0);
394          }          }
395    
396          my $hits = $sh->query($sw_q);          if ($filter) {
397                    $sw_q .= " and (swishdocpath=\"$filter\")" unless (@path_arr);
398                    push @persist_vars, "filter";
399                    $url_params->{'filter'} = $filter;
400                    $url_params_persist->{'filter'} = $filter;
401            }
402    
403            my $swish_msg = ' ';
404    
405            # create new swish instance
406            my $swish = SWISH::API->new($INDEX);
407            $swish_msg .= $swish->ErrorString." ".$swish->LastErrorMsg if $swish->Error;
408    
409            # execute query and get number of results from SWISH-E
410            my $search = $swish->New_Search_Object;
411    
412            $search->SetSort($sort);
413    
414            my $results = $search->Execute($sw_q);
415            $swish_msg .= $swish->ErrorString." ".$swish->LastErrorMsg if $swish->Error;
416    
417            my $hits = $results->Hits;
418    
419          $tmpl->param('hits',$hits);          $tmpl->param('hits',$hits);
420          $tmpl->param('search',$sw_q);          my $search_msg = $sw_q;
421            $search_msg .= '<em>'.$swish_msg.'</em>' if ($swish_msg);
422            $tmpl->param('search', $search_msg);
423    
424          $tmpl->param('PAGER_offset',$q->param("PAGER_offset") || 0);          $tmpl->param('PAGER_offset',$q->param("PAGER_offset") || 0);
425          $tmpl->param('last_PAGER_offset',$q->param("last_PAGER_offset") || 0);          $tmpl->param('last_PAGER_offset',$q->param("last_PAGER_offset") || 0);
426    
427          $tmpl->param('url_params',"?".join("&",@url_params));          # URL parametars for search results
428            sub cook_url_params {
429          # create a Pager object                  my $hash = shift || return;
430          my $pager = HTML::Pager->new(                  return join("&", map {
431                  # required parameters                          my $var = $_;
432                  query => $q,                          if (ref($hash->{$var}) eq 'ARRAY') {
433                  get_data_callback => sub {                                  join('&',
434                          my ($offset, $rows) = @_;                                          map { $var.'='.$_ } @{$hash->{$var}}
435                                    );
436                          my @result;                          } else {
437                          for (my $i=0; $i<$rows; $i++) {                                  $var."=".$hash->{$var};
                                 my $r = $swish_results[$offset+$i];  
                                 if ($r && $tmpl->param('full')) {  
                                         push @result, $r;  
                                 } elsif ($r) {  
                                         # if not full output, skip html  
                                         delete $r->{html};  
                                         push @result, $r;  
                                 }  
438                          }                          }
439                          return \@result;                  } keys %{$hash});
440                  },          }
441                  rows => $hits,  
442                  page_size => $ON_PAGE,          $tmpl->param('url_params',"?".cook_url_params($url_params));
443                  # some optional parameters          $tmpl->param('url_params_paths',"?".cook_url_params($url_params).'&'.join("&",map { my $t = $_; $t =~ s/\#/%23/g; "path=$t"; } @path_arr));
444                  persist_vars => [ @persist_vars ],  
445                  #cell_space_color => '#000000',  
446                  #cell_background_color => '#ffffff',  
447                  #nav_background_color => '#dddddd',          #
448                  #javascript_presubmit => 'last_minute_javascript()',          # build pager
449                  debug => 1,          #
450                  template => $tmpl,  
451          );          my $current_page = $q->param('PAGER_offset') || 1;
452    
453          my $html = $pager->output;          my $pager = Data::Pageset->new({
454                    'total_entries' => $hits,
455                    'entries_per_page' => $ON_PAGE,
456                    'current_page' => $current_page,
457                    'pages_per_set' => $pages_per_set,
458            });
459    
460            $results->SeekResult( $pager->first - 1 );
461    
462            # get number of entries on this page
463            my $i = $pager->entries_on_this_page;
464    
465            # results from swish for template
466            my @pager_data_list;
467    
468            for(my $i=$pager->first; $i<=$pager->last; $i++) {
469    
470                    my $result = $results->NextResult;
471                    last if (! $result);
472    
473                    my $r = {
474                            nr => $i,
475                            path => $result->Property('swishdocpath'),
476                            headline => esc_html($from_utf8->convert($result->Property('headline'))),
477                            rank => $result->Property('swishrank')
478                    };
479    
480                    #$r->{html} = back2html($from_utf8->convert($result->Property('html')), cook_url_params($url_params_persist)) if ($q->param('show_full'));
481                    $r->{html} = back2html($from_utf8->convert($result->Property('html')), $filter ? 'filter='.$filter : '') if ($q->param('show_full'));
482    
483                    push @pager_data_list, $r;
484            }
485    
486    
487    
488            # put something in template
489            make_pager($q, $tmpl, $pager);
490            make_pager_vars($q, $tmpl, @persist_vars);
491            $tmpl->param('PAGER_DATA_LIST', \@pager_data_list);
492    
493            my $html = $tmpl->output;
494    
495          return in_template($q,$html);          return in_template($q,$html);
496  }  }
# Line 319  sub show_index { Line 504  sub show_index {
504          my $field = $q->param("f$i");          my $field = $q->param("f$i");
505          my $limit = $q->param("v$i");          my $limit = $q->param("v$i");
506    
507            my $filter = $q->param("filter");
508    
509          my $html;          my $html;
510    
511          my $index = new index_DBI(          my $index = new index_DBI(
# Line 328  sub show_index { Line 515  sub show_index {
515                  $cfg_global->val('global', 'dbi_passwd') || ''                  $cfg_global->val('global', 'dbi_passwd') || ''
516          );          );
517    
518          my $total = $index->count($field,$limit);          my $total = $index->count($field,$limit,$filter);
519          if (! $total) {  
520            if (! defined($total)) {
521                  my $tmpl = $self->load_tmpl(url_ex($q,'no_index.html'));                  my $tmpl = $self->load_tmpl(url_ex($q,'no_index.html'));
522                  $tmpl->param('field',$field);                  $tmpl->param('field',$field);
523                  $html = $tmpl->output;                  $html = $tmpl->output;
524                  return $html;                  return $html;
525          }          }
526    
527          my $tmpl = $self->load_tmpl(url_ex($q,'index_res.html'), global_vars => 1);          my $tmpl = $self->load_tmpl(url_ex($q,'index_res.html'), global_vars => 1, die_on_bad_params => 0);
528          $tmpl->param('field',$field);          $tmpl->param('field',$field);
529          $tmpl->param('limit',$limit);          $tmpl->param('limit',$limit);
530          $tmpl->param('total',$total);          $tmpl->param('total',$total);
531            $tmpl->param('filter',$filter);
532    
533  # FIXME I should set offset and leave out limit from fetch!!  # FIXME I should set offset and leave out limit from fetch!!
534  #       if (! $q->param("PAGER_offset") {  #       if (! $q->param("PAGER_offset") {
535  #               $q->param("Pager_offet)  #               $q->param("Pager_offet)
536  #       }  #       }
537    
         my $pager = HTML::Pager->new(  
                 query => $q,  
                 get_data_callback => sub {  
                         my ($offset, $rows) = @_;  
   
                         my @result = $index->fetch($field,$limit, $offset, $rows);  
                         return \@result;  
                 },  
                 rows => $total,  
                 page_size => $ON_PAGE,  
                 persist_vars => [  
                         'rm',  
                         "f$i", "v$i", "f".$i."_index",  
                         'offset',  
                         ],  
                 debug => 1,  
                 template => $tmpl,  
         );  
538    
539          return in_template($q,$pager->output);          #
540            # build pager
541            #
542            my $pager = Data::Pageset->new({
543                    'total_entries' => $total,
544                    'entries_per_page' => $ON_PAGE,
545                    'current_page' => $q->param('PAGER_offset') || 1,
546                    'pages_per_set' => $pages_per_set
547            });
548    
549            my @persist_vars = qw{rm f$i v$i f$i_index offset};
550    
551            make_pager($q, $tmpl, $pager);
552            make_pager_vars($q, $tmpl, @persist_vars);
553    
554            my @pager_data_list = $index->fetch($field,$limit, $pager->first - 1, $pager->entries_on_this_page, $filter);
555            $tmpl->param('PAGER_DATA_LIST', \@pager_data_list);
556    
557            return in_template($q,$tmpl->output);
558  }  }
559    
560  1;  1;

Legend:
Removed from v.202  
changed lines
  Added in v.731

  ViewVC Help
Powered by ViewVC 1.1.26