diff options
Diffstat (limited to 'lib/Controller/WorkspaceController.php')
-rw-r--r-- | lib/Controller/WorkspaceController.php | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/lib/Controller/WorkspaceController.php b/lib/Controller/WorkspaceController.php index a1d68f542..8e9f43685 100644 --- a/lib/Controller/WorkspaceController.php +++ b/lib/Controller/WorkspaceController.php @@ -85,11 +85,6 @@ class WorkspaceController extends OCSController { /** @var IURLGenerator */ private $urlGenerator; - private const SUPPORTED_FILENAMES = [ - 'README.md', - 'Readme.md', - 'readme.md' - ]; /** @var IEventDispatcher */ private $eventDispatcher; @@ -184,7 +179,7 @@ class WorkspaceController extends OCSController { if ($folder instanceof Folder) { $file = $this->getFile($folder); if ($file === null) { - $token = $this->directEditingManager->create($path . '/'. self::SUPPORTED_FILENAMES[0], Application::APP_NAME, 'textdocument'); + $token = $this->directEditingManager->create($path . '/'. $this->workspaceService->getSupportedFilenames()[0], Application::APP_NAME, 'textdocument'); } else { $token = $this->directEditingManager->open($path . '/'. $file->getName(), Application::APP_NAME); } @@ -201,7 +196,7 @@ class WorkspaceController extends OCSController { private function getFile(Folder $folder) { $file = null; - foreach (self::SUPPORTED_FILENAMES as $filename) { + foreach ($this->workspaceService->getSupportedFilenames() as $filename) { if ($folder->nodeExists($filename)) { $file = $folder->get($filename); continue; |