diff options
author | Andreas Gohr <andi@splitbrain.org> | 2007-09-30 20:42:50 +0200 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2007-09-30 20:42:50 +0200 |
commit | 009768124df70258806ec3120189432d1b2bb912 (patch) | |
tree | cc66e19004645686d0bf84e71fa54f490e0ff4a7 /lib | |
parent | 0b30864498cfa9af2398991188109da991e4613f (diff) | |
download | rpg-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 'lib')
-rw-r--r-- | lib/exe/ajax.php | 2 | ||||
-rw-r--r-- | lib/exe/css.php | 2 | ||||
-rw-r--r-- | lib/exe/detail.php | 2 | ||||
-rw-r--r-- | lib/exe/fetch.php | 2 | ||||
-rw-r--r-- | lib/exe/indexer.php | 2 | ||||
-rw-r--r-- | lib/exe/js.php | 2 | ||||
-rw-r--r-- | lib/exe/mediamanager.php | 2 | ||||
-rw-r--r-- | lib/exe/opensearch.php | 2 | ||||
-rw-r--r-- | lib/exe/spellcheck.php | 2 | ||||
-rw-r--r-- | lib/exe/xmlrpc.php | 2 |
10 files changed, 10 insertions, 10 deletions
diff --git a/lib/exe/ajax.php b/lib/exe/ajax.php index 8bcf184b5..08994e81f 100644 --- a/lib/exe/ajax.php +++ b/lib/exe/ajax.php @@ -11,7 +11,7 @@ if(!count($_POST) && $HTTP_RAW_POST_DATA){ parse_str($HTTP_RAW_POST_DATA, $_POST); } -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/init.php'); require_once(DOKU_INC.'inc/common.php'); require_once(DOKU_INC.'inc/pageutils.php'); diff --git a/lib/exe/css.php b/lib/exe/css.php index 59a2a63ea..bab24b257 100644 --- a/lib/exe/css.php +++ b/lib/exe/css.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__).'/../../').'/'); if(!defined('NOSESSION')) define('NOSESSION',true); // we do not use a session or authentication here (better caching) require_once(DOKU_INC.'inc/init.php'); require_once(DOKU_INC.'inc/pageutils.php'); diff --git a/lib/exe/detail.php b/lib/exe/detail.php index a9fe72b91..263dd30cb 100644 --- a/lib/exe/detail.php +++ b/lib/exe/detail.php @@ -1,5 +1,5 @@ <?php - if(!defined('DOKU_INC')) define('DOKU_INC',realpath(dirname(__FILE__).'/../../').'/'); + if(!defined('DOKU_INC')) define('DOKU_INC',fullpath(dirname(__FILE__).'/../../').'/'); define('DOKU_MEDIADETAIL',1); require_once(DOKU_INC.'inc/init.php'); require_once(DOKU_INC.'inc/common.php'); diff --git a/lib/exe/fetch.php b/lib/exe/fetch.php index 94aae7deb..031edd274 100644 --- a/lib/exe/fetch.php +++ b/lib/exe/fetch.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__).'/../../').'/'); define('DOKU_DISABLE_GZIP_OUTPUT', 1); require_once(DOKU_INC.'inc/init.php'); require_once(DOKU_INC.'inc/common.php'); diff --git a/lib/exe/indexer.php b/lib/exe/indexer.php index 282aa73ac..a3d953740 100644 --- a/lib/exe/indexer.php +++ b/lib/exe/indexer.php @@ -5,7 +5,7 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * @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__).'/../../').'/'); define('DOKU_DISABLE_GZIP_OUTPUT',1); require_once(DOKU_INC.'inc/init.php'); require_once(DOKU_INC.'inc/auth.php'); diff --git a/lib/exe/js.php b/lib/exe/js.php index 802ed4490..9315e7783 100644 --- a/lib/exe/js.php +++ b/lib/exe/js.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__).'/../../').'/'); if(!defined('NOSESSION')) define('NOSESSION',true); // we do not use a session or authentication here (better caching) if(!defined('NL')) define('NL',"\n"); require_once(DOKU_INC.'inc/init.php'); diff --git a/lib/exe/mediamanager.php b/lib/exe/mediamanager.php index fc11ed36c..a1f00660d 100644 --- a/lib/exe/mediamanager.php +++ b/lib/exe/mediamanager.php @@ -1,5 +1,5 @@ <?php - if(!defined('DOKU_INC')) define('DOKU_INC',realpath(dirname(__FILE__).'/../../').'/'); + if(!defined('DOKU_INC')) define('DOKU_INC',fullpath(dirname(__FILE__).'/../../').'/'); define('DOKU_MEDIAMANAGER',1); require_once(DOKU_INC.'inc/init.php'); require_once(DOKU_INC.'inc/lang/en/lang.php'); diff --git a/lib/exe/opensearch.php b/lib/exe/opensearch.php index bd70f4b58..eda32e14d 100644 --- a/lib/exe/opensearch.php +++ b/lib/exe/opensearch.php @@ -8,7 +8,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__).'/../../').'/'); if(!defined('NOSESSION')) define('NOSESSION',true); // we do not use a session or authentication here (better caching) if(!defined('NL')) define('NL',"\n"); require_once(DOKU_INC.'inc/init.php'); diff --git a/lib/exe/spellcheck.php b/lib/exe/spellcheck.php index e4739b60c..8ed116b8b 100644 --- a/lib/exe/spellcheck.php +++ b/lib/exe/spellcheck.php @@ -46,7 +46,7 @@ if(!count($_POST) && $HTTP_RAW_POST_DATA){ parse_str($HTTP_RAW_POST_DATA, $_POST); } -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/init.php'); session_write_close(); require_once (DOKU_INC.'inc/utf8.php'); diff --git a/lib/exe/xmlrpc.php b/lib/exe/xmlrpc.php index 46db3cb30..f2b9a2b7d 100644 --- a/lib/exe/xmlrpc.php +++ b/lib/exe/xmlrpc.php @@ -1,5 +1,5 @@ <?php -if(!defined('DOKU_INC')) define('DOKU_INC',realpath(dirname(__FILE__).'/../../').'/'); +if(!defined('DOKU_INC')) define('DOKU_INC',fullpath(dirname(__FILE__).'/../../').'/'); // fix when '<?xml' isn't on the very first line if(isset($HTTP_RAW_POST_DATA)) $HTTP_RAW_POST_DATA = trim($HTTP_RAW_POST_DATA); |