summaryrefslogtreecommitdiffstats
path: root/apps/files_external/lib/config.php
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2015-03-13 12:49:11 +0100
committerVincent Petry <pvince81@owncloud.com>2015-03-13 12:49:11 +0100
commit34c8b1ac7732b4502beebea0dfeeaa8bac225550 (patch)
tree6fbcb5c17781157bf14afe141b9738814db393c5 /apps/files_external/lib/config.php
parent680ec056dc8c4fb84b8300967bcc12db2a57f225 (diff)
downloadnextcloud-server-34c8b1ac7732b4502beebea0dfeeaa8bac225550.tar.gz
nextcloud-server-34c8b1ac7732b4502beebea0dfeeaa8bac225550.zip
Mount options for ext storage are now passed around
The mount options are now passed to the UI and stored in a hidden field. The ext storage controllers and services also know how to load/save them from the legacy config.
Diffstat (limited to 'apps/files_external/lib/config.php')
-rw-r--r--apps/files_external/lib/config.php12
1 files changed, 11 insertions, 1 deletions
diff --git a/apps/files_external/lib/config.php b/apps/files_external/lib/config.php
index deeedb98551..378bedfa8de 100644
--- a/apps/files_external/lib/config.php
+++ b/apps/files_external/lib/config.php
@@ -357,6 +357,9 @@ class OC_Mount_Config {
'applicable' => array('groups' => array($group), 'users' => array()),
'status' => self::getBackendStatus($mount['class'], $mount['options'], false)
);
+ if (isset($mount['mountOptions'])) {
+ $config['mountOptions'] = $mount['mountOptions'];
+ }
$hash = self::makeConfigHash($config);
// If an existing config exists (with same class, mountpoint and options)
if (isset($system[$hash])) {
@@ -393,6 +396,9 @@ class OC_Mount_Config {
'applicable' => array('groups' => array(), 'users' => array($user)),
'status' => self::getBackendStatus($mount['class'], $mount['options'], false)
);
+ if (isset($mount['mountOptions'])) {
+ $config['mountOptions'] = $mount['mountOptions'];
+ }
$hash = self::makeConfigHash($config);
// If an existing config exists (with same class, mountpoint and options)
if (isset($system[$hash])) {
@@ -426,7 +432,7 @@ class OC_Mount_Config {
$mount['class'] = '\OC\Files\Storage\\' . substr($mount['class'], 15);
}
$mount['options'] = self::decryptPasswords($mount['options']);
- $personal[] = array(
+ $config = array(
'id' => (int) $mount['id'],
'storage_id' => (int) $mount['storage_id'],
'class' => $mount['class'],
@@ -436,6 +442,10 @@ class OC_Mount_Config {
'options' => $mount['options'],
'status' => self::getBackendStatus($mount['class'], $mount['options'], true)
);
+ if (isset($mount['mountOptions'])) {
+ $config['mountOptions'] = $mount['mountOptions'];
+ }
+ $personal[] = $config;
}
}
return $personal;