From c2197262df105cec4330aee25a5729dde8fb8988 Mon Sep 17 00:00:00 2001 From: Aleisha Amohia Date: Thu, 13 Jul 2017 04:57:54 +0000 Subject: [PATCH] Bug 18933: Allow OPAC messaging SMS number to be set to empty To test: 1) Ensure EnhancedMessagingPreferences is enabled and EnhancedMessagingPreferencesOPAC is set to Show 2) Log in to OPAC, go to your messaging tab 3) Set an SMS number if you havent already 4) Try to remove it (set to empty) 5) Notice that it says the number has been updated, but it has not been set to empty 6) Apply patch and refresh page 7) Attempt to set the number to empty 8) Confirm this is successful Sponsored-by: Catalyst IT --- opac/opac-messaging.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opac/opac-messaging.pl b/opac/opac-messaging.pl index 906d56f..0506eaa 100755 --- a/opac/opac-messaging.pl +++ b/opac/opac-messaging.pl @@ -56,7 +56,7 @@ my $messaging_options = C4::Members::Messaging::GetMessagingOptions(); if ( defined $query->param('modify') && $query->param('modify') eq 'yes' ) { my $sms = $query->param('SMSnumber'); my $sms_provider_id = $query->param('sms_provider_id'); - if ( defined $sms && ( $borrower->{'smsalertnumber'} // '' ) ne $sms + if ( ( $borrower->{'smsalertnumber'} // '' ) ne ( $sms // '' ) or ( $borrower->{sms_provider_id} // '' ) ne $sms_provider_id ) { ModMember( borrowernumber => $borrowernumber, -- 2.1.4