diff options
author | Morris Jobke <hey@morrisjobke.de> | 2014-12-18 23:38:14 +0100 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2014-12-18 23:38:14 +0100 |
commit | 75e8b39826c9278288b8dc02dc19f0ca060080b6 (patch) | |
tree | dcb2081b7b8779333d11b3adbf03d6b2c0ea4c76 /apps | |
parent | 891474b0d6b8cc77a8480cd91f1e48ad3bc3e73b (diff) | |
parent | 2eab0f21211762869db74891c2e2611f96bfef15 (diff) | |
download | nextcloud-server-75e8b39826c9278288b8dc02dc19f0ca060080b6.tar.gz nextcloud-server-75e8b39826c9278288b8dc02dc19f0ca060080b6.zip |
Merge pull request #12879 from owncloud/mountconfig
Add mount specific options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files/tests/ajax_rename.php | 2 | ||||
-rw-r--r-- | apps/files/tests/helper.php | 3 | ||||
-rw-r--r-- | apps/files_external/lib/config/configadapter.php | 5 | ||||
-rw-r--r-- | apps/files_trashbin/lib/helper.php | 6 |
4 files changed, 10 insertions, 6 deletions
diff --git a/apps/files/tests/ajax_rename.php b/apps/files/tests/ajax_rename.php index 48aed05823b..1cfecf9e58c 100644 --- a/apps/files/tests/ajax_rename.php +++ b/apps/files/tests/ajax_rename.php @@ -107,7 +107,7 @@ class Test_OC_Files_App_Rename extends \Test\TestCase { 'etag' => 'abcdef', 'directory' => '/', 'name' => 'new_name', - )))); + ), null))); $result = $this->files->rename($dir, $oldname, $newname); diff --git a/apps/files/tests/helper.php b/apps/files/tests/helper.php index 1b7c8eef43a..ea96e41d1d1 100644 --- a/apps/files/tests/helper.php +++ b/apps/files/tests/helper.php @@ -24,7 +24,8 @@ class Test_Files_Helper extends \Test\TestCase { 'mtime' => $mtime, 'type' => $isDir ? 'dir' : 'file', 'mimetype' => $isDir ? 'httpd/unix-directory' : 'application/octet-stream' - ) + ), + null ); } diff --git a/apps/files_external/lib/config/configadapter.php b/apps/files_external/lib/config/configadapter.php index 6294e27a774..de484a44698 100644 --- a/apps/files_external/lib/config/configadapter.php +++ b/apps/files_external/lib/config/configadapter.php @@ -33,10 +33,11 @@ class ConfigAdapter implements IMountProvider { $objectClass = $options['options']['objectstore']['class']; $options['options']['objectstore'] = new $objectClass($options['options']['objectstore']); } + $mountOptions = isset($options['mountOptions']) ? $options['mountOptions'] : []; if (isset($options['personal']) && $options['personal']) { - $mounts[] = new PersonalMount($options['class'], $mountPoint, $options['options'], $loader); + $mounts[] = new PersonalMount($options['class'], $mountPoint, $options['options'], $loader, $mountOptions); } else { - $mounts[] = new MountPoint($options['class'], $mountPoint, $options['options'], $loader); + $mounts[] = new MountPoint($options['class'], $mountPoint, $options['options'], $loader, $mountOptions); } } return $mounts; diff --git a/apps/files_trashbin/lib/helper.php b/apps/files_trashbin/lib/helper.php index c99662480df..d9e69b71aa0 100644 --- a/apps/files_trashbin/lib/helper.php +++ b/apps/files_trashbin/lib/helper.php @@ -31,8 +31,10 @@ class Helper return $result; } - list($storage, $internalPath) = $view->resolvePath($dir); + $mount = $view->getMount($dir); + $storage = $mount->getStorage(); $absoluteDir = $view->getAbsolutePath($dir); + $internalPath = $mount->getInternalPath($absoluteDir); if (is_resource($dirContent)) { $originalLocations = \OCA\Files_Trashbin\Trashbin::getLocations($user); @@ -65,7 +67,7 @@ class Helper if ($originalPath) { $i['extraData'] = $originalPath.'/'.$id; } - $result[] = new FileInfo($absoluteDir . '/' . $i['name'], $storage, $internalPath . '/' . $i['name'], $i); + $result[] = new FileInfo($absoluteDir . '/' . $i['name'], $storage, $internalPath . '/' . $i['name'], $i, $mount); } } closedir($dirContent); |