Bugzilla – Attachment 128911 Details for
Bug 18320
patroncards/edit-layout.pl raises warnings
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18320: Remove patroncards/edit-layout.pl warnings
Bug-18320-Remove-patroncardsedit-layoutpl-warnings.patch (text/plain), 2.49 KB, created by
Tomás Cohen Arazi (tcohen)
on 2021-12-23 20:56:16 UTC
(
hide
)
Description:
Bug 18320: Remove patroncards/edit-layout.pl warnings
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2021-12-23 20:56:16 UTC
Size:
2.49 KB
patch
obsolete
>From 4ac3ca0f493ff9ed10990fb5824eaa3ae2bca51b Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Thu, 23 Mar 2017 09:51:09 -0300 >Subject: [PATCH] Bug 18320: Remove patroncards/edit-layout.pl warnings >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >This patch removes warnings generated by the script itself. > >To test: >- Go to Tools ⺠Patron card creator ⺠Manage layouts and > Tools ⺠Patron card creator ⺠New layout >- Add a new layout, adit existing. >=> FAIL: Warnings logged by edit-layout.pl >- Apply this patch >- Go to Tools ⺠Patron card creator ⺠Manage layouts and > Tools ⺠Patron card creator ⺠New layout >- Add a new layout, adit existing. >=> SUCCESS: No warnings generated by edit-layout.pl >- Sign off :-D > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > patroncards/edit-layout.pl | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > >diff --git a/patroncards/edit-layout.pl b/patroncards/edit-layout.pl >index 22ef6b9371..233bfac349 100755 >--- a/patroncards/edit-layout.pl >+++ b/patroncards/edit-layout.pl >@@ -179,14 +179,14 @@ elsif ($op eq 'save') { > my $image_select = 0; > my $field_enabled = 0; > CGI_PARAMS: >- foreach my $parameter ($cgi->param()) { # parse the field values and build a hash of the layout for conversion to xml and storage in the db >+ foreach my $parameter ($cgi->multi_param()) { # parse the field values and build a hash of the layout for conversion to xml and storage in the db > if ($parameter =~ m/^field_([0-9])_(.*)$/) { > my $field_number = $1; > my $field_data = $2; > $field_enabled = $field_number if $field_data eq 'enable'; > next CGI_PARAMS unless $field_number == $field_enabled; > if ($field_data eq 'text') { >- push @$text_lines, $cgi->param($parameter); >+ push @$text_lines, $cgi->multi_param($parameter); > if ($array_index <= 0) { > $array_index++; > } >@@ -200,7 +200,7 @@ elsif ($op eq 'save') { > } > elsif ($parameter =~ m/^barcode_(.*)$/) { > $field_enabled = $1 if $1 eq 'print'; >- next CGI_PARAMS unless $field_enabled eq 'print'; >+ next CGI_PARAMS unless defined $field_enabled && $field_enabled eq 'print'; > $layout->{'barcode'}->{$1} = $cgi->param($parameter); > } > elsif ($parameter =~m/^image_([0-9])_(.*)$/) { >-- >2.32.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 18320
:
61532
|
84403
|
128911
|
128912
|
129193
|
129194