From ce2d9fc1911f1656ae1c558849022230e6fb9090 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Fri, 2 Dec 2016 16:22:02 +0000 Subject: [PATCH] Bug 15969 - Fetch the message instead of substituting Signed-off-by: Nick Clemens --- C4/Letters.pm | 2 +- misc/cronjobs/thirdparty/TalkingTech_itiva_outbound.pl | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/C4/Letters.pm b/C4/Letters.pm index 77e3c7e..7cffb83 100644 --- a/C4/Letters.pm +++ b/C4/Letters.pm @@ -45,7 +45,7 @@ BEGIN { require Exporter; @ISA = qw(Exporter); @EXPORT = qw( - &GetLetters &GetLettersAvailableForALibrary &GetLetterTemplates &DelLetter &GetPreparedLetter &GetWrappedLetter &addalert &getalert &delalert &findrelatedto &SendAlerts &GetPrintMessages &GetMessageTransportTypes + &GetLetters &GetLettersAvailableForALibrary &GetLetterTemplates &DelLetter &GetPreparedLetter &GetWrappedLetter &addalert &getalert &delalert &findrelatedto &SendAlerts &GetPrintMessages &GetMessageTransportTypes GetMessage ); } diff --git a/misc/cronjobs/thirdparty/TalkingTech_itiva_outbound.pl b/misc/cronjobs/thirdparty/TalkingTech_itiva_outbound.pl index 6fbc7c9..3ab043f 100755 --- a/misc/cronjobs/thirdparty/TalkingTech_itiva_outbound.pl +++ b/misc/cronjobs/thirdparty/TalkingTech_itiva_outbound.pl @@ -158,8 +158,8 @@ foreach my $type (@types) { } if ( $use_tt ) { - $letter->{content} =~ s/__MESSAGE_ID__/$message_id/g; - print $OUT $letter->{content}; + my $message = GetMessage( $message_id ); + print $OUT $message->{content}; } else { print $OUT "\"$format\",\"$language\",\"$type\",\"$issues->{level}\",\"$issues->{cardnumber}\",\"$issues->{patron_title}\",\"$issues->{firstname}\","; print $OUT "\"$issues->{surname}\",\"$issues->{phone}\",\"$issues->{email}\",\"$library_code\","; -- 2.10.2