Bug 36051: (QA follow-up): Use yaml_preference

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Kyle M Hall 2024-02-13 11:02:50 -05:00 committed by Katrin Fischer
parent 309e0af9bb
commit e739db4000
No known key found for this signature in database
GPG Key ID: 0EF6E2C03357A834
1 changed files with 3 additions and 9 deletions

View File

@ -114,15 +114,9 @@ sub send_sms {
# Extract additional SMS::Send arguments from the syspref
# Merge with any arguments from file with syspref taking precedence
my $sms_send_config_syspref = C4::Context->preference('SMSSendAdditionalOptions');
if ( $sms_send_config_syspref ) {
require YAML::XS;
$sms_send_config_syspref = "$sms_send_config_syspref\n\n";
my $yaml;
eval { $yaml = YAML::XS::Load(Encode::encode_utf8($yaml)); };
my %syspref_args = map { q{_} . $_ => $conf->{$_} } keys %$conf;
%args = ( %args, %syspref_args );
if ( C4::Context->preference('SMSSendAdditionalOptions') ) {
my $sms_send_config_syspref = C4::Context->yaml_preference('SMSSendAdditionalOptions');
%args = ( %args, %$sms_send_config_syspref ) if $sms_send_config_syspref;
}
eval {