Bugzilla – Attachment 92259 Details for
Bug 22830
correct for loop in value_builder/unimarc_field_4XX.pl value_builder
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22830: correct for loop in value_builder/unimarc_field_4XX.pl value_builder
Bug-22830-correct-for-loop-in-valuebuilderunimarcf.patch (text/plain), 2.43 KB, created by
Marcel de Rooy
on 2019-08-16 07:19:36 UTC
(
hide
)
Description:
Bug 22830: correct for loop in value_builder/unimarc_field_4XX.pl value_builder
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2019-08-16 07:19:36 UTC
Size:
2.43 KB
patch
obsolete
>From efb7085f559e4f6e9dd7aad4a86c8923e0fe1c2f Mon Sep 17 00:00:00 2001 >From: Fridolin Somers <fridolin.somers@biblibre.com> >Date: Thu, 2 May 2019 14:20:45 +0200 >Subject: [PATCH] Bug 22830: correct for loop in > value_builder/unimarc_field_4XX.pl value_builder >Content-Type: text/plain; charset=utf-8 > >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> >--- > cataloguing/value_builder/marc21_linking_section.pl | 2 +- > cataloguing/value_builder/unimarc_field_4XX.pl | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > >diff --git a/cataloguing/value_builder/marc21_linking_section.pl b/cataloguing/value_builder/marc21_linking_section.pl >index 0fb9b7bcfe..f537516c04 100755 >--- a/cataloguing/value_builder/marc21_linking_section.pl >+++ b/cataloguing/value_builder/marc21_linking_section.pl >@@ -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; >diff --git a/cataloguing/value_builder/unimarc_field_4XX.pl b/cataloguing/value_builder/unimarc_field_4XX.pl >index c51434954c..5b95f14581 100755 >--- a/cataloguing/value_builder/unimarc_field_4XX.pl >+++ b/cataloguing/value_builder/unimarc_field_4XX.pl >@@ -399,7 +399,7 @@ sub plugin { > my @field_data = ($search); > for ( > my $i = 0 ; >- $i < $resultsperpage ; >+ $i < $total && $i < $resultsperpage ; > $i++ > ) > { >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 22830
:
89232
|
91896
|
91897
| 92259