summaryrefslogtreecommitdiff
path: root/inc/io.php
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2007-09-30 20:42:50 +0200
committerAndreas Gohr <andi@splitbrain.org>2007-09-30 20:42:50 +0200
commit009768124df70258806ec3120189432d1b2bb912 (patch)
treecc66e19004645686d0bf84e71fa54f490e0ff4a7 /inc/io.php
parent0b30864498cfa9af2398991188109da991e4613f (diff)
downloadrpg-009768124df70258806ec3120189432d1b2bb912.tar.gz
rpg-009768124df70258806ec3120189432d1b2bb912.tar.bz2
don't use realpath() anymore (FS#1261 and others)
The use of realpath() to clean up relative file names caused some trouble in certain setups relying on symlinks or having restricitve file structure setups. This patch replaces all realpath() calls with a PHP only replacement which should solve those problems. darcs-hash:20070930184250-7ad00-512ff04c95f57fc9eaf104f80372237a3c94286f.gz
Diffstat (limited to 'inc/io.php')
-rw-r--r--inc/io.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/inc/io.php b/inc/io.php
index e097dce69..f23a9a544 100644
--- a/inc/io.php
+++ b/inc/io.php
@@ -6,7 +6,7 @@
* @author Andreas Gohr <andi@splitbrain.org>
*/
- if(!defined('DOKU_INC')) define('DOKU_INC',realpath(dirname(__FILE__).'/../').'/');
+ if(!defined('DOKU_INC')) define('DOKU_INC',fullpath(dirname(__FILE__).'/../').'/');
require_once(DOKU_INC.'inc/common.php');
require_once(DOKU_INC.'inc/HTTPClient.php');
require_once(DOKU_INC.'inc/events.php');
@@ -385,7 +385,7 @@ function io_mkdir_p($target){
//recursion
if (io_mkdir_p(substr($target,0,strrpos($target,'/')))){
if($conf['safemodehack']){
- $dir = preg_replace('/^'.preg_quote(realpath($conf['ftp']['root']),'/').'/','', $target);
+ $dir = preg_replace('/^'.preg_quote(fullpath($conf['ftp']['root']),'/').'/','', $target);
return io_mkdir_ftp($dir);
}else{
$ret = @mkdir($target,$conf['dmode']); // crawl back up & create dir tree