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', |
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; |
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; |
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; |