From 8cc97275200ec9b47d1cd0c38c88c0c076687104 Mon Sep 17 00:00:00 2001 From: Tigran Mkrtchyan Date: Wed, 15 Jan 2014 12:49:47 +0100 Subject: mount: make location of mount.json configurable do not share users data with config files Signed-off-by: Tigran Mkrtchyan --- apps/files_external/lib/config.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'apps') 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); -- cgit v1.2.3