summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/base.php4
-rw-r--r--lib/private/Server.php2
2 files changed, 4 insertions, 2 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 .
diff --git a/lib/private/Server.php b/lib/private/Server.php
index fd6ecdc297e..d5808d7f17c 100644
--- a/lib/private/Server.php
+++ b/lib/private/Server.php
@@ -616,7 +616,7 @@ class Server extends ServerContainer implements IServerContainer {
$this->registerService('MimeTypeDetector', function (Server $c) {
return new \OC\Files\Type\Detection(
$c->getURLGenerator(),
- \OC::$SERVERROOT . '/config/',
+ \OC::$configDir,
\OC::$SERVERROOT . '/resources/config/'
);
});