diff --git a/src/messenger/webim/images/opaway.gif b/src/messenger/webim/images/opaway.gif index e9056918..e45ad55d 100644 Binary files a/src/messenger/webim/images/opaway.gif and b/src/messenger/webim/images/opaway.gif differ diff --git a/src/messenger/webim/images/oponline.gif b/src/messenger/webim/images/oponline.gif index ea245356..d91cc875 100644 Binary files a/src/messenger/webim/images/oponline.gif and b/src/messenger/webim/images/oponline.gif differ diff --git a/src/messenger/webim/install/dbperform.php b/src/messenger/webim/install/dbperform.php index ec5dd729..9f5c3ae8 100644 --- a/src/messenger/webim/install/dbperform.php +++ b/src/messenger/webim/install/dbperform.php @@ -25,14 +25,14 @@ require_once('dbinfo.php'); function runsql($query, $link) { - $res = mysql_query($query, $link) or show_install_err(' Query failed: ' . mysql_error()); + $res = mysql_query($query, $link) or show_install_err(' Query failed: ' . mysql_error($link)); return $res; } $act = verifyparam("act", "/^(silentcreateall|createdb|ct|dt|addcolumns)$/"); $link = @mysql_connect($mysqlhost, $mysqllogin, $mysqlpass) - or show_install_err('Could not connect: ' . mysql_error($link)); + or show_install_err('Could not connect: ' . mysql_error()); if ($act == "silentcreateall") { mysql_query("CREATE DATABASE $mysqldb", $link) or show_install_err(' Query failed: ' . mysql_error($link)); @@ -79,12 +79,12 @@ if ($act == "silentcreateall") { if (in_array("${mysqlprefix}chatmessage.agentId", $absent)) { runsql("ALTER TABLE ${mysqlprefix}chatmessage ADD agentId int NOT NULL DEFAULT 0 AFTER ikind", $link); - runsql("update ${mysqlprefix}chatmessage,${mysqlprefix}chatoperator set agentId = operatorid where agentId = 0 AND ikind = 2 AND (vclocalename = tname OR vccommonname = tname)", $link); + runsql("update ${mysqlprefix}chatmessage, ${mysqlprefix}chatoperator set agentId = operatorid where agentId = 0 AND ikind = 2 AND (vclocalename = tname OR vccommonname = tname)", $link); } if (in_array("${mysqlprefix}chatthread.agentId", $absent)) { runsql("ALTER TABLE ${mysqlprefix}chatthread ADD agentId int NOT NULL DEFAULT 0 AFTER agentName", $link); - runsql("update ${mysqlprefix}chatthread,${mysqlprefix}chatoperator set agentId = operatorid where agentId = 0 AND (vclocalename = agentName OR vccommonname = agentName)", $link); + runsql("update ${mysqlprefix}chatthread, ${mysqlprefix}chatoperator set agentId = operatorid where agentId = 0 AND (vclocalename = agentName OR vccommonname = agentName)", $link); } if (in_array("${mysqlprefix}chatthread.agentTyping", $absent)) { @@ -164,4 +164,4 @@ if ($act == "silentcreateall") { mysql_close($link); header("Location: $webimroot/install/index.php"); exit; -?> \ No newline at end of file +?> diff --git a/src/messenger/webim/js/source/build.xml b/src/messenger/webim/js/source/build.xml index 5ba2f890..117d7283 100644 --- a/src/messenger/webim/js/source/build.xml +++ b/src/messenger/webim/js/source/build.xml @@ -1,5 +1,4 @@ -]> diff --git a/src/messenger/webim/js/source/chat.js b/src/messenger/webim/js/source/chat.js index 1a100780..1e565fe1 100644 --- a/src/messenger/webim/js/source/chat.js +++ b/src/messenger/webim/js/source/chat.js @@ -1,3 +1,11 @@ +/** + * @preserve This file is part of Mibew Messenger project. + * http://mibew.org + * + * Copyright (c) 2005-2011 Mibew Messenger Community + * License: http://mibew.org/license.php + */ + var FrameUtils = { getDocument: function(frm) { if (frm.contentDocument) { @@ -21,7 +29,7 @@ var FrameUtils = { doc.write(""); doc.close(); frm.onload = function() { - if( frm./**/myHtml ) { + if( frm.myHtml ) { FrameUtils.getDocument(frm).getElementById('content').innerHTML += frm.myHtml; FrameUtils.scrollDown(frm); } diff --git a/src/messenger/webim/js/source/common.js b/src/messenger/webim/js/source/common.js index 2506d6a3..3de6605f 100755 --- a/src/messenger/webim/js/source/common.js +++ b/src/messenger/webim/js/source/common.js @@ -1,9 +1,14 @@ -/* - * Mibew Messenger common script - * http://sourceforge.net/projects/webim +/** + * @preserve This file is part of Mibew Messenger project. + * http://mibew.org * - * Based on Prototype JavaScript framework, version 1.3.1 - * http://prototype.conio.net/ (c) 2005 Sam Stephenson + * Copyright (c) 2005-2011 Mibew Messenger Community + * License: http://mibew.org/license.php + */ + +/* + * common.js Based on Prototype JavaScript framework, version 1.3.1 + * http://prototype.conio.net/ (c) 2005 Sam Stephenson */ //- getEl, myAgent, myRealAgent @@ -18,12 +23,12 @@ var Class = { create: function() { return function() { - this./**/initialize./**/apply(this, arguments); + this.initialize.apply(this, arguments); }; }, inherit: function(child,parent,body) { - Object./**/extend(Object.extend(child.prototype, parent.prototype), body ); + Object.extend(Object.extend(child.prototype, parent.prototype), body ); } }; @@ -38,21 +43,21 @@ Object.prototype.extend = function(_object) { return Object.extend.apply(this, [this, _object]); }; -Function.prototype./**/bind = function(_object) { +Function.prototype.bind = function(_object) { var __method = this; return function() { return __method.apply(_object, arguments); } }; -Function.prototype./**/bindAsEventListener = function(_object) { +Function.prototype.bindAsEventListener = function(_object) { var __method = this; return function(event) { __method.call(_object, event || window.event); } }; -Number.prototype./**/toColorPart = function() { +Number.prototype.toColorPart = function() { var digits = this.toString(16); if (this < 16) return '0' + digits; return digits; @@ -81,9 +86,9 @@ PeriodicalExecuter.prototype = { initialize: function(callback, frequency) { this.callback = callback; this.frequency = frequency; - this./**/currentlyExecuting = false; + this.currentlyExecuting = false; - this./**/registerCallback(); + this.registerCallback(); }, registerCallback: function() { @@ -119,7 +124,7 @@ function findObj( id ) return x; } -if (!Array.prototype./**/push) { +if (!Array.prototype.push) { Array.prototype.push = function() { var startLength = this.length; for (var i = 0; i < arguments.length; i++) @@ -172,7 +177,7 @@ var Ajax = { emptyFunction: function() {} }; -Ajax./**/Base = function() {}; +Ajax.Base = function() {}; Ajax.Base.prototype = { setOptions: function(_options) { this._options = { @@ -198,8 +203,8 @@ Ajax.Base.prototype = { } }; -Ajax./**/Request = Class.create(); -Ajax.Request./**/Events = +Ajax.Request = Class.create(); +Ajax.Request.Events = ['Uninitialized', 'Loading', 'Loaded', 'Interactive', 'Complete']; Class.inherit( Ajax.Request, Ajax.Base, { diff --git a/src/messenger/webim/js/source/users.js b/src/messenger/webim/js/source/users.js index 5ba79a8c..bd006825 100644 --- a/src/messenger/webim/js/source/users.js +++ b/src/messenger/webim/js/source/users.js @@ -1,3 +1,11 @@ +/** + * @preserve This file is part of Mibew Messenger project. + * http://mibew.org + * + * Copyright (c) 2005-2011 Mibew Messenger Community + * License: http://mibew.org/license.php + */ + Ajax.PeriodicalUpdater = Class.create(); Class.inherit( Ajax.PeriodicalUpdater, Ajax.Base, { diff --git a/src/messenger/webim/libs/notify.php b/src/messenger/webim/libs/notify.php index 99de38b6..acbf2c61 100644 --- a/src/messenger/webim/libs/notify.php +++ b/src/messenger/webim/libs/notify.php @@ -2,7 +2,7 @@ /* * This file is part of Mibew Messenger project. * - * Copyright (c) 2005-2010 Mibew Messenger Community + * Copyright (c) 2005-2011 Mibew Messenger Community * All rights reserved. The contents of this file are subject to the terms of * the Eclipse Public License v1.0 which accompanies this distribution, and * is available at http://www.eclipse.org/legal/epl-v10.html diff --git a/src/messenger/webim/libs/operator.php b/src/messenger/webim/libs/operator.php old mode 100644 new mode 100755 index 205df16b..4f4f3240 --- a/src/messenger/webim/libs/operator.php +++ b/src/messenger/webim/libs/operator.php @@ -171,7 +171,8 @@ function has_online_operators($groupid = "") $link = connect(); $query = "select count(*) as total, min(unix_timestamp(CURRENT_TIMESTAMP)-unix_timestamp(dtmlastvisited)) as time from ${mysqlprefix}chatoperator"; if ($groupid) { - $query .= ", ${mysqlprefix}chatgroupoperator where groupid = $groupid and ${mysqlprefix}chatoperator.operatorid = ${mysqlprefix}chatgroupoperator.operatorid and istatus = 0"; + $query .= ", ${mysqlprefix}chatgroupoperator where groupid = $groupid and ${mysqlprefix}chatoperator.operatorid = " . + "${mysqlprefix}chatgroupoperator.operatorid and istatus = 0"; } else { $query .= " where istatus = 0"; } @@ -377,13 +378,16 @@ function get_groups($link, $checkaway) { global $mysqlprefix; $query = "select ${mysqlprefix}chatgroup.groupid as groupid, vclocalname, vclocaldescription" . - ", (SELECT count(*) from ${mysqlprefix}chatgroupoperator where ${mysqlprefix}chatgroup.groupid = ${mysqlprefix}chatgroupoperator.groupid) as inumofagents" . + ", (SELECT count(*) from ${mysqlprefix}chatgroupoperator where ${mysqlprefix}chatgroup.groupid = " . + "${mysqlprefix}chatgroupoperator.groupid) as inumofagents" . ", (SELECT min(unix_timestamp(CURRENT_TIMESTAMP)-unix_timestamp(dtmlastvisited)) as time " . - "from ${mysqlprefix}chatgroupoperator, ${mysqlprefix}chatoperator where istatus = 0 and ${mysqlprefix}chatgroup.groupid = ${mysqlprefix}chatgroupoperator.groupid " . + "from ${mysqlprefix}chatgroupoperator, ${mysqlprefix}chatoperator where istatus = 0 and " . + "${mysqlprefix}chatgroup.groupid = ${mysqlprefix}chatgroupoperator.groupid " . "and ${mysqlprefix}chatgroupoperator.operatorid = ${mysqlprefix}chatoperator.operatorid) as ilastseen" . ($checkaway ? ", (SELECT min(unix_timestamp(CURRENT_TIMESTAMP)-unix_timestamp(dtmlastvisited)) as time " . - "from ${mysqlprefix}chatgroupoperator, ${mysqlprefix}chatoperator where istatus <> 0 and ${mysqlprefix}chatgroup.groupid = ${mysqlprefix}chatgroupoperator.groupid " . + "from ${mysqlprefix}chatgroupoperator, ${mysqlprefix}chatoperator where istatus <> 0 and " . + "${mysqlprefix}chatgroup.groupid = ${mysqlprefix}chatgroupoperator.groupid " . "and ${mysqlprefix}chatgroupoperator.operatorid = ${mysqlprefix}chatoperator.operatorid) as ilastseenaway" : "" ) . @@ -401,4 +405,4 @@ function get_operator_groupids($operatorid) return $result; } -?> \ No newline at end of file +?> diff --git a/src/messenger/webim/operator/update.php b/src/messenger/webim/operator/update.php index 36fa9b84..066b5cc4 100644 --- a/src/messenger/webim/operator/update.php +++ b/src/messenger/webim/operator/update.php @@ -173,7 +173,7 @@ $showonline = verifyparam("showonline", "/^1$/", 0); $link = connect(); loadsettings_($link); -if (!isset($_SESSION['operatorgroups'])) { +if (!isset($_SESSION["${mysqlprefix}operatorgroups"])) { $_SESSION["${mysqlprefix}operatorgroups"] = get_operator_groupslist($operator['operatorid'], $link); } mysql_close($link); diff --git a/src/messenger/webim/operator/userhistory.php b/src/messenger/webim/operator/userhistory.php index 356d2761..20926b42 100644 --- a/src/messenger/webim/operator/userhistory.php +++ b/src/messenger/webim/operator/userhistory.php @@ -50,7 +50,7 @@ function threads_by_userid($userid) "from ${mysqlprefix}chatthread " . "where userid=\"$userid\" order by created DESC", $userid); - $result = mysql_query($query, $link) or die(' Query failed: ' . mysql_error($link) /*.": ".$query*/); + $result = mysql_query($query, $link) or die(' Query failed: ' . mysql_error($link)); $foundThreads = array(); while ($thread = mysql_fetch_array($result, MYSQL_ASSOC)) {