Bugzilla – Attachment 156315 Details for
Bug 34737
Enhance SIP2SortBinMapping to support additional match conditions
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 34737: (follow-up) Code more defensively
Bug-34737-follow-up-Code-more-defensively.patch (text/plain), 1.21 KB, created by
Kyle M Hall (khall)
on 2023-09-28 11:01:28 UTC
(
hide
)
Description:
Bug 34737: (follow-up) Code more defensively
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2023-09-28 11:01:28 UTC
Size:
1.21 KB
patch
obsolete
>From 245d36cdab8a1231a6890ef63f57b61b0a0b7d25 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Mon, 25 Sep 2023 11:29:20 +0100 >Subject: [PATCH] Bug 34737: (follow-up) Code more defensively > >This patch adds some defense for errant preference lines, allowing for >empty lines, comment lines and even skipping easily identified malformed >lines. > >Signed-off-by: Toni Ford <Toni.Ford@newcastle.gov.uk> > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > C4/SIP/ILS/Transaction/Checkin.pm | 10 ++++++++++ > 1 file changed, 10 insertions(+) > >diff --git a/C4/SIP/ILS/Transaction/Checkin.pm b/C4/SIP/ILS/Transaction/Checkin.pm >index bf4a17720a5..0ddbaa8f213 100644 >--- a/C4/SIP/ILS/Transaction/Checkin.pm >+++ b/C4/SIP/ILS/Transaction/Checkin.pm >@@ -268,6 +268,16 @@ sub _get_sort_bin { > my $rule = 0; > RULE: foreach my $line (@lines) { > >+ # Skip empty lines and comments >+ next if ( $line =~ /^\s*($|#)/ ); >+ >+ # Skip malformed lines >+ my $count = () = $line =~ /\Q:/g; >+ if ( --$count % 3 ) { >+ warn "Malformed preference line found: '$line'"; >+ next; >+ } >+ > my $match = 0; > > # Split the line into fields >-- >2.30.2
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 34737
:
155328
|
155329
|
155330
|
155360
|
155361
|
155362
|
155663
|
155664
|
155665
|
155666
|
156147
|
156148
|
156170
|
156171
|
156172
|
156173
|
156174
|
156175
|
156176
|
156177
|
156314
| 156315