[Phpfreechat-svn] SF.net SVN: phpfreechat: [1222] trunk/src/pfcglobalconfig.class.php
Status: Beta
Brought to you by:
kerphi
|
From: <ke...@us...> - 2007-11-26 13:08:08
|
Revision: 1222
http://phpfreechat.svn.sourceforge.net/phpfreechat/?rev=1222&view=rev
Author: kerphi
Date: 2007-11-26 05:08:10 -0800 (Mon, 26 Nov 2007)
Log Message:
-----------
Add the dyn_params parameter. It makes possible to disable cache for a list of parameters.
Modified Paths:
--------------
trunk/src/pfcglobalconfig.class.php
Modified: trunk/src/pfcglobalconfig.class.php
===================================================================
--- trunk/src/pfcglobalconfig.class.php 2007-11-26 09:49:06 UTC (rev 1221)
+++ trunk/src/pfcglobalconfig.class.php 2007-11-26 13:08:10 UTC (rev 1222)
@@ -598,6 +598,17 @@
*/
var $get_ip_from_xforwardedfor = false;
+ /**
+ * <p>Most of the chat parameters are stored in a internal cache for performances issues.
+ * It means that for all the clients the chat will have the same parameters. However sometime you need
+ * to customize some parameters for each clients.
+ * For example: the 'language' parameter could depends on the chatter profil so it could interesting to
+ * ignore the cache for this parameter.
+ * The 'dyn_params' contains the parameters that need to be dynamic (not stored in the cache).
+ * (Default value: array())</p>
+ */
+ var $dyn_params = array();
+
// ------------------
// private parameters
// ------------------
@@ -695,6 +706,8 @@
}
// load dynamic parameter even if the config exists in the cache
+ if (isset($params['dyn_params']) && is_array($params['dyn_params']))
+ $this->_dyn_params = array_merge($this->_dyn_params,$params['dyn_params']);
foreach ( $this->_dyn_params as $dp )
if (isset($params[$dp]))
$this->$dp = $params[$dp];
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|