summaryrefslogtreecommitdiffstats
path: root/lib/base.php
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2016-08-09 10:58:23 +0200
committerGitHub <noreply@github.com>2016-08-09 10:58:23 +0200
commit4277051442c2b6025da936493cb674dcf754d34c (patch)
tree5d464276d9a452688ccf2264b34aaeca8d7d7d26 /lib/base.php
parent3a26def7cf446bbf8bb019ebc4ac30cfe4d27151 (diff)
parent4d559267bd19d67a1d0661f8a1658268652dea92 (diff)
downloadnextcloud-server-4277051442c2b6025da936493cb674dcf754d34c.tar.gz
nextcloud-server-4277051442c2b6025da936493cb674dcf754d34c.zip
Merge pull request #660 from gdamjan/custom-config-dir
introduce NEXTCLOUD_CONFIG_DIR env variable (see #300)
Diffstat (limited to 'lib/base.php')
-rw-r--r--lib/base.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/base.php b/lib/base.php
index 4bb7052aa5d..3457a74e989 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -123,6 +123,8 @@ class OC {
self::$configDir = OC::$SERVERROOT . '/' . PHPUNIT_CONFIG_DIR . '/';
} elseif(defined('PHPUNIT_RUN') and PHPUNIT_RUN and is_dir(OC::$SERVERROOT . '/tests/config/')) {
self::$configDir = OC::$SERVERROOT . '/tests/config/';
+ } elseif($dir = getenv('NEXTCLOUD_CONFIG_DIR')) {
+ self::$configDir = rtrim($dir, '/') . '/';
} else {
self::$configDir = OC::$SERVERROOT . '/config/';
}
@@ -216,7 +218,7 @@ class OC {
// set the right include path
set_include_path(
OC::$SERVERROOT . '/lib/private' . PATH_SEPARATOR .
- OC::$SERVERROOT . '/config' . PATH_SEPARATOR .
+ self::$configDir . PATH_SEPARATOR .
OC::$SERVERROOT . '/3rdparty' . PATH_SEPARATOR .
implode(PATH_SEPARATOR, $paths) . PATH_SEPARATOR .
get_include_path() . PATH_SEPARATOR .