diff --git a/src/messenger/webim/locales/en/properties b/src/messenger/webim/locales/en/properties
index 07ca1acb..b316c015 100644
--- a/src/messenger/webim/locales/en/properties
+++ b/src/messenger/webim/locales/en/properties
@@ -189,7 +189,9 @@ my_settings.error.password_match=Entered passwords do not match
no_such_operator=No such operator
operator.groups.title=Operator groups
operator.groups.intro=Choose groups according to operator skills.
-operator.group.no_description=<no description>
+operator.group.no_description=<no description>
+page.analysis.search.head_browser=Browser
+page.analysis.search.head_group=Group
page.analysis.search.head_host=Visitor's address
page.analysis.search.head_messages=Visitor's messages
page.analysis.search.head_name=Name
diff --git a/src/messenger/webim/operator/history.php b/src/messenger/webim/operator/history.php
index fc96c4cb..f83d23bf 100644
--- a/src/messenger/webim/operator/history.php
+++ b/src/messenger/webim/operator/history.php
@@ -26,11 +26,20 @@ $query = isset($_GET['q']) ? myiconv(getoutputenc(), $webim_encoding, $_GET['q']
if($query !== false) {
$link = connect();
+
+ $result = mysql_query("select chatgroup.groupid as groupid, vclocalname ".
+ "from chatgroup order by vclocalname", $link);
+ $groupName = array();
+ while ($group = mysql_fetch_array($result, MYSQL_ASSOC)) {
+ $groupName[$group['groupid']] = $group['vclocalname'];
+ }
+ $page['groupName'] = $groupName;
+ mysql_free_result($result);
$result = mysql_query(
"select DISTINCT unix_timestamp(chatthread.dtmcreated) as created, ".
"unix_timestamp(chatthread.dtmmodified) as modified, chatthread.threadid, ".
- "chatthread.remote, chatthread.agentName, chatthread.userName, ".
+ "chatthread.remote, chatthread.agentName, chatthread.userName, groupid, ".
"messageCount as size ".
"from chatthread, chatmessage ".
"where chatmessage.threadid = chatthread.threadid and ".
diff --git a/src/messenger/webim/operator/threadprocessor.php b/src/messenger/webim/operator/threadprocessor.php
index 772bacbd..fed5c555 100644
--- a/src/messenger/webim/operator/threadprocessor.php
+++ b/src/messenger/webim/operator/threadprocessor.php
@@ -21,11 +21,23 @@ $operator = check_login();
$page = array();
+function thread_info($id) {
+ $link = connect();
+ $thread = select_one_row("select userName,agentName,remote,userAgent,".
+ "unix_timestamp(dtmmodified) as modified, unix_timestamp(dtmcreated) as created,".
+ "vclocalname as groupName ".
+ "from chatthread left join chatgroup on chatthread.groupid = chatgroup.groupid ".
+ "where threadid = ". $id, $link );
+ mysql_close($link);
+ return $thread;
+}
+
+
if( isset($_GET['threadid'])) {
$threadid = verifyparam( "threadid", "/^(\d{1,9})?$/", "");
$lastid = -1;
$page['threadMessages'] = get_messages($threadid,"html",false,$lastid);
- $page['thread'] = thread_by_id($threadid);
+ $page['thread'] = thread_info($threadid);
}
prepare_menu($operator, false);
diff --git a/src/messenger/webim/view/thread_log.php b/src/messenger/webim/view/thread_log.php
index 4c5ca278..750ee3cf 100644
--- a/src/messenger/webim/view/thread_log.php
+++ b/src/messenger/webim/view/thread_log.php
@@ -41,6 +41,24 @@ $chatthread = $page['thread'];
+