From 79b37c720f5f20a3bcf93e59643b780226f99a6b Mon Sep 17 00:00:00 2001 From: Evgeny Gryaznov Date: Thu, 7 Apr 2011 00:31:22 +0200 Subject: [PATCH] fix groupids in visitors update; fix DB error reporting in installer; smaller opaway/oponline image --- src/messenger/webim/images/opaway.gif | Bin 3480 -> 905 bytes src/messenger/webim/images/oponline.gif | Bin 3481 -> 906 bytes src/messenger/webim/install/dbperform.php | 10 ++--- src/messenger/webim/js/source/build.xml | 1 - src/messenger/webim/js/source/chat.js | 10 ++++- src/messenger/webim/js/source/common.js | 37 +++++++++++-------- src/messenger/webim/js/source/users.js | 8 ++++ src/messenger/webim/libs/notify.php | 2 +- src/messenger/webim/libs/operator.php | 14 ++++--- src/messenger/webim/operator/update.php | 2 +- src/messenger/webim/operator/userhistory.php | 2 +- 11 files changed, 55 insertions(+), 31 deletions(-) mode change 100644 => 100755 src/messenger/webim/libs/operator.php diff --git a/src/messenger/webim/images/opaway.gif b/src/messenger/webim/images/opaway.gif index e905691806859ad59efecf5a67cf5141a20fcaaf..e45ad55d14ed690d0de1e787a847d637592a20d1 100644 GIT binary patch delta 237 zcmbOs-O0}5?&)S>naIPy!|>g9BG19eUCi>6CooG=9S1Oq)F}RBVPs&iWzb;&0+5vq z9BB;I9B&MrT>6Ei{CGqvk`A{C=@uPeP%L0*6E`k6lF_K_&eh1OlF^XJ+|I>kmBC?C zaDa)M&pc(#3dZDwMh?lC1sR2ljvQiT(a?z5vEe{7w@as*z=V>8O{~7+Y90ci4?EE1p9jh>PPTB;+O~<)*Om^71wd<4e;+O9fF) zYnC*Jh7J_l4_1TGV)fB7(pZ`1`#Qz>2BZ1*W%Fm&AOIjH0Eq)g20-%iko5p51;`F# zWG6r>HIQ0>)R`mo06C?8RgTdAN9(o0(exK=JhD@l#L^FB0G3gno(Vw%TcL;!Yw?!=gH;p|5=yVbN4 zgWq-Eoxkf+8vtO;qRH9zT^CyoK<6d^6z+f5Y3~C-G9Q4B>pwh@oM^`+2!&~Orl#51 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(mvi^oz2tkZ?`Pegdyw}K_ps=Z)T7GBDvuj}G5Doz z%zEtXxa;`fli(*0CfE}%{+02s&#{yFPsN{BPN`2dJ+pXrX4-xF#`9&*Ctsw!n0s09 ztMsqCU+KR(`J2;kgELEKCSMC)BfpotQG9dg?ZUS`vjMY@-=(~pdtdZH@x$SdjF0`F z!aq&TWq&4ouKL5^kM4P&`G-gf`pY3YjiWzJ==m8RbYXA1jm)ff&CP(E`^nx%RVdmj zG0~P$M>Y){$j24p<9eGIb~Q6;?d=Skd(C)dIZZ|R=1fClc`VJ_#|I}VpPx^J3w=oB Qtv*EJc9$I$OlM&KZ%3Vs00000 diff --git a/src/messenger/webim/images/oponline.gif b/src/messenger/webim/images/oponline.gif index ea245356e451d1cece0a1ebcca6452606544de94..d91cc8751d1a8cd8e20de65484e13f09d10321cc 100644 GIT binary patch delta 238 zcmbO!-Nnx1?&)S>naIPy!|>f^BG19ez05L`CooIW0E^cu{$ycfV6b7(VE_V_La2!vl5>)wCxI5+AYk2{YL?OlUaN)+eH0a7AE- zqDu?6Ud|B%LFc0m{K{$>5e175HnvLGloV{(@PbXqb#mH`2_=baf|9fN&Ip8R@vjPH JWn*Em1^};cN@4&2 literal 3481 zcmbW4XH-+!7J$#aX#^5l0@4Y+NmU>;DWM8TuYwSg5JCwMx)l*oih_tp69usV3YMXW z4G~0?K~Vt}bwC~>>Nq%x4K?pZ)>7VEYi8bh`^R42*=O&2_TBrOyUulSbEaC*34j1b zz;`JEpcH@_0QkVVT;KYnvgcXzHK(lt5NQesYo9rsBkO zUEAyCzJ&|dK3u&1=`x?sU(9+@t9(M^0k8%t{4Z`any-t4i?NZh2>=9F4-PjG76%}K zo61A%l;Dt13T_C%01vRh7yvpWCCSsz*o&4eT_rMo)chTjo z&-boD(t|&3KZAeT66*n=&LhPs`Du%)1fXL(05T7M+SCsLAeIY2`>iD}BrVu6F{!CZ zmWGBI85sr~7Q;YL(I4`U4nI8q8kVeQAXx85@hFb0XnIO>i6e_Kt%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z$THWhTaOeBESGhm+(DmSXba}#_t3CI6K3b!(hP$T23wXJC?e%)> zt>vBUeclJ_i zQy%k*L*rC&-o(1b9*q4E=M{G>jvpTs-cx=3tg?R({sZdgt{= zHlQ~!HuP*%*|>G%c3dybb%l&&wG+UvQuy^K;;Q1)(L#J+*@mE{Nb3-3?cKT+XP z(OIcpSyK6>DyC|r+M&9&MxiFZ=EDKzfjhN!wJiq~4;CK$e28=Cew|BQd%b3T`C;tg z^ux~@0vq~|P>(bol{;E^l>hY@_t?a7-{ZZF=8cU_3Qfh$aC2Jo?1``ww@*5r>}=6* zscV&PEj$HIrJZ_lI`Z`B8TT_iXQ^jfe$n`)rj68A&@cT>pXk=#o8CsFOyy_ zyvqAs;`f@@+OL24!|sp4x!}3!H@r9eKa1YVzCHGC<-4AF@A)V16W%X;DEKJ*@%Sg| zr~c1DpJx^_zTm!8eAW5d_09d;BYpz%*CDu#BR@^Z{Tb_LS6k9=M3K|ESu%F0o4HHM zz)XBI1c?kTk{+vi{pto{wt)PMp2 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)) {