Bugzilla – Attachment 66256 Details for
Bug 19134
C4::SMS does not handle drivers with more than two names well
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED-OFF] Bug 19134: C4::SMS falils on long driver name
SIGNED-OFF-Bug-19134-C4SMS-falils-on-long-driver-n.patch (text/plain), 1.67 KB, created by
Aleisha Amohia
on 2017-08-20 23:31:55 UTC
(
hide
)
Description:
[SIGNED-OFF] Bug 19134: C4::SMS falils on long driver name
Filename:
MIME Type:
Creator:
Aleisha Amohia
Created:
2017-08-20 23:31:55 UTC
Size:
1.67 KB
patch
obsolete
>From 1f16746f3fde3bc889d974317dc1a431b0c8a31b Mon Sep 17 00:00:00 2001 >From: Magnus Enger <magnus@libriotech.no> >Date: Thu, 17 Aug 2017 22:48:07 +0200 >Subject: [PATCH] [SIGNED-OFF] Bug 19134: C4::SMS falils on long driver name > >Code in C4::SMS takes the part of the SMS::Send-driver that comes after >SMS::Send and tries to turn it into part of a path to a YAML file >that can contain additional parameters to SMS::Send. The current >code works for e.g. SMS::Send::A::B, but if there is one or more >extra names, it fails to turn :: into /. So we have: >SMS::Send::A::B -> SMS/Send/A/B >SMS::Send::A::B::C -> SMS/Send/A/B::C >This patch makes sure all occurrences of :: are turned into /, by >adding a "g" modifier at the end of the regex. > >Testing: >Testing this preperly would take a whole lot of setup for a very >small change. I would suggest that the following two oneliners >are enough to demonstrate that the change makes sense: >$ perl -e '$x = "a::b::c"; $x =~ s|::|/|; print $x, "\n";' >$ perl -e '$x = "a::b::c"; $x =~ s|::|/|g; print $x, "\n";' > >So: >- Check that the output of these oneliners make sense >- Check that the patch changes the code in a similar way to the > change from the first oneliner to the second. > >Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com> >--- > C4/SMS.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/C4/SMS.pm b/C4/SMS.pm >index 1043c0b..eff72b3 100644 >--- a/C4/SMS.pm >+++ b/C4/SMS.pm >@@ -92,7 +92,7 @@ sub send_sms { > my ($sent, $sender); > > my $subpath = $driver; >- $subpath =~ s|::|/|; >+ $subpath =~ s|::|/|g; > > my $sms_send_config = C4::Context->config('sms_send_config'); > my $conf_file = defined $sms_send_config >-- >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 19134
:
66151
|
66256
|
66463