/[swish]/trunk/html/swish.cgi
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 /trunk/html/swish.cgi

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

revision 40 by dpavlin, Sun Jun 1 11:41:39 2003 UTC revision 41 by dpavlin, Sun Jun 1 12:13:36 2003 UTC
# Line 34  sub e { Line 34  sub e {
34  my @spellings;  my @spellings;
35  # FIX: doesn't work very well  # FIX: doesn't work very well
36  if ($config->{findaffix}) {  if ($config->{findaffix}) {
37          my $spelling_alt = new Lingua::Spelling::Alternative;          foreach my $findaffix (split(/[, ]+/,x($config->{findaffix}))) {
38          $spelling_alt->load_findaffix(x($config->{findaffix}));                  my $spelling_alt = new Lingua::Spelling::Alternative;
39          push @spellings,$spelling_alt;                  $spelling_alt->load_findaffix($findaffix);
40                    push @spellings,$spelling_alt;
41            }
42  }  }
43  if ($config->{affix}) {  if ($config->{affix}) {
44          my $spelling_alt = new Lingua::Spelling::Alternative;          foreach my $affix (split(/[, ]+/,x($config->{affix}))) {
45          $spelling_alt->load_affix(x($config->{affix}));                  my $spelling_alt = new Lingua::Spelling::Alternative;
46          push @spellings,$spelling_alt;                  $spelling_alt->load_affix($affix);
47                    push @spellings,$spelling_alt;
48            }
49  }  }
50    
51  my $hits=0;  my $hits=0;
# Line 96  if (param('search')) { Line 100  if (param('search')) {
100          $search =~ s/^\s+//;          $search =~ s/^\s+//;
101          $search =~ s/\s+$//;          $search =~ s/\s+$//;
102    
103            my %words;
104    
105          foreach (split(/\s+/,$search)) {          foreach (split(/\s+/,$search)) {
106                  if (m/^([+-])(\S+)/) {                  if (m/^([+-])(\S+)/) {
107                          $s.= ($s) ? "and " : "";                          $s.= ($s) ? "and " : "";

Legend:
Removed from v.40  
changed lines
  Added in v.41

  ViewVC Help
Powered by ViewVC 1.1.26