|
Lines 244-254
sub Z3950Search {
Link Here
|
| 244 |
my $lccall= $pars->{lccall}; |
244 |
my $lccall= $pars->{lccall}; |
| 245 |
my $controlnumber= $pars->{controlnumber}; |
245 |
my $controlnumber= $pars->{controlnumber}; |
| 246 |
|
246 |
|
| 247 |
|
|
|
| 248 |
my $show_next = 0; |
247 |
my $show_next = 0; |
| 249 |
my $total_pages = 0; |
248 |
my $total_pages = 0; |
| 250 |
|
249 |
|
| 251 |
my $noconnection; |
|
|
| 252 |
my $attr = ''; |
250 |
my $attr = ''; |
| 253 |
my $term; |
251 |
my $term; |
| 254 |
my $host; |
252 |
my $host; |
|
Lines 259-265
sub Z3950Search {
Link Here
|
| 259 |
my @encoding; |
257 |
my @encoding; |
| 260 |
my @results; |
258 |
my @results; |
| 261 |
my $count; |
259 |
my $count; |
| 262 |
my $toggle; |
|
|
| 263 |
my $record; |
260 |
my $record; |
| 264 |
my $oldbiblio; |
261 |
my $oldbiblio; |
| 265 |
my @serverhost; |
262 |
my @serverhost; |
|
Lines 329-334
sub Z3950Search {
Link Here
|
| 329 |
$option1->option( 'password', $server->{password} ) |
326 |
$option1->option( 'password', $server->{password} ) |
| 330 |
if $server->{password}; |
327 |
if $server->{password}; |
| 331 |
$option1->option( 'preferredRecordSyntax', $server->{syntax} ); |
328 |
$option1->option( 'preferredRecordSyntax', $server->{syntax} ); |
|
|
329 |
$option1->option( 'timeout', $server->{timeout} ) if $server->{timeout}; |
| 332 |
$oConnection[$s] = create ZOOM::Connection($option1); |
330 |
$oConnection[$s] = create ZOOM::Connection($option1); |
| 333 |
$oConnection[$s]->connect( $server->{host}, $server->{port} ); |
331 |
$oConnection[$s]->connect( $server->{host}, $server->{port} ); |
| 334 |
$serverhost[$s] = $server->{host}; |
332 |
$serverhost[$s] = $server->{host}; |
|
Lines 338-344
sub Z3950Search {
Link Here
|
| 338 |
} ## while fetch |
336 |
} ## while fetch |
| 339 |
} # foreach |
337 |
} # foreach |
| 340 |
my $nremaining = $s; |
338 |
my $nremaining = $s; |
| 341 |
my $firstresult = 1; |
|
|
| 342 |
|
339 |
|
| 343 |
for ( my $z = 0 ; $z < $s ; $z++ ) { |
340 |
for ( my $z = 0 ; $z < $s ; $z++ ) { |
| 344 |
$oResult[$z] = $oConnection[$z]->search_pqf($query); |
341 |
$oResult[$z] = $oConnection[$z]->search_pqf($query); |
|
Lines 403-431
sub Z3950Search {
Link Here
|
| 403 |
} #if $numresults |
400 |
} #if $numresults |
| 404 |
} |
401 |
} |
| 405 |
} # if $k !=0 |
402 |
} # if $k !=0 |
| 406 |
my $numberpending = $nremaining - 1; |
|
|
| 407 |
|
| 408 |
my @servers = (); |
| 409 |
foreach my $id (@id) { |
| 410 |
push(@servers,{id => $id}); |
| 411 |
} |
| 412 |
|
403 |
|
| 413 |
$template->param( |
404 |
$template->param( |
| 414 |
breeding_loop => \@breeding_loop, |
405 |
numberpending => $nremaining, |
| 415 |
server => $servername[$k], |
|
|
| 416 |
numberpending => $numberpending, |
| 417 |
current_page => $page, |
406 |
current_page => $page, |
| 418 |
servers => \@servers, |
|
|
| 419 |
total_pages => $total_pages, |
407 |
total_pages => $total_pages, |
| 420 |
show_nextbutton => $show_next?1:0, |
408 |
show_nextbutton => $show_next?1:0, |
| 421 |
show_prevbutton => $page!=1, |
409 |
show_prevbutton => $page!=1, |
| 422 |
); |
410 |
); |
| 423 |
$firstresult++; |
|
|
| 424 |
} # while nremaining |
411 |
} # while nremaining |
| 425 |
|
412 |
|
|
|
413 |
my @servers = (); |
| 414 |
foreach my $id (@id) { |
| 415 |
push @servers, {id => $id}; |
| 416 |
} |
| 426 |
$template->param( |
417 |
$template->param( |
| 427 |
breeding_loop => \@breeding_loop, |
418 |
breeding_loop => \@breeding_loop, |
| 428 |
numberpending => $nremaining > 0 ? $nremaining : 0, |
419 |
servers => \@servers, |
| 429 |
errconn => \@errconn |
420 |
errconn => \@errconn |
| 430 |
); |
421 |
); |
| 431 |
} |
422 |
} |
| 432 |
- |
|
|