From 6a281f019c73dec54f487890d7ff80d26a3f04bf Mon Sep 17 00:00:00 2001 From: Ferdinand Thiessen Date: Wed, 24 Apr 2024 00:02:09 +0200 Subject: fix(files): Use OCP\Util::getForbiddenFileNameChars instead of direct access to system config Signed-off-by: Ferdinand Thiessen --- apps/files/lib/Controller/ViewController.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'apps/files/lib/Controller') diff --git a/apps/files/lib/Controller/ViewController.php b/apps/files/lib/Controller/ViewController.php index 67cd0bf2aef..2e6ffa6a749 100644 --- a/apps/files/lib/Controller/ViewController.php +++ b/apps/files/lib/Controller/ViewController.php @@ -52,7 +52,6 @@ use OCP\AppFramework\Http\Response; use OCP\AppFramework\Http\TemplateResponse; use OCP\AppFramework\Services\IInitialState; use OCP\Collaboration\Resources\LoadAdditionalScriptsEvent as ResourcesLoadAdditionalScriptsEvent; -use OCP\Constants; use OCP\EventDispatcher\IEventDispatcher; use OCP\Files\Folder; use OCP\Files\IRootFolder; @@ -253,9 +252,8 @@ class ViewController extends Controller { $this->initialState->provideInitialState('filesSortingConfig', $filesSortingConfig); // Forbidden file characters - /** @var string[] */ - $forbiddenCharacters = $this->config->getSystemValue('forbidden_chars', []); - $this->initialState->provideInitialState('forbiddenCharacters', Constants::FILENAME_INVALID_CHARS . implode('', $forbiddenCharacters)); + $forbiddenCharacters = \OCP\Util::getForbiddenFileNameChars(); + $this->initialState->provideInitialState('forbiddenCharacters', implode('', $forbiddenCharacters)); $event = new LoadAdditionalScriptsEvent(); $this->eventDispatcher->dispatchTyped($event); -- cgit v1.2.3