From 50ebd608567a928a0edc8f88d1d06c1ac55a496c Mon Sep 17 00:00:00 2001 From: JT Smith Date: Thu, 20 Nov 2003 03:56:43 +0000 Subject: [PATCH] bugfix [ 845046 ] Forum notification - no int. message at all --- docs/changelog/5.x.x.txt | 1 + lib/WebGUI/Forum/UI.pm | 12 +++++++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/docs/changelog/5.x.x.txt b/docs/changelog/5.x.x.txt index e4b2582f5..16bc5d8b8 100644 --- a/docs/changelog/5.x.x.txt +++ b/docs/changelog/5.x.x.txt @@ -13,6 +13,7 @@ - Fixed bug [ 844961 ] DataForm: no deleting - Bugfix [ 822324 ]: From field not working in DataForm when mailing to group - Fixed typos in importCollateral.pl + - Fixed bug [ 845046 ] Forum notification - no int. message at all 5.5.1 diff --git a/lib/WebGUI/Forum/UI.pm b/lib/WebGUI/Forum/UI.pm index 4730936c0..0187fa75c 100644 --- a/lib/WebGUI/Forum/UI.pm +++ b/lib/WebGUI/Forum/UI.pm @@ -1371,14 +1371,16 @@ sub notifySubscribers { my %lang; foreach my $userId (keys %subscribers) { my $u = WebGUI::User->new($userId); - unless (exists $lang{$u->profileField("language")}) { + if ($lang{$u->profileField("language")}{message} eq "") { $lang{$u->profileField("language")}{var} = { - 'notify.subscription.message' => WebGUI::International::get(875,$u->profileField("language")) + 'notify.subscription.message' => WebGUI::International::get(875,"WebGUI",$u->profileField("language")) }; $lang{$u->profileField("language")}{var} = getPostTemplateVars($post, $thread, $forum, $caller, $lang{$u->profileField("language")}{var}); - $lang{$u->profileField("language")}{subject} = WebGUI::International::get(523,$u->profileField("language")); - $lang{$u->profileField("language")}{message} = WebGUI::Template::process(WebGUI::Template::get($forum->get("notificationTemplateId"),"Forum/Notification"), - $lang{$u->profileField("language")}{var}); + $lang{$u->profileField("language")}{subject} = WebGUI::International::get(523,"WebGUI",$u->profileField("language")); + $lang{$u->profileField("language")}{message} = WebGUI::Template::process( + WebGUI::Template::get($forum->get("notificationTemplateId"),"Forum/Notification"), + $lang{$u->profileField("language")}{var} + ); } WebGUI::MessageLog::addEntry($userId,"",$lang{$u->profileField("language")}{subject},$lang{$u->profileField("language")}{message}); }