aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_external/lib/Controller
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_external/lib/Controller')
-rw-r--r--apps/files_external/lib/Controller/GlobalStoragesController.php4
-rw-r--r--apps/files_external/lib/Controller/StoragesController.php10
-rw-r--r--apps/files_external/lib/Controller/UserGlobalStoragesController.php9
-rw-r--r--apps/files_external/lib/Controller/UserStoragesController.php8
4 files changed, 10 insertions, 21 deletions
diff --git a/apps/files_external/lib/Controller/GlobalStoragesController.php b/apps/files_external/lib/Controller/GlobalStoragesController.php
index 132295f6b35..e7274c9cfb6 100644
--- a/apps/files_external/lib/Controller/GlobalStoragesController.php
+++ b/apps/files_external/lib/Controller/GlobalStoragesController.php
@@ -133,7 +133,6 @@ class GlobalStoragesController extends StoragesController {
* @param array $applicableUsers users for which to mount the storage
* @param array $applicableGroups groups for which to mount the storage
* @param int $priority priority
- * @param bool $testOnly whether to storage should only test the connection or do more things
*
* @return DataResponse
*/
@@ -148,7 +147,6 @@ class GlobalStoragesController extends StoragesController {
$applicableUsers,
$applicableGroups,
$priority,
- $testOnly = true,
) {
$storage = $this->createStorage(
$mountPoint,
@@ -181,7 +179,7 @@ class GlobalStoragesController extends StoragesController {
);
}
- $this->updateStorageStatus($storage, $testOnly);
+ $this->updateStorageStatus($storage);
return new DataResponse(
$storage->jsonSerialize(true),
diff --git a/apps/files_external/lib/Controller/StoragesController.php b/apps/files_external/lib/Controller/StoragesController.php
index 18f8d3164b7..df3a4528054 100644
--- a/apps/files_external/lib/Controller/StoragesController.php
+++ b/apps/files_external/lib/Controller/StoragesController.php
@@ -213,9 +213,8 @@ abstract class StoragesController extends Controller {
* on whether the remote storage is available or not.
*
* @param StorageConfig $storage storage configuration
- * @param bool $testOnly whether to storage should only test the connection or do more things
*/
- protected function updateStorageStatus(StorageConfig &$storage, $testOnly = true) {
+ protected function updateStorageStatus(StorageConfig &$storage) {
try {
$this->manipulateStorageConfig($storage);
@@ -226,8 +225,6 @@ abstract class StoragesController extends Controller {
MountConfig::getBackendStatus(
$backend->getStorageClass(),
$storage->getBackendOptions(),
- false,
- $testOnly
)
);
} catch (InsufficientDataForMeaningfulAnswerException $e) {
@@ -268,15 +265,14 @@ abstract class StoragesController extends Controller {
* 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
*/
- public function show(int $id, $testOnly = true) {
+ public function show(int $id) {
try {
$storage = $this->service->getStorage($id);
- $this->updateStorageStatus($storage, $testOnly);
+ $this->updateStorageStatus($storage);
} catch (NotFoundException $e) {
return new DataResponse(
[
diff --git a/apps/files_external/lib/Controller/UserGlobalStoragesController.php b/apps/files_external/lib/Controller/UserGlobalStoragesController.php
index 5f428db9661..88a9f936401 100644
--- a/apps/files_external/lib/Controller/UserGlobalStoragesController.php
+++ b/apps/files_external/lib/Controller/UserGlobalStoragesController.php
@@ -97,15 +97,14 @@ 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, $testOnly = true) {
+ public function show($id) {
try {
$storage = $this->service->getStorage($id);
- $this->updateStorageStatus($storage, $testOnly);
+ $this->updateStorageStatus($storage);
} catch (NotFoundException $e) {
return new DataResponse(
[
@@ -133,7 +132,6 @@ 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
*/
@@ -142,7 +140,6 @@ class UserGlobalStoragesController extends StoragesController {
public function update(
$id,
$backendOptions,
- $testOnly = true,
) {
try {
$storage = $this->service->getStorage($id);
@@ -167,7 +164,7 @@ class UserGlobalStoragesController extends StoragesController {
);
}
- $this->updateStorageStatus($storage, $testOnly);
+ $this->updateStorageStatus($storage);
$this->sanitizeStorage($storage);
return new DataResponse(
diff --git a/apps/files_external/lib/Controller/UserStoragesController.php b/apps/files_external/lib/Controller/UserStoragesController.php
index 7b0c858e51b..7b564d57f7e 100644
--- a/apps/files_external/lib/Controller/UserStoragesController.php
+++ b/apps/files_external/lib/Controller/UserStoragesController.php
@@ -85,8 +85,8 @@ class UserStoragesController extends StoragesController {
* {@inheritdoc}
*/
#[NoAdminRequired]
- public function show(int $id, $testOnly = true) {
- return parent::show($id, $testOnly);
+ public function show(int $id) {
+ return parent::show($id);
}
/**
@@ -152,7 +152,6 @@ class UserStoragesController extends StoragesController {
* @param string $authMechanism authentication mechanism identifier
* @param array $backendOptions backend-specific options
* @param array $mountOptions backend-specific mount options
- * @param bool $testOnly whether to storage should only test the connection or do more things
*
* @return DataResponse
*/
@@ -165,7 +164,6 @@ class UserStoragesController extends StoragesController {
$authMechanism,
$backendOptions,
$mountOptions,
- $testOnly = true,
) {
$storage = $this->createStorage(
$mountPoint,
@@ -195,7 +193,7 @@ class UserStoragesController extends StoragesController {
);
}
- $this->updateStorageStatus($storage, $testOnly);
+ $this->updateStorageStatus($storage);
return new DataResponse(
$storage->jsonSerialize(true),