[Phpfreechat-svn] SF.net SVN: phpfreechat: [881] trunk/src
Status: Beta
Brought to you by:
kerphi
From: <ke...@us...> - 2006-11-29 14:44:45
|
Revision: 881 http://svn.sourceforge.net/phpfreechat/?rev=881&view=rev Author: kerphi Date: 2006-11-29 06:44:44 -0800 (Wed, 29 Nov 2006) Log Message: ----------- [en] Bug fix: on windows server the public path was incorrectly computed [0h25] [fr] Bug fix : sur les serveurs windows le chemin public ?\195?\169tait mal calcul?\195?\169 [0h25] Modified Paths: -------------- trunk/src/pfcglobalconfig.class.php trunk/src/pfctools.php Modified: trunk/src/pfcglobalconfig.class.php =================================================================== --- trunk/src/pfcglobalconfig.class.php 2006-11-28 17:50:20 UTC (rev 880) +++ trunk/src/pfcglobalconfig.class.php 2006-11-29 14:44:44 UTC (rev 881) @@ -358,6 +358,7 @@ // calculate datapublic url if ($this->data_public_url == "") $this->data_public_url = relativePath($this->client_script_path, $this->data_public_path); + // --- // test server script if ($this->server_script_path == "") Modified: trunk/src/pfctools.php =================================================================== --- trunk/src/pfctools.php 2006-11-28 17:50:20 UTC (rev 880) +++ trunk/src/pfctools.php 2006-11-29 14:44:44 UTC (rev 881) @@ -62,11 +62,11 @@ $p1 = realpath(cleanPath($p1)); $p2 = realpath(cleanPath($p2)); $res = ""; - //echo $p1."<br>"; - //echo $p2."<br>"; + // echo $p1."<br>"; + // echo $p2."<br>"; while( $p1 != "" && $p1 != "/" && // for unix root dir - !preg_match("/[a-z]\:\\\/i",$p1) && // for windows rootdir + !preg_match("/^[a-z]\:\\\$/i",$p1) && // for windows rootdir strpos($p2, $p1) !== 0) { $res .= "../"; @@ -86,6 +86,7 @@ if (preg_match("/.*\/$/", $res)) $res = preg_replace("/(.*)\//","$1",$res); // if rootpath is empty replace it by "." to avoide url starting with "/" if ($res == "") $res = "."; + // echo $res."<br>"; return $res; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |