[Phpfreechat-svn] SF.net SVN: phpfreechat: [550] trunk/src/pfcglobalconfig.class.php
Status: Beta
Brought to you by:
kerphi
From: <ke...@us...> - 2006-06-07 20:14:47
|
Revision: 550 Author: kerphi Date: 2006-06-06 09:17:15 -0700 (Tue, 06 Jun 2006) ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=550&view=rev Log Message: ----------- Bug fix: the cache directory path was hardcoded Modified Paths: -------------- trunk/src/pfcglobalconfig.class.php Modified: trunk/src/pfcglobalconfig.class.php =================================================================== --- trunk/src/pfcglobalconfig.class.php 2006-06-05 14:33:24 UTC (rev 549) +++ trunk/src/pfcglobalconfig.class.php 2006-06-06 16:17:15 UTC (rev 550) @@ -209,7 +209,7 @@ $this->errors = array_merge($this->errors, @test_writable_dir($this->data_public_path, "data_public_path")); $this->errors = array_merge($this->errors, @test_writable_dir($this->data_private_path, "data_private_path")); $this->errors = array_merge($this->errors, @install_dir($this->jspath, $this->data_public_path."/javascript")); - $this->errors = array_merge($this->errors, @test_writable_dir(dirname(__FILE__)."/../data/private/cache", "data_public_path/cache")); + $this->errors = array_merge($this->errors, @test_writable_dir($this->data_private_path."/cache", "data_private_path/cache")); // --- // test xajax lib existance @@ -387,7 +387,7 @@ */ function synchronizeWithCache($destroy = false) { - $cachefile = dirname(__FILE__)."/../data/private/cache/pfcglobalconfig_".$this->getId(); + $cachefile = $this->data_private_path."/cache/pfcglobalconfig_".$this->getId(); // destroy the cache if init parameter is present into the url if (isset($_GET["init"]) || $destroy) @unlink($cachefile); @@ -416,7 +416,7 @@ } function saveInCache() { - $cachefile = dirname(__FILE__)."/../data/private/cache/pfcglobalconfig_".$this->getId(); + $cachefile = $this->data_private_path."/cache/pfcglobalconfig_".$this->getId(); file_put_contents($cachefile, serialize(get_object_vars($this))); if ($this->debug) pxlog("pfcGlobalConfig::saveInCache()", "chatconfig", $this->getId()); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |