[Phpfreechat-svn] SF.net SVN: phpfreechat: [584] trunk/themes/default/templates/pfcclient.js.tpl.ph
Status: Beta
Brought to you by:
kerphi
From: <ke...@us...> - 2006-06-15 11:56:49
|
Revision: 584 Author: kerphi Date: 2006-06-15 04:56:43 -0700 (Thu, 15 Jun 2006) ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=584&view=rev Log Message: ----------- Bug fix: when reloading the page, the previously joined channels were not joined again as expected. (second try) Modified Paths: -------------- trunk/themes/default/templates/pfcclient.js.tpl.php Modified: trunk/themes/default/templates/pfcclient.js.tpl.php =================================================================== --- trunk/themes/default/templates/pfcclient.js.tpl.php 2006-06-15 11:50:12 UTC (rev 583) +++ trunk/themes/default/templates/pfcclient.js.tpl.php 2006-06-15 11:56:43 UTC (rev 584) @@ -302,11 +302,13 @@ echo "this.sendRequest('".$cmd."', '".addslashes($ch)."');\n"; } // the last joined channel must be the last entry in the parameter list - for($i=0; $i<count($u->channels); $i++) + $i = 0; + foreach($u->channels as $ch) { - $ch = $u->channels[$i]["name"]; + $ch = $ch["name"]; $cmd = $i < count($u->channels)-1 ? "/join2" : "/join"; echo "this.sendRequest('".$cmd."', '".addslashes($ch)."');\n"; + $i++; } foreach($u->privmsg as $pv) echo "this.sendRequest('/privmsg', '".addslashes($pv["name"])."');\n"; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |