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

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

revision 73 by dpavlin, Sat Jul 5 22:31:46 2003 UTC revision 76 by dpavlin, Sat Jul 5 23:07:47 2003 UTC
# Line 15  use lib '..'; Line 15  use lib '..';
15  use index_DBI;  use index_DBI;
16  use back2html;  use back2html;
17    
18  # configuration options  
19  # FIXME they really should go in configuration file!  # read global.conf configuration
20  my $TEMPLATE_PATH = '/data/webpac/template_html';  my $cfg_global = new Config::IniFiles( -file => '../global.conf' ) || die "can't open 'global.conf'";
21  my $CHARSET = 'ISO-8859-2';  
22  my $SWISH = '/usr/bin/swish-e';  # configuration options from global.conf
23  my $INDEX = '/data/webpac/index/isis.index';  my $TEMPLATE_PATH = $cfg_global->val('webpac', 'template_html') || die "need template_html in global.conf, section webpac";
24  my $MAX_HITS = 0;  my $CHARSET = $cfg_global->val('webpac', 'charset') || 'ISO-8859-1';
25  my $ON_PAGE = 10;  my $SWISH = $cfg_global->val('webpac', 'swish') || '/usr/bin/swish-e';
26    my $INDEX = $cfg_global->val('webpac', 'index') || die "need index in global.conf, section webpac";
27    my $MAX_HITS = $cfg_global->val('webpac', 'max_hits') || 0;
28    my $ON_PAGE =$cfg_global->val('webpac', 'on_page') || 10;
29    
30    
31  Text::Iconv->raise_error(0);     # Conversion errors raise exceptions  Text::Iconv->raise_error(0);     # Conversion errors raise exceptions
32    
33  my $from_utf8 = Text::Iconv->new('UTF8', $CHARSET);  my $from_utf8 = Text::Iconv->new('UTF8', $CHARSET);
34    
 # read global.conf configuration  
 my $cfg_global = new Config::IniFiles( -file => '../global.conf' ) || die "can't open 'global.conf'";  
   
35    
36  sub setup {  sub setup {
37          my $self = shift;          my $self = shift;
# Line 151  sub show_results_list { Line 152  sub show_results_list {
152          $tmpl->param('hits',$hits);          $tmpl->param('hits',$hits);
153          $tmpl->param('search',$sw_q);          $tmpl->param('search',$sw_q);
154    
155          $tmpl->param('PAGER_offset',$q->param("PAGER_offset") || 1);          $tmpl->param('PAGER_offset',$q->param("PAGER_offset") || 0);
156          $tmpl->param('last_PAGER_offset',$q->param("last_PAGER_offset") || 1);          $tmpl->param('last_PAGER_offset',$q->param("last_PAGER_offset") || 0);
157    
158          # create a Pager object          # create a Pager object
159          my $pager = HTML::Pager->new(          my $pager = HTML::Pager->new(

Legend:
Removed from v.73  
changed lines
  Added in v.76

  ViewVC Help
Powered by ViewVC 1.1.26