/[webpac2]/Webpacus/lib/Webpacus/Model/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 /Webpacus/lib/Webpacus/Model/WebPAC.pm

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

revision 95 by dpavlin, Tue Nov 22 12:57:25 2005 UTC revision 96 by dpavlin, Tue Nov 22 12:57:30 2005 UTC
# Line 32  Configuration for hyperestraier in C<con Line 32  Configuration for hyperestraier in C<con
32    
33   # configuration for hyper estraier full text search engine   # configuration for hyper estraier full text search engine
34   hyperestraier:   hyperestraier:
35      url: 'http://localhost:1978/node/webpac2'    url: 'http://localhost:1978/node/webpac2'
36      user: 'admin'    user: 'admin'
37      passwd: 'admin'    passwd: 'admin'
38    
39     webpac:
40      db_path: '/data/webpac2/db'
41      template_path: '/data/webpac2/conf/output/tt'
42      template: 'html_ffzg_results_short.tt'
43      # encoding comming from webpac
44      webpac_encoding: 'iso-8859-2'
45      # encoding expected by Catalyst
46      out_encoding: 'UTF-8'
47    
48  =cut  =cut
49    
# Line 71  sub new { Line 80  sub new {
80    
81          $self->{template} ||= $c->config->{webpac}->{template};          $self->{template} ||= $c->config->{webpac}->{template};
82    
83            $self->{iconv} = new Text::Iconv(
84                    $c->config->{webpac}->{webpac_encoding},
85                    $c->config->{webpac}->{out_encoding}
86            );
87    
88    
89          return $self;          return $self;
90    
91  }  }
# Line 97  sub search { Line 112  sub search {
112                  $log->debug("load_ds( $mfn )");                  $log->debug("load_ds( $mfn )");
113    
114                  my $ds = $self->{db}->load_ds( $mfn ) || next;                  my $ds = $self->{db}->load_ds( $mfn ) || next;
115                  $results[$i]->{ html } = $self->{out}->apply(                  $results[$i]->{ html } = $self->{iconv}->convert(
116                    $self->{out}->apply(
117                          template => $template_filename,                          template => $template_filename,
118                          data => $ds,                          data => $ds,
119                  );                  ) );
120          }          }
121    
122          return \@results;          return \@results;

Legend:
Removed from v.95  
changed lines
  Added in v.96

  ViewVC Help
Powered by ViewVC 1.1.26