[Phpfreechat-svn] SF.net SVN: phpfreechat: [843] trunk/src/client/pfcclient.js
Status: Beta
Brought to you by:
kerphi
From: <ke...@us...> - 2006-10-25 12:13:26
|
Revision: 843 http://svn.sourceforge.net/phpfreechat/?rev=843&view=rev Author: kerphi Date: 2006-10-25 05:13:20 -0700 (Wed, 25 Oct 2006) Log Message: ----------- [en] Bug fix: sometimes the nicknames list was blank [2h30] [fr] Bug fix : quelques fois la liste des pseudo n'?\195?\169tait pas affich?\195?\169 [2h30] Modified Paths: -------------- trunk/src/client/pfcclient.js Modified: trunk/src/client/pfcclient.js =================================================================== --- trunk/src/client/pfcclient.js 2006-10-25 11:26:01 UTC (rev 842) +++ trunk/src/client/pfcclient.js 2006-10-25 12:13:20 UTC (rev 843) @@ -475,22 +475,34 @@ getAllUserMeta: function(nickid) { - return this.usermeta[nickid]; + if (nickid && this.usermeta[nickid]) + return this.usermeta[nickid]; + else + return null; }, getUserMeta: function(nickid, key) { - return this.usermeta[nickid][key]; + if (nickid && key && this.usermeta[nickid] && this.usermeta[nickid][key]) + return this.usermeta[nickid][key]; + else + return ''; }, getAllChanMeta: function(chanid) { - return this.chanmeta[chanid]; + if (chanid && this.chanmeta[chanid]) + return this.chanmeta[chanid]; + else + return null; }, getChanMeta: function(chanid, key) { - return this.chanmeta[chanid][key]; + if (chanid && key && this.chanmeta[chanid] && this.chanmeta[chanid][key]) + return this.chanmeta[chanid][key]; + else + return ''; }, doSendMessage: function() @@ -901,7 +913,6 @@ for (var i=0; i<nickidlst.length; i++) { var nickid = nickidlst[i]; - var li = this.buildNickItem(nickid); li.setAttribute('class', 'pfc_nickitem_'+nickid); li.setAttribute('className', 'pfc_nickitem_'+nickid); // IE6 @@ -1018,6 +1029,7 @@ { var nick = this.getUserMeta(nickid, 'nick'); var isadmin = this.getUserMeta(nickid, 'isadmin'); + if (isadmin == '') isadmin = false; var li = document.createElement('li'); var img = document.createElement('img'); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |