Bug 22830: correct for loop in value_builder/unimarc_field_4XX.pl value_builder
In value_builder/unimarc_field_4XX.pl value_builder gets search results and runs a for loog with $i index. This loop is limiter with number of results par page, it should also be limited by number of results if lower that number of results par page. Same in cataloguing/value_builder/marc21_linking_section.pl. Test plan : 1) configure framework to use value builder 2) use value builder 3) perform a search with number of results lower than number of results per page 4) check number of records diplayed is OK 5) perform a search with number of results upper than number of results per page and check number of results is OK 6) you see number of results par page records and pagination link Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> (cherry picked from commit669864f4b0) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com> (cherry picked from commitb4858cac96) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
parent
013167d358
commit
08c7195c7a
|
|
@ -213,7 +213,7 @@ my $launcher = sub {
|
|||
}
|
||||
my @arrayresults;
|
||||
my @field_data = ($search);
|
||||
for ( my $i = 0 ; $i < $resultsperpage ; $i++ ) {
|
||||
for ( my $i = 0 ; $i < $total && $i < $resultsperpage ; $i++ ) {
|
||||
my $record = C4::Search::new_record_from_zebra( 'biblioserver', $results->[$i] );
|
||||
my $rechash = TransformMarcToKoha( $record );
|
||||
my $pos;
|
||||
|
|
|
|||
|
|
@ -399,7 +399,7 @@ sub plugin {
|
|||
my @field_data = ($search);
|
||||
for (
|
||||
my $i = 0 ;
|
||||
$i < $resultsperpage ;
|
||||
$i < $total && $i < $resultsperpage ;
|
||||
$i++
|
||||
)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue