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

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

revision 52 by dpavlin, Sun Jun 1 15:33:08 2003 UTC revision 53 by dpavlin, Sun Jun 1 18:49:49 2003 UTC
# Line 8  use HTML::FillInForm; Line 8  use HTML::FillInForm;
8  use SWISH;  use SWISH;
9  use Text::Iconv;  use Text::Iconv;
10  use DBI;  use DBI;
11    use Config::IniFiles;
12    
13  use lib '..';  use lib '..';
14  use index_DBI;  use index_DBI;
# Line 26  Text::Iconv->raise_error(0);     # Conve Line 27  Text::Iconv->raise_error(0);     # Conve
27    
28  my $from_utf8 = Text::Iconv->new('UTF8', $CHARSET);  my $from_utf8 = Text::Iconv->new('UTF8', $CHARSET);
29    
30    # read global.conf configuration
31    my $cfg_global = new Config::IniFiles( -file => '../global.conf' ) || die "can't open 'global.conf'";
32    
33    
34  sub setup {  sub setup {
35          my $self = shift;          my $self = shift;
36          $self->tmpl_path($TEMPLATE_PATH);          $self->tmpl_path($TEMPLATE_PATH);
# Line 90  sub show_results_list { Line 95  sub show_results_list {
95                                  $s.= ($s) ? "and " : "";                                  $s.= ($s) ? "and " : "";
96                                  $s.="not " if ($1 eq "-");                                  $s.="not " if ($1 eq "-");
97                                  $s.="$2* ";                                  $s.="$2* ";
98                            } elsif (m/(and|or|not)/i) {
99                                    $s.="$_ ";
100                          } else {                          } else {
101                                  $s.="$_* ";                                  $s.="$_* ";
102                          }                          }
# Line 192  sub show_index { Line 199  sub show_index {
199    
200          my $html;          my $html;
201    
202          my $index = new index_DBI();          my $index = new index_DBI(
203                    $cfg_global->val('global', 'dbi_dbd'),
204                    $cfg_global->val('global', 'dbi_dsn'),
205                    $cfg_global->val('global', 'dbi_user'),
206                    $cfg_global->val('global', 'dbi_passwd') || ''
207            );
208    
209          my $total = $index->check($field);          my $total = $index->check($field);
210          if (! $total) {          if (! $total) {

Legend:
Removed from v.52  
changed lines
  Added in v.53

  ViewVC Help
Powered by ViewVC 1.1.26