From 35e6787a1ee0c86d2e8537819491b2792595b094 Mon Sep 17 00:00:00 2001
From: Dmitriy Simushev <simushevds@ossg.ru>
Date: Sun, 12 Feb 2012 18:31:31 +0000
Subject: [PATCH] Added company name and company URL to the template of a
 user's history email

---
 src/messenger/webim/locales/en/properties | 2 +-
 src/messenger/webim/locales/ru/properties | 2 +-
 src/messenger/webim/mail.php              | 4 +++-
 3 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/messenger/webim/locales/en/properties b/src/messenger/webim/locales/en/properties
index 5acdac0f..b0c4a54f 100644
--- a/src/messenger/webim/locales/en/properties
+++ b/src/messenger/webim/locales/en/properties
@@ -225,7 +225,7 @@ leftMenu.client_settings=Settings
 license.title=License
 localedirection=ltr
 localeid=English (en)
-mail.user.history.body=Hello {0}!\n\nYour chat history: \n\n{1}\n--- \nRegards,\nMibew
+mail.user.history.body=Hello {0}!\n\nYour chat history: \n\n{1}\n--- \nRegards,\n{2} and Mibew\n{3}
 mail.user.history.subject=Mibew: dialog history
 mailthread.close=Close...
 mailthread.enter_email=Enter your email:
diff --git a/src/messenger/webim/locales/ru/properties b/src/messenger/webim/locales/ru/properties
index 50d481d8..92853960 100644
--- a/src/messenger/webim/locales/ru/properties
+++ b/src/messenger/webim/locales/ru/properties
@@ -224,7 +224,7 @@ leftMenu.client_settings=
 license.title=��������
 localedirection=ltr
 localeid=Russian (ru)
-mail.user.history.body=�����������, {0}!\n\n�� ������ �������, �������� �������: \n\n{1}\n--- \n� ���������,\nMibew ����������
+mail.user.history.body=�����������, {0}!\n\n�� ������ �������, �������� ������� ������� � ���������� �������� {2}: \n\n{1}\n--- \n� ���������,\n{2} � Mibew ����������\n{3}
 mail.user.history.subject=����������: ������� �������
 mailthread.close=�������...
 mailthread.enter_email=������� ��� E-mail:
diff --git a/src/messenger/webim/mail.php b/src/messenger/webim/mail.php
index b1572e12..2a5aba4b 100644
--- a/src/messenger/webim/mail.php
+++ b/src/messenger/webim/mail.php
@@ -61,8 +61,10 @@ foreach( $output as $msg ) {
 	$history .= $msg;
 }
 
+loadsettings();
+
 $subject = getstring("mail.user.history.subject");
-$body = getstring2("mail.user.history.body", array($thread['userName'],$history) );
+$body = getstring2("mail.user.history.body", array($thread['userName'],$history,$settings['title'],$settings['hosturl']) );
 
 $link = connect();
 webim_mail($email, $webim_mailbox, $subject, $body, $link);