[Phpfreechat-svn] SF.net SVN: phpfreechat: [611] trunk/src/pfcglobalconfig.class.php
Status: Beta
Brought to you by:
kerphi
From: <ke...@us...> - 2006-06-17 09:54:13
|
Revision: 611 Author: kerphi Date: 2006-06-17 02:54:09 -0700 (Sat, 17 Jun 2006) ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=611&view=rev Log Message: ----------- 'nick' and 'isadmin' parameter are dynamic, don't reassign it in the synchronizeWithCache function Modified Paths: -------------- trunk/src/pfcglobalconfig.class.php Modified: trunk/src/pfcglobalconfig.class.php =================================================================== --- trunk/src/pfcglobalconfig.class.php 2006-06-17 08:01:09 UTC (rev 610) +++ trunk/src/pfcglobalconfig.class.php 2006-06-17 09:54:09 UTC (rev 611) @@ -38,7 +38,7 @@ // these parameters are static (cached) var $proxys = array("auth", "noflood"); - var $proxys_cfg = array("auth" => array(), + var $proxys_cfg = array("auth" => array(), "noflood" => array("limit"=>10,"delay"=>5)); var $title = ""; // default is _pfc("My Chat") var $channels = array(); // the default joined channels when opening the chat @@ -127,11 +127,6 @@ if ($this->data_public_path == "") $this->data_public_path = dirname(__FILE__)."/../data/public"; $this->synchronizeWithCache(); - - // the 'nick' is dynamic, it must not be cached - if (isset($params["nick"])) $this->nick = $params["nick"]; - // the 'isadmin' flag is dynamic, it must not be cached - if (isset($params["isadmin"])) $this->isadmin = $params["isadmin"]; } function &Instance( $params = array() ) @@ -399,7 +394,13 @@ $pfc_configvar = unserialize(file_get_contents($cachefile)); foreach($pfc_configvar as $key => $val) - $this->$key = $val; + { + // the 'nick' and 'isadmin' are dynamic parameters, it must not be cached + if ($key != "nick" && + $key != "isadmin") + $this->$key = $val; + } + return true; // synchronized } else This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |