diff options
author | cweiske <cweiske@b3834d28-1941-0410-a4f8-b48e95affb8f> | 2010-08-21 23:47:56 +0000 |
---|---|---|
committer | cweiske <cweiske@b3834d28-1941-0410-a4f8-b48e95affb8f> | 2010-08-21 23:47:56 +0000 |
commit | 05832245e26758d5f758038024e86f2082471a10 (patch) | |
tree | 6260e10977bb2650c9358326a2ae5521c8352640 /src/SemanticScuttle | |
parent | d80fcf8de6440fd31f16bb4106fe9e373fa40308 (diff) | |
parent | 25baf614b8b00bb39b9d35cf6ce5ce79f0954aeb (diff) | |
download | semanticscuttle-05832245e26758d5f758038024e86f2082471a10.tar.gz semanticscuttle-05832245e26758d5f758038024e86f2082471a10.tar.bz2 |
Merge branch 'pearpkg'
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@717 b3834d28-1941-0410-a4f8-b48e95affb8f
Diffstat (limited to 'src/SemanticScuttle')
-rw-r--r-- | src/SemanticScuttle/header.php | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/src/SemanticScuttle/header.php b/src/SemanticScuttle/header.php index ef36e83..d1a5c29 100644 --- a/src/SemanticScuttle/header.php +++ b/src/SemanticScuttle/header.php @@ -14,9 +14,21 @@ * @license GPL http://www.gnu.org/licenses/gpl.html * @link http://sourceforge.net/projects/semanticscuttle */ -if (!file_exists(dirname(__FILE__) .'/../../data/config.php')) { + +if ('@data_dir@' == '@' . 'data_dir@') { + //non pear-install + $datadir = dirname(__FILE__) . '/../../data/'; +} else { + //pear installation; files are in include path + $datadir = '@data_dir@/SemanticScuttle/'; +} + +if (!file_exists($datadir . '/config.php')) { header('HTTP/1.0 500 Internal Server Error'); - die('Please copy "config.php.dist" to "config.php" in data/ folder.'); + die( + 'Please copy "config.php.dist" to "config.php" in data/ folder.' + . "\n" + ); } set_include_path( get_include_path() . PATH_SEPARATOR @@ -24,7 +36,6 @@ set_include_path( ); // 1 // First requirements part (before debug management) -$datadir = dirname(__FILE__) . '/../../data/'; require_once $datadir . '/config.default.php'; require_once $datadir . '/config.php'; |