/[nn.old]/trunk/search/nn-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/search/nn-swish.cgi

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

revision 97 by dpavlin, Wed Sep 1 14:08:00 2004 UTC revision 101 by dpavlin, Tue Feb 22 14:46:28 2005 UTC
# Line 72  if (param('search')) { Line 72  if (param('search')) {
72          my $sw_q;          my $sw_q;
73          my $sh;          my $sh;
74    
75            if (defined(param('max_hits'))) {
76                    $max_hits = param('max_hits');
77            }
78    
79          if (param('index') eq 'title') {          if (param('index') eq 'title') {
80    
81                  $sh = SWISH->connect('Fork',                  $sh = SWISH->connect('Fork',
# Line 90  if (param('search')) { Line 94  if (param('search')) {
94          #                       my @fields = $hit->field_names;          #                       my @fields = $hit->field_names;
95          #                       print "Field '$_' = '", $hit->$_, "'<br>\n" for sort @fields;          #                       print "Field '$_' = '", $hit->$_, "'<br>\n" for sort @fields;
96                          },                          },
97                          maxhits => param('max_hits') || $max_hits,                          maxhits => $max_hits,
98                  );                  );
99    
100                  die $SWISH::errstr unless $sh;                  die $SWISH::errstr unless $sh;
# Line 120  if (param('search')) { Line 124  if (param('search')) {
124                                  }                                  }
125    
126                          },                          },
127                          maxhits => param('max_hits') || $max_hits,                          maxhits => $max_hits,
128                  );                  );
129    
130                  die $SWISH::errstr unless $sh;                  die $SWISH::errstr unless $sh;
# Line 139  if (param('search')) { Line 143  if (param('search')) {
143          if ($hits > 0) {          if ($hits > 0) {
144                  print p,hr,"Prikazujem $hits zakona";                  print p,hr,"Prikazujem $hits zakona";
145                  print " iz godine ",param('god') if (param('god_limit'));                  print " iz godine ",param('god') if (param('god_limit'));
146                  print " (maks. ",param('max_hits') || $max_hits,")... <small>($s)</small>";                  print " (maks. $max_hits)... " if ($max_hits);
147                    print " <small>[$s]</small>";
148          } else {          } else {
149                  print p,"Nije našen niti jedan zakon... <small>($s, ",$sh->errstr,")</small>";                  print p,"Nije našen niti jedan zakon... <small>[$s, ",$sh->errstr,"]</small>";
150          }          }
151  } else {  } else {
152          my $dir=$0;          my $dir=$0;

Legend:
Removed from v.97  
changed lines
  Added in v.101

  ViewVC Help
Powered by ViewVC 1.1.26