Bugzilla – Attachment 88117 Details for
Bug 21172
Warning in addbiblio.pl - Argument "01e" isn't numeric in numeric ne (!=)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21172: Remove warning from addbiblio.pl
Bug-21172-Remove-warning-from-addbibliopl.patch (text/plain), 1.89 KB, created by
Katrin Fischer
on 2019-04-16 21:04:17 UTC
(
hide
)
Description:
Bug 21172: Remove warning from addbiblio.pl
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2019-04-16 21:04:17 UTC
Size:
1.89 KB
patch
obsolete
>From ec831bd4287511c573a910d2b74a864deef52fc1 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 7 Aug 2018 17:06:41 -0300 >Subject: [PATCH] Bug 21172: Remove warning from addbiblio.pl > >Argument "01e" isn't numeric in numeric ne (!=) at >/home/vagrant/kohaclone/cataloguing/addbiblio.pl line 507. > >A tagfield can be 01e and so raise a warning is compared with == or != > >This patch also fixes few inconsistencies: >- tagfield for items.itemnumber must be retrieved with GetMarcFromKohaField >(to support other marcflavours) >- do not use $_ >- loop only once on $usedTagsLib > >Test plan: >For devs only, read the code and confirm the changes make sense. > >Signed-off-by: Liz Rea <wizzyrea@gmail.com> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > cataloguing/addbiblio.pl | 17 ++++++++++------- > 1 file changed, 10 insertions(+), 7 deletions(-) > >diff --git a/cataloguing/addbiblio.pl b/cataloguing/addbiblio.pl >index c4ed49da87..c9cef42d45 100755 >--- a/cataloguing/addbiblio.pl >+++ b/cataloguing/addbiblio.pl >@@ -489,16 +489,19 @@ sub build_tabs { > my @BIG_LOOP; > my %seen; > my @tab_data; # all tags to display >- >+ >+ my $max_num_tab=-1; >+ my ( $itemtag, $itemsubfield ) = GetMarcFromKohaField( "items.itemnumber", scalar $input->param('frameworkcode') ); > foreach my $used ( @$usedTagsLib ){ >+ > push @tab_data,$used->{tagfield} if not $seen{$used->{tagfield}}; > $seen{$used->{tagfield}}++; >- } >- >- my $max_num_tab=-1; >- foreach(@$usedTagsLib){ >- if($_->{tab} > -1 && $_->{tab} >= $max_num_tab && $_->{tagfield} != '995'){ # FIXME : MARC21 ? >- $max_num_tab = $_->{tab}; >+ >+ if ( $used->{tab} > -1 >+ && $used->{tab} >= $max_num_tab >+ && $used->{tagfield} ne $itemtag ) >+ { >+ $max_num_tab = $used->{tab}; > } > } > if($max_num_tab >= 9){ >-- >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 21172
:
77544
|
88092
| 88117 |
88118