From c7c50621440abd94ac8a835bf289f1947429eb44 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 c00f328..9944a66 100644 --- a/C4/Letters.pm +++ b/C4/Letters.pm @@ -44,7 +44,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 7a4e158..2b0d2c5 100755 --- a/misc/cronjobs/thirdparty/TalkingTech_itiva_outbound.pl +++ b/misc/cronjobs/thirdparty/TalkingTech_itiva_outbound.pl @@ -157,8 +157,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.1.4