/[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

revision 122 by dpavlin, Wed Sep 3 20:08:26 2003 UTC revision 128 by dpavlin, Thu Sep 4 14:57:02 2003 UTC
# Line 12  use Config::IniFiles; Line 12  use Config::IniFiles;
12  use Text::Unaccent;  use Text::Unaccent;
13    
14  use lib '..';  use lib '..';
15  use index_DBI;  use index_DBI_cache;
16  use back2html;  use back2html;
17    
18    
# Line 79  sub show_results_list { Line 79  sub show_results_list {
79          my $full = $q->param('full');          my $full = $q->param('full');
80    
81          my @persist_vars = ( 'rm' );          my @persist_vars = ( 'rm' );
82            my @url_params = ( 'rm=results', 'show_full=1', 'last_PAGER_offset='.$q->param('PAGER_offset') || 0 );
83    
84          for(my $i = 1; $i <=30; $i++) {          for(my $i = 1; $i <=30; $i++) {
85    
# Line 90  sub show_results_list { Line 91  sub show_results_list {
91                  push @persist_vars, "f$i";                  push @persist_vars, "f$i";
92                  push @persist_vars, "v$i";                  push @persist_vars, "v$i";
93    
94                    push @url_params,"f$i=".$q->url_param("f$i");
95                    push @url_params,"v$i=".$q->url_param("v$i");
96    
97                  # re-write query from +/- to and/and not                  # re-write query from +/- to and/and not
98                  my @param_vals = $q->param("v$i");                  my @param_vals = $q->param("v$i");
99                  my @swish_q;                  my @swish_q;
# Line 125  sub show_results_list { Line 129  sub show_results_list {
129                  push @s_arr, $q->param("f$i")."_swish=(".join(" or ",@swish_q).")";                  push @s_arr, $q->param("f$i")."_swish=(".join(" or ",@swish_q).")";
130          }          }
131    
132          my $tmpl = $self->load_tmpl('results.html');          my $tmpl = $self->load_tmpl('results.html', global_vars => 1);
133    
134          sub esc_html {          sub esc_html {
135                  my $html = shift;                  my $html = shift;
# Line 174  sub show_results_list { Line 178  sub show_results_list {
178          $tmpl->param('PAGER_offset',$q->param("PAGER_offset") || 0);          $tmpl->param('PAGER_offset',$q->param("PAGER_offset") || 0);
179          $tmpl->param('last_PAGER_offset',$q->param("last_PAGER_offset") || 0);          $tmpl->param('last_PAGER_offset',$q->param("last_PAGER_offset") || 0);
180    
181            $tmpl->param('url_params',"?".join("&",@url_params));
182    
183          # create a Pager object          # create a Pager object
184          my $pager = HTML::Pager->new(          my $pager = HTML::Pager->new(
185                  # required parameters                  # required parameters
# Line 237  sub show_index { Line 243  sub show_index {
243                  return $html;                  return $html;
244          }          }
245    
246          my $tmpl = $self->load_tmpl('index_res.html');          my $tmpl = $self->load_tmpl('index_res.html', global_vars => 1);
247          $tmpl->param('field',$field);          $tmpl->param('field',$field);
248          $tmpl->param('limit',$limit);          $tmpl->param('limit',$limit);
249          $tmpl->param('total',$total);          $tmpl->param('total',$total);

Legend:
Removed from v.122  
changed lines
  Added in v.128

  ViewVC Help
Powered by ViewVC 1.1.26