[Phpfreechat-svn] SF.net SVN: phpfreechat: [654] trunk/src/pfcglobalconfig.class.php
Status: Beta
Brought to you by:
kerphi
From: <ke...@us...> - 2006-07-12 12:16:47
|
Revision: 654 Author: kerphi Date: 2006-07-12 05:16:41 -0700 (Wed, 12 Jul 2006) ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=654&view=rev Log Message: ----------- Bug fix: the 'nick' parameter was broken Modified Paths: -------------- trunk/src/pfcglobalconfig.class.php Modified: trunk/src/pfcglobalconfig.class.php =================================================================== --- trunk/src/pfcglobalconfig.class.php 2006-07-12 11:50:50 UTC (rev 653) +++ trunk/src/pfcglobalconfig.class.php 2006-07-12 12:16:41 UTC (rev 654) @@ -100,6 +100,7 @@ var $debugurl = ""; var $debug = false; var $debugxajax = false; + var $dyn_params = array("nick","isadmin","islocked","admins"); function pfcGlobalConfig( $params = array() ) { @@ -156,6 +157,10 @@ } } + // load dynamic parameter even if the config exists in the cache + foreach ( $this->dyn_params as $dp ) + $this->$dp = $params[$dp]; + // now load or save the configuration in the cache $this->synchronizeWithCache(); } @@ -464,12 +469,11 @@ // if a cache file exists, remove the lock file because config has been succesfully stored if (file_exists($cachefile_lock)) @unlink($cachefile_lock); - $dyn_params = array("nick","isadmin","islocked","admins"); $pfc_configvar = unserialize(file_get_contents($cachefile)); foreach($pfc_configvar as $key => $val) { // the dynamics parameters must not be cached - if (!in_array($key,$dyn_params)) + if (!in_array($key,$this->dyn_params)) $this->$key = $val; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |