summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorTigran Mkrtchyan <tigran.mkrtchyan@desy.de>2014-01-15 12:49:47 +0100
committerTigran Mkrtchyan <tigran.mkrtchyan@desy.de>2014-01-29 17:14:23 +0100
commit8cc97275200ec9b47d1cd0c38c88c0c076687104 (patch)
tree07b90624c496e0c724d2cca12ed2aa4ade27bdaf /apps
parentafa00318bcabf53bed4f33633dae55c9efa43dd7 (diff)
downloadnextcloud-server-8cc97275200ec9b47d1cd0c38c88c0c076687104.tar.gz
nextcloud-server-8cc97275200ec9b47d1cd0c38c88c0c076687104.zip
mount: make location of mount.json configurable
do not share users data with config files Signed-off-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>
Diffstat (limited to 'apps')
-rwxr-xr-xapps/files_external/lib/config.php6
1 files changed, 2 insertions, 4 deletions
diff --git a/apps/files_external/lib/config.php b/apps/files_external/lib/config.php
index 01d588b3721..3118e1ac68d 100755
--- a/apps/files_external/lib/config.php
+++ b/apps/files_external/lib/config.php
@@ -352,9 +352,8 @@ class OC_Mount_Config {
$phpFile = OC_User::getHome(OCP\User::getUser()).'/mount.php';
$jsonFile = OC_User::getHome(OCP\User::getUser()).'/mount.json';
} else {
- $datadir = \OC_Config::getValue("datadirectory", \OC::$SERVERROOT . "/data");
$phpFile = OC::$SERVERROOT.'/config/mount.php';
- $jsonFile = $datadir . '/mount.json';
+ $jsonFile = \OC_Config::getValue("mount_file", \OC::$SERVERROOT . "/data/mount.json");
}
if (is_file($jsonFile)) {
$mountPoints = json_decode(file_get_contents($jsonFile), true);
@@ -379,8 +378,7 @@ class OC_Mount_Config {
if ($isPersonal) {
$file = OC_User::getHome(OCP\User::getUser()).'/mount.json';
} else {
- $datadir = \OC_Config::getValue("datadirectory", \OC::$SERVERROOT . "/data");
- $file = $datadir . '/mount.json';
+ $file = \OC_Config::getValue("mount_file", \OC::$SERVERROOT . "/data/mount.json");
}
$content = json_encode($data);
@file_put_contents($file, $content);