summaryrefslogtreecommitdiffstats
path: root/apps/files_external/controller
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/controller
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/controller')
-rw-r--r--apps/files_external/controller/globalstoragescontroller.php6
-rw-r--r--apps/files_external/controller/userstoragescontroller.php10
2 files changed, 14 insertions, 2 deletions
diff --git a/apps/files_external/controller/globalstoragescontroller.php b/apps/files_external/controller/globalstoragescontroller.php
index 3aa64f0d85d..e5aff4f95a2 100644
--- a/apps/files_external/controller/globalstoragescontroller.php
+++ b/apps/files_external/controller/globalstoragescontroller.php
@@ -49,6 +49,7 @@ class GlobalStoragesController extends StoragesController {
* @param string $mountPoint storage mount point
* @param string $backendClass backend class name
* @param array $backendOptions backend-specific options
+ * @param array $mountOptions mount-specific options
* @param array $applicableUsers users for which to mount the storage
* @param array $applicableGroups groups for which to mount the storage
* @param int $priority priority
@@ -59,6 +60,7 @@ class GlobalStoragesController extends StoragesController {
$mountPoint,
$backendClass,
$backendOptions,
+ $mountOptions,
$applicableUsers,
$applicableGroups,
$priority
@@ -67,6 +69,7 @@ class GlobalStoragesController extends StoragesController {
$newStorage->setMountPoint($mountPoint);
$newStorage->setBackendClass($backendClass);
$newStorage->setBackendOptions($backendOptions);
+ $newStorage->setMountOptions($mountOptions);
$newStorage->setApplicableUsers($applicableUsers);
$newStorage->setApplicableGroups($applicableGroups);
$newStorage->setPriority($priority);
@@ -93,6 +96,7 @@ class GlobalStoragesController extends StoragesController {
* @param string $mountPoint storage mount point
* @param string $backendClass backend class name
* @param array $backendOptions backend-specific options
+ * @param array $mountOptions mount-specific options
* @param array $applicableUsers users for which to mount the storage
* @param array $applicableGroups groups for which to mount the storage
* @param int $priority priority
@@ -104,6 +108,7 @@ class GlobalStoragesController extends StoragesController {
$mountPoint,
$backendClass,
$backendOptions,
+ $mountOptions,
$applicableUsers,
$applicableGroups,
$priority
@@ -112,6 +117,7 @@ class GlobalStoragesController extends StoragesController {
$storage->setMountPoint($mountPoint);
$storage->setBackendClass($backendClass);
$storage->setBackendOptions($backendOptions);
+ $storage->setMountOptions($mountOptions);
$storage->setApplicableUsers($applicableUsers);
$storage->setApplicableGroups($applicableGroups);
$storage->setPriority($priority);
diff --git a/apps/files_external/controller/userstoragescontroller.php b/apps/files_external/controller/userstoragescontroller.php
index b77cbca59fd..64202b5e542 100644
--- a/apps/files_external/controller/userstoragescontroller.php
+++ b/apps/files_external/controller/userstoragescontroller.php
@@ -86,6 +86,7 @@ class UserStoragesController extends StoragesController {
* @param string $mountPoint storage mount point
* @param string $backendClass backend class name
* @param array $backendOptions backend-specific options
+ * @param array $mountOptions backend-specific mount options
*
* @return DataResponse
*
@@ -94,12 +95,14 @@ class UserStoragesController extends StoragesController {
public function create(
$mountPoint,
$backendClass,
- $backendOptions
+ $backendOptions,
+ $mountOptions
) {
$newStorage = new StorageConfig();
$newStorage->setMountPoint($mountPoint);
$newStorage->setBackendClass($backendClass);
$newStorage->setBackendOptions($backendOptions);
+ $newStorage->setMountOptions($mountOptions);
$response = $this->validate($newStorage);
if (!empty($response)) {
@@ -122,6 +125,7 @@ class UserStoragesController extends StoragesController {
* @param string $mountPoint storage mount point
* @param string $backendClass backend class name
* @param array $backendOptions backend-specific options
+ * @param array $mountOptions backend-specific mount options
*
* @return DataResponse
*/
@@ -129,12 +133,14 @@ class UserStoragesController extends StoragesController {
$id,
$mountPoint,
$backendClass,
- $backendOptions
+ $backendOptions,
+ $mountOptions
) {
$storage = new StorageConfig($id);
$storage->setMountPoint($mountPoint);
$storage->setBackendClass($backendClass);
$storage->setBackendOptions($backendOptions);
+ $storage->setMountOptions($mountOptions);
$response = $this->validate($storage);
if (!empty($response)) {