View | Details | Raw Unified | Return to bug 9105
Collapse All | Expand All

(-)a/C4/Breeding.pm (-17 / +9 lines)
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 392-397 sub Z3950Search { Link Here
392
                            $row_data{lccn}         = $oldbiblio->{lccn};
389
                            $row_data{lccn}         = $oldbiblio->{lccn};
393
                            $row_data{title}        = $oldbiblio->{title};
390
                            $row_data{title}        = $oldbiblio->{title};
394
                            $row_data{author}       = $oldbiblio->{author};
391
                            $row_data{author}       = $oldbiblio->{author};
392
                            $row_data{date}         = $oldbiblio->{copyrightdate};
393
                            $row_data{edition}      = $oldbiblio->{editionstatement};
395
                            $row_data{breedingid}   = $breedingid;
394
                            $row_data{breedingid}   = $breedingid;
396
                            $row_data{biblionumber} = $biblionumber;
395
                            $row_data{biblionumber} = $biblionumber;
397
                            push( @breeding_loop, \%row_data );
396
                            push( @breeding_loop, \%row_data );
Lines 403-431 sub Z3950Search { Link Here
403
                }    #if $numresults
402
                }    #if $numresults
404
            }
403
            }
405
        }    # if $k !=0
404
        }    # if $k !=0
406
        my $numberpending = $nremaining - 1;
407
408
        my @servers = ();
409
        foreach my $id (@id) {
410
            push(@servers,{id => $id});
411
        }
412
405
413
        $template->param(
406
        $template->param(
414
            breeding_loop => \@breeding_loop,
407
            numberpending => $nremaining,
415
            server        => $servername[$k],
416
            numberpending => $numberpending,
417
            current_page => $page,
408
            current_page => $page,
418
            servers => \@servers,
419
            total_pages => $total_pages,
409
            total_pages => $total_pages,
420
            show_nextbutton => $show_next?1:0,
410
            show_nextbutton => $show_next?1:0,
421
            show_prevbutton => $page!=1,
411
            show_prevbutton => $page!=1,
422
        );
412
        );
423
        $firstresult++;
424
    } # while nremaining
413
    } # while nremaining
425
414
415
    my @servers = ();
416
    foreach my $id (@id) {
417
        push @servers, {id => $id};
418
    }
426
    $template->param(
419
    $template->param(
427
        breeding_loop => \@breeding_loop,
420
        breeding_loop => \@breeding_loop,
428
        numberpending => $nremaining > 0 ? $nremaining : 0,
421
        servers => \@servers,
429
        errconn       => \@errconn
422
        errconn       => \@errconn
430
    );
423
    );
431
}
424
}
432
- 

Return to bug 9105