summaryrefslogtreecommitdiffstats
path: root/apps/files_external/controller/userglobalstoragescontroller.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_external/controller/userglobalstoragescontroller.php')
-rw-r--r--apps/files_external/controller/userglobalstoragescontroller.php11
1 files changed, 7 insertions, 4 deletions
diff --git a/apps/files_external/controller/userglobalstoragescontroller.php b/apps/files_external/controller/userglobalstoragescontroller.php
index 36c3740eed3..f89022ee468 100644
--- a/apps/files_external/controller/userglobalstoragescontroller.php
+++ b/apps/files_external/controller/userglobalstoragescontroller.php
@@ -106,15 +106,16 @@ class UserGlobalStoragesController extends StoragesController {
* Get an external storage entry.
*
* @param int $id storage id
+ * @param bool $testOnly whether to storage should only test the connection or do more things
* @return DataResponse
*
* @NoAdminRequired
*/
- public function show($id) {
+ public function show($id, $testOnly = true) {
try {
$storage = $this->service->getStorage($id);
- $this->updateStorageStatus($storage);
+ $this->updateStorageStatus($storage, $testOnly);
} catch (NotFoundException $e) {
return new DataResponse(
[
@@ -138,6 +139,7 @@ class UserGlobalStoragesController extends StoragesController {
*
* @param int $id storage id
* @param array $backendOptions backend-specific options
+ * @param bool $testOnly whether to storage should only test the connection or do more things
*
* @return DataResponse
*
@@ -145,7 +147,8 @@ class UserGlobalStoragesController extends StoragesController {
*/
public function update(
$id,
- $backendOptions
+ $backendOptions,
+ $testOnly = true
) {
try {
$storage = $this->service->getStorage($id);
@@ -170,7 +173,7 @@ class UserGlobalStoragesController extends StoragesController {
);
}
- $this->updateStorageStatus($storage);
+ $this->updateStorageStatus($storage, $testOnly);
$this->sanitizeStorage($storage);
return new DataResponse(