diff --git a/src/messenger/webim/install/dbinfo.php b/src/messenger/webim/install/dbinfo.php index 3bce3fa0..e93e8e91 100644 --- a/src/messenger/webim/install/dbinfo.php +++ b/src/messenger/webim/install/dbinfo.php @@ -22,6 +22,7 @@ $dbtables = array( "chatgroup" => array( "groupid" => "int NOT NULL auto_increment PRIMARY KEY", + "vcemail" => "varchar(64)", "vclocalname" => "varchar(64) NOT NULL", "vccommonname" => "varchar(64) NOT NULL", "vclocaldescription" => "varchar(1024) NOT NULL", @@ -69,6 +70,7 @@ $dbtables = array( "vcpassword" => "varchar(64) NOT NULL", "vclocalename" => "varchar(64) NOT NULL", "vccommonname" => "varchar(64) NOT NULL", + "vcemail" => "varchar(64)", "dtmlastvisited" => "datetime DEFAULT 0", "istatus" => "int DEFAULT 0", /* 0 - online, 1 - away */ "vcavatar" => "varchar(255)", @@ -113,9 +115,9 @@ $memtables = array(); $dbtables_can_update = array( "chatthread" => array("agentId", "userTyping", "agentTyping", "messageCount", "nextagent", "shownmessageid", "userid", "userAgent", "groupid"), "chatmessage" => array("agentId"), - "chatoperator" => array("vcavatar", "vcjabbername", "iperm", "istatus"), + "chatoperator" => array("vcavatar", "vcjabbername", "iperm", "istatus", "vcemail"), "chatban" => array(), - "chatgroup" => array(), + "chatgroup" => array("vcemail"), "chatgroupoperator" => array(), "chatresponses" => array(), ); diff --git a/src/messenger/webim/install/dbperform.php b/src/messenger/webim/install/dbperform.php index a9245b18..af003593 100644 --- a/src/messenger/webim/install/dbperform.php +++ b/src/messenger/webim/install/dbperform.php @@ -130,6 +130,10 @@ if ($act == "silentcreateall") { runsql("ALTER TABLE chatoperator ADD vcjabbername varchar(255)", $link); } + if( in_array("chatoperator.vcemail", $absent) ) { + runsql("ALTER TABLE chatoperator ADD vcemail varchar(64)", $link); + } + if( in_array("chatthread.groupid", $absent) ) { runsql("ALTER TABLE chatthread ADD groupid int references chatgroup(groupid)", $link); } @@ -138,6 +142,10 @@ if ($act == "silentcreateall") { runsql("ALTER TABLE chatthread ADD userAgent varchar(255)", $link); } + if( in_array("chatgroup.vcemail", $absent) ) { + runsql("ALTER TABLE chatgroup ADD vcemail varchar(64)", $link); + } + $res = mysql_query("select null from information_schema.statistics where table_name = 'chatmessage' and index_name = 'idx_agentid'", $link); if($res && mysql_num_rows($res) == 0) { runsql("ALTER TABLE chatmessage ADD INDEX idx_agentid (agentid)", $link); diff --git a/src/messenger/webim/libs/common.php b/src/messenger/webim/libs/common.php index 71fd8454..31ba5a02 100644 --- a/src/messenger/webim/libs/common.php +++ b/src/messenger/webim/libs/common.php @@ -552,7 +552,7 @@ function webim_mail($toaddr, $reply_to, $subject, $body) { @mail($toaddr, $real_subject, wordwrap(myiconv($webim_encoding, $mail_encoding, $body),70), $headers); } -$dbversion = '1.6.2'; +$dbversion = '1.6.3'; $settings = array( 'dbversion' => 0,