From 974cb2b3863ebd96be44a409aa58832aaff2140e Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 15 Feb 2016 16:26:53 +0000 Subject: [PATCH] Bug 9021: Save the provider even if the sms number is not modified Signed-off-by: Jonathan Druart Signed-off-by: Kyle M Hall --- opac/opac-messaging.pl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/opac/opac-messaging.pl b/opac/opac-messaging.pl index 3ea529e650..1a07f13cb4 100755 --- a/opac/opac-messaging.pl +++ b/opac/opac-messaging.pl @@ -50,11 +50,13 @@ my $messaging_options = C4::Members::Messaging::GetMessagingOptions(); if ( defined $query->param('modify') && $query->param('modify') eq 'yes' ) { my $sms = $query->param('SMSnumber'); - if ( defined $sms && ( $borrower->{'smsalertnumber'} // '' ) ne $sms ) { + my $sms_provider_id = $query->param('sms_provider_id'); + if ( defined $sms && ( $borrower->{'smsalertnumber'} // '' ) ne $sms + or ( $borrower->{sms_provider_id} // '' ) ne $sms_provider_id ) { ModMember( borrowernumber => $borrowernumber, smsalertnumber => $sms, - sms_provider_id => $query->param('sms_provider_id'), + sms_provider_id => $sms_provider_id, ); $borrower = C4::Members::GetMember( borrowernumber => $borrowernumber ); } -- 2.39.5