Bugzilla – Attachment 58768 Details for
Bug 15702
Trim whitespace from patron details upon submission
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED-OFF] Bug 15702: Trim whitespace from fields with non-whitespace data
SIGNED-OFF-Bug-15702-Trim-whitespace-from-fields-w.patch (text/plain), 1.53 KB, created by
Owen Leonard
on 2017-01-10 17:02:35 UTC
(
hide
)
Description:
[SIGNED-OFF] Bug 15702: Trim whitespace from fields with non-whitespace data
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2017-01-10 17:02:35 UTC
Size:
1.53 KB
patch
obsolete
>From bf11ff02d000aa63a49537732ccca788bbb18bbd Mon Sep 17 00:00:00 2001 >From: Mark Tompsett <mtompset@hotmail.com> >Date: Tue, 10 Jan 2017 00:11:52 +0000 >Subject: [PATCH] [SIGNED-OFF] Bug 15702: Trim whitespace from fields with > non-whitespace data > >Since space may be a valid value for something, trimming what has >non-whitespace was done. > >TEST PLAN >--------- >1) Enter patron with spaces before, after, and both. >2) Apply patch. >3) Attempt to enter another patron with spaces before, after, and both. > -- attempting to edit after saving will demonstrate the spaces > were trimmed. >4) Attempt to edit the patron initially entered. > -- while there may be spaces before, after, and both initially, > after saving and trying to edit again, there will not be. >5) run koha qa test tools. > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> >--- > members/memberentry.pl | 3 +++ > 1 file changed, 3 insertions(+) > >diff --git a/members/memberentry.pl b/members/memberentry.pl >index 2fcaa72..d5d4df7 100755 >--- a/members/memberentry.pl >+++ b/members/memberentry.pl >@@ -176,6 +176,9 @@ if ( $op eq 'insert' || $op eq 'modify' || $op eq 'save' || $op eq 'duplicate' ) > if (defined $input->param($key)) { > $newdata{$key} = $input->param($key); > $newdata{$key} =~ s/\"/"/g unless $key eq 'borrowernotes' or $key eq 'opacnote'; >+ if (defined $newdata{$key} && $newdata{$key} =~ /\S/) { >+ $newdata{$key} =~ s/^\s*|\s*$//g; # trim whitespace if non-whitespace present. >+ } > } > } > >-- >2.1.4
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 15702
:
47424
|
58717
|
58768
|
62519
|
62520
|
62527
|
62528
|
62613
|
62614