summaryrefslogtreecommitdiffstats
path: root/core/js/config.php
diff options
context:
space:
mode:
Diffstat (limited to 'core/js/config.php')
-rw-r--r--core/js/config.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/core/js/config.php b/core/js/config.php
index 9ea8f3864d1..aac7630a1d8 100644
--- a/core/js/config.php
+++ b/core/js/config.php
@@ -62,9 +62,17 @@ if ($defaultExpireDateEnabled) {
}
$outgoingServer2serverShareEnabled = $config->getAppValue('files_sharing', 'outgoing_server2server_share_enabled', 'yes') === 'yes';
+$countOfDataLocation = 0;
+
+$dataLocation = str_replace(OC::$SERVERROOT .'/', '', $config->getSystemValue('datadirectory', ''), $countOfDataLocation);
+if($countOfDataLocation !== 1 || !OC_User::isAdminUser(OC_User::getUser())){
+ $dataLocation = false;
+}
+
$array = array(
"oc_debug" => $config->getSystemValue('debug', false) ? 'true' : 'false',
"oc_isadmin" => OC_User::isAdminUser(OC_User::getUser()) ? 'true' : 'false',
+ "oc_dataURL" => is_string($dataLocation) ? "\"".$dataLocation."\"" : 'false',
"oc_webroot" => "\"".OC::$WEBROOT."\"",
"oc_appswebroots" => str_replace('\\/', '/', json_encode($apps_paths)), // Ugly unescape slashes waiting for better solution
"datepickerFormatDate" => json_encode($l->l('jsdate', null)),