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

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

revision 651 by dpavlin, Wed Jan 19 22:40:11 2005 UTC revision 652 by dpavlin, Thu Jan 27 21:17:47 2005 UTC
# Line 12  use Text::Unaccent; Line 12  use Text::Unaccent;
12  use Data::Pageset;  use Data::Pageset;
13    
14  use lib '..';  use lib '..';
15  use index_DBI_cache;  use index_DBI_filter;
16  use back2html;  use back2html;
17    
18    
# Line 438  sub show_index { Line 438  sub show_index {
438          my $field = $q->param("f$i");          my $field = $q->param("f$i");
439          my $limit = $q->param("v$i");          my $limit = $q->param("v$i");
440    
441            my $filter = $q->param("filter");
442    
443          my $html;          my $html;
444    
445          my $index = new index_DBI(          my $index = new index_DBI(
# Line 447  sub show_index { Line 449  sub show_index {
449                  $cfg_global->val('global', 'dbi_passwd') || ''                  $cfg_global->val('global', 'dbi_passwd') || ''
450          );          );
451    
452          my $total = $index->count($field,$limit);          my $total = $index->count($field,$limit,$filter);
453    
454          if (! $total) {          if (! defined($total)) {
455                  my $tmpl = $self->load_tmpl(url_ex($q,'no_index.html'));                  my $tmpl = $self->load_tmpl(url_ex($q,'no_index.html'));
456                  $tmpl->param('field',$field);                  $tmpl->param('field',$field);
457                  $html = $tmpl->output;                  $html = $tmpl->output;
# Line 482  sub show_index { Line 484  sub show_index {
484          make_pager($q, $tmpl, $pager);          make_pager($q, $tmpl, $pager);
485          make_pager_vars($q, $tmpl, @persist_vars);          make_pager_vars($q, $tmpl, @persist_vars);
486    
487          my @pager_data_list = $index->fetch($field,$limit, $pager->first - 1, $pager->entries_on_this_page);          my @pager_data_list = $index->fetch($field,$limit, $pager->first - 1, $pager->entries_on_this_page, $filter);
488          $tmpl->param('PAGER_DATA_LIST', \@pager_data_list);          $tmpl->param('PAGER_DATA_LIST', \@pager_data_list);
489    
490          return in_template($q,$tmpl->output);          return in_template($q,$tmpl->output);

Legend:
Removed from v.651  
changed lines
  Added in v.652

  ViewVC Help
Powered by ViewVC 1.1.26