Bug 9105: Second housekeeping followup
Removing some unused variables. Restoring timeout parameter that was only used in cataloging. Restoring copyrightdate and editionstatement in row data for template. Small adjustment at the end of the while loop with template vars. Discovered while doing so, that the paging feature needs some further corrections; will propose a patch under a separate report. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Paul Poulain <paul.poulain@biblibre.com> Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
This commit is contained in:
parent
e201d55c21
commit
3f73f9228b
1 changed files with 9 additions and 16 deletions
|
@ -244,11 +244,9 @@ sub Z3950Search {
|
||||||
my $lccall= $pars->{lccall};
|
my $lccall= $pars->{lccall};
|
||||||
my $controlnumber= $pars->{controlnumber};
|
my $controlnumber= $pars->{controlnumber};
|
||||||
|
|
||||||
|
|
||||||
my $show_next = 0;
|
my $show_next = 0;
|
||||||
my $total_pages = 0;
|
my $total_pages = 0;
|
||||||
|
|
||||||
my $noconnection;
|
|
||||||
my $attr = '';
|
my $attr = '';
|
||||||
my $term;
|
my $term;
|
||||||
my $host;
|
my $host;
|
||||||
|
@ -259,7 +257,6 @@ sub Z3950Search {
|
||||||
my @encoding;
|
my @encoding;
|
||||||
my @results;
|
my @results;
|
||||||
my $count;
|
my $count;
|
||||||
my $toggle;
|
|
||||||
my $record;
|
my $record;
|
||||||
my $oldbiblio;
|
my $oldbiblio;
|
||||||
my @serverhost;
|
my @serverhost;
|
||||||
|
@ -329,6 +326,7 @@ sub Z3950Search {
|
||||||
$option1->option( 'password', $server->{password} )
|
$option1->option( 'password', $server->{password} )
|
||||||
if $server->{password};
|
if $server->{password};
|
||||||
$option1->option( 'preferredRecordSyntax', $server->{syntax} );
|
$option1->option( 'preferredRecordSyntax', $server->{syntax} );
|
||||||
|
$option1->option( 'timeout', $server->{timeout} ) if $server->{timeout};
|
||||||
$oConnection[$s] = create ZOOM::Connection($option1);
|
$oConnection[$s] = create ZOOM::Connection($option1);
|
||||||
$oConnection[$s]->connect( $server->{host}, $server->{port} );
|
$oConnection[$s]->connect( $server->{host}, $server->{port} );
|
||||||
$serverhost[$s] = $server->{host};
|
$serverhost[$s] = $server->{host};
|
||||||
|
@ -338,7 +336,6 @@ sub Z3950Search {
|
||||||
} ## while fetch
|
} ## while fetch
|
||||||
} # foreach
|
} # foreach
|
||||||
my $nremaining = $s;
|
my $nremaining = $s;
|
||||||
my $firstresult = 1;
|
|
||||||
|
|
||||||
for ( my $z = 0 ; $z < $s ; $z++ ) {
|
for ( my $z = 0 ; $z < $s ; $z++ ) {
|
||||||
$oResult[$z] = $oConnection[$z]->search_pqf($query);
|
$oResult[$z] = $oConnection[$z]->search_pqf($query);
|
||||||
|
@ -392,6 +389,8 @@ sub Z3950Search {
|
||||||
$row_data{lccn} = $oldbiblio->{lccn};
|
$row_data{lccn} = $oldbiblio->{lccn};
|
||||||
$row_data{title} = $oldbiblio->{title};
|
$row_data{title} = $oldbiblio->{title};
|
||||||
$row_data{author} = $oldbiblio->{author};
|
$row_data{author} = $oldbiblio->{author};
|
||||||
|
$row_data{date} = $oldbiblio->{copyrightdate};
|
||||||
|
$row_data{edition} = $oldbiblio->{editionstatement};
|
||||||
$row_data{breedingid} = $breedingid;
|
$row_data{breedingid} = $breedingid;
|
||||||
$row_data{biblionumber} = $biblionumber;
|
$row_data{biblionumber} = $biblionumber;
|
||||||
push( @breeding_loop, \%row_data );
|
push( @breeding_loop, \%row_data );
|
||||||
|
@ -403,29 +402,23 @@ sub Z3950Search {
|
||||||
} #if $numresults
|
} #if $numresults
|
||||||
}
|
}
|
||||||
} # if $k !=0
|
} # if $k !=0
|
||||||
my $numberpending = $nremaining - 1;
|
|
||||||
|
|
||||||
my @servers = ();
|
|
||||||
foreach my $id (@id) {
|
|
||||||
push(@servers,{id => $id});
|
|
||||||
}
|
|
||||||
|
|
||||||
$template->param(
|
$template->param(
|
||||||
breeding_loop => \@breeding_loop,
|
numberpending => $nremaining,
|
||||||
server => $servername[$k],
|
|
||||||
numberpending => $numberpending,
|
|
||||||
current_page => $page,
|
current_page => $page,
|
||||||
servers => \@servers,
|
|
||||||
total_pages => $total_pages,
|
total_pages => $total_pages,
|
||||||
show_nextbutton => $show_next?1:0,
|
show_nextbutton => $show_next?1:0,
|
||||||
show_prevbutton => $page!=1,
|
show_prevbutton => $page!=1,
|
||||||
);
|
);
|
||||||
$firstresult++;
|
|
||||||
} # while nremaining
|
} # while nremaining
|
||||||
|
|
||||||
|
my @servers = ();
|
||||||
|
foreach my $id (@id) {
|
||||||
|
push @servers, {id => $id};
|
||||||
|
}
|
||||||
$template->param(
|
$template->param(
|
||||||
breeding_loop => \@breeding_loop,
|
breeding_loop => \@breeding_loop,
|
||||||
numberpending => $nremaining > 0 ? $nremaining : 0,
|
servers => \@servers,
|
||||||
errconn => \@errconn
|
errconn => \@errconn
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue