aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_external
diff options
context:
space:
mode:
authorJoas Schilling <213943+nickvergessen@users.noreply.github.com>2024-10-21 18:50:10 +0200
committerGitHub <noreply@github.com>2024-10-21 18:50:10 +0200
commitcb65e75e186434fbfcd57a73393d5be0d1b78400 (patch)
tree67d1e1657021c439f6b0f2f4b02c858971ab445a /apps/files_external
parent876262d6f59b6a857b092801c7187ccc385304e1 (diff)
parentfb95695f281818de805aa62ba2beee8ae143e914 (diff)
downloadnextcloud-server-cb65e75e186434fbfcd57a73393d5be0d1b78400.tar.gz
nextcloud-server-cb65e75e186434fbfcd57a73393d5be0d1b78400.zip
Merge pull request #48550 from nextcloud/backport/48540/stable30
[stable30] fix(filesexternal): Remove unneeded 3rdparty library use
Diffstat (limited to 'apps/files_external')
-rw-r--r--apps/files_external/lib/Command/Applicable.php8
-rw-r--r--apps/files_external/lib/Command/Config.php4
-rw-r--r--apps/files_external/lib/Command/Create.php6
-rw-r--r--apps/files_external/lib/Command/Delete.php4
-rw-r--r--apps/files_external/lib/Command/Verify.php4
5 files changed, 13 insertions, 13 deletions
diff --git a/apps/files_external/lib/Command/Applicable.php b/apps/files_external/lib/Command/Applicable.php
index e7305f58671..ecb635c052a 100644
--- a/apps/files_external/lib/Command/Applicable.php
+++ b/apps/files_external/lib/Command/Applicable.php
@@ -10,13 +10,13 @@ use OC\Core\Command\Base;
use OCA\Files_External\Lib\StorageConfig;
use OCA\Files_External\NotFoundException;
use OCA\Files_External\Service\GlobalStoragesService;
+use OCP\AppFramework\Http;
use OCP\IGroupManager;
use OCP\IUserManager;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
-use Symfony\Component\HttpFoundation\Response;
class Applicable extends Base {
public function __construct(
@@ -70,7 +70,7 @@ class Applicable extends Base {
$mount = $this->globalService->getStorage($mountId);
} catch (NotFoundException $e) {
$output->writeln('<error>Mount with id "' . $mountId . ' not found, check "occ files_external:list" to get available mounts</error>');
- return Response::HTTP_NOT_FOUND;
+ return Http::STATUS_NOT_FOUND;
}
if ($mount->getType() === StorageConfig::MOUNT_TYPE_PERSONAL) {
@@ -90,13 +90,13 @@ class Applicable extends Base {
foreach ($addUsers as $addUser) {
if (!$this->userManager->userExists($addUser)) {
$output->writeln('<error>User "' . $addUser . '" not found</error>');
- return Response::HTTP_NOT_FOUND;
+ return Http::STATUS_NOT_FOUND;
}
}
foreach ($addGroups as $addGroup) {
if (!$this->groupManager->groupExists($addGroup)) {
$output->writeln('<error>Group "' . $addGroup . '" not found</error>');
- return Response::HTTP_NOT_FOUND;
+ return Http::STATUS_NOT_FOUND;
}
}
diff --git a/apps/files_external/lib/Command/Config.php b/apps/files_external/lib/Command/Config.php
index 5ea40033bc2..0736749f6d9 100644
--- a/apps/files_external/lib/Command/Config.php
+++ b/apps/files_external/lib/Command/Config.php
@@ -10,10 +10,10 @@ use OC\Core\Command\Base;
use OCA\Files_External\Lib\StorageConfig;
use OCA\Files_External\NotFoundException;
use OCA\Files_External\Service\GlobalStoragesService;
+use OCP\AppFramework\Http;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
-use Symfony\Component\HttpFoundation\Response;
class Config extends Base {
public function __construct(
@@ -49,7 +49,7 @@ class Config extends Base {
$mount = $this->globalService->getStorage($mountId);
} catch (NotFoundException $e) {
$output->writeln('<error>Mount with id "' . $mountId . ' not found, check "occ files_external:list" to get available mounts"</error>');
- return Response::HTTP_NOT_FOUND;
+ return Http::STATUS_NOT_FOUND;
}
$value = $input->getArgument('value');
diff --git a/apps/files_external/lib/Command/Create.php b/apps/files_external/lib/Command/Create.php
index 0183b3014c8..4396d2e2b13 100644
--- a/apps/files_external/lib/Command/Create.php
+++ b/apps/files_external/lib/Command/Create.php
@@ -17,6 +17,7 @@ use OCA\Files_External\Service\BackendService;
use OCA\Files_External\Service\GlobalStoragesService;
use OCA\Files_External\Service\StoragesService;
use OCA\Files_External\Service\UserStoragesService;
+use OCP\AppFramework\Http;
use OCP\IUserManager;
use OCP\IUserSession;
use Symfony\Component\Console\Input\ArrayInput;
@@ -24,7 +25,6 @@ use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
-use Symfony\Component\HttpFoundation\Response;
class Create extends Base {
public function __construct(
@@ -93,11 +93,11 @@ class Create extends Base {
}
if (is_null($storageBackend)) {
$output->writeln('<error>Storage backend with identifier "' . $storageIdentifier . '" not found (see `occ files_external:backends` for possible values)</error>');
- return Response::HTTP_NOT_FOUND;
+ return Http::STATUS_NOT_FOUND;
}
if (is_null($authBackend)) {
$output->writeln('<error>Authentication backend with identifier "' . $authIdentifier . '" not found (see `occ files_external:backends` for possible values)</error>');
- return Response::HTTP_NOT_FOUND;
+ return Http::STATUS_NOT_FOUND;
}
$supportedSchemes = array_keys($storageBackend->getAuthSchemes());
if (!in_array($authBackend->getScheme(), $supportedSchemes)) {
diff --git a/apps/files_external/lib/Command/Delete.php b/apps/files_external/lib/Command/Delete.php
index b432587e603..1c2bfe39fb0 100644
--- a/apps/files_external/lib/Command/Delete.php
+++ b/apps/files_external/lib/Command/Delete.php
@@ -10,6 +10,7 @@ use OC\Core\Command\Base;
use OCA\Files_External\NotFoundException;
use OCA\Files_External\Service\GlobalStoragesService;
use OCA\Files_External\Service\UserStoragesService;
+use OCP\AppFramework\Http;
use OCP\IUserManager;
use OCP\IUserSession;
use Symfony\Component\Console\Helper\QuestionHelper;
@@ -19,7 +20,6 @@ use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Question\ConfirmationQuestion;
-use Symfony\Component\HttpFoundation\Response;
class Delete extends Base {
public function __construct(
@@ -54,7 +54,7 @@ class Delete extends Base {
$mount = $this->globalService->getStorage($mountId);
} catch (NotFoundException $e) {
$output->writeln('<error>Mount with id "' . $mountId . ' not found, check "occ files_external:list" to get available mounts"</error>');
- return Response::HTTP_NOT_FOUND;
+ return Http::STATUS_NOT_FOUND;
}
$noConfirm = $input->getOption('yes');
diff --git a/apps/files_external/lib/Command/Verify.php b/apps/files_external/lib/Command/Verify.php
index 25b09fa1116..1455e427b77 100644
--- a/apps/files_external/lib/Command/Verify.php
+++ b/apps/files_external/lib/Command/Verify.php
@@ -11,12 +11,12 @@ use OCA\Files_External\Lib\InsufficientDataForMeaningfulAnswerException;
use OCA\Files_External\Lib\StorageConfig;
use OCA\Files_External\NotFoundException;
use OCA\Files_External\Service\GlobalStoragesService;
+use OCP\AppFramework\Http;
use OCP\Files\StorageNotAvailableException;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
-use Symfony\Component\HttpFoundation\Response;
class Verify extends Base {
public function __construct(
@@ -50,7 +50,7 @@ class Verify extends Base {
$mount = $this->globalService->getStorage($mountId);
} catch (NotFoundException $e) {
$output->writeln('<error>Mount with id "' . $mountId . ' not found, check "occ files_external:list" to get available mounts"</error>');
- return Response::HTTP_NOT_FOUND;
+ return Http::STATUS_NOT_FOUND;
}
$this->updateStorageStatus($mount, $configInput, $output);