summaryrefslogtreecommitdiffstats
path: root/apps/dav/lib/Connector/Sabre/ServerFactory.php
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2020-05-06 18:11:54 +0200
committerMorris Jobke <hey@morrisjobke.de>2020-05-06 18:11:54 +0200
commitecbc009e2fc8aa7fd078634f4cb2271fded69fb6 (patch)
tree06a38a88467567ec86ee55bf2f83947f32a1607c /apps/dav/lib/Connector/Sabre/ServerFactory.php
parentafc59665582dbd83c4c25cab21a5b30b79cac676 (diff)
downloadnextcloud-server-ecbc009e2fc8aa7fd078634f4cb2271fded69fb6.tar.gz
nextcloud-server-ecbc009e2fc8aa7fd078634f4cb2271fded69fb6.zip
Translate the maintenance mode message in webdav
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'apps/dav/lib/Connector/Sabre/ServerFactory.php')
-rw-r--r--apps/dav/lib/Connector/Sabre/ServerFactory.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/apps/dav/lib/Connector/Sabre/ServerFactory.php b/apps/dav/lib/Connector/Sabre/ServerFactory.php
index 51543e2ed8a..8beabd3510b 100644
--- a/apps/dav/lib/Connector/Sabre/ServerFactory.php
+++ b/apps/dav/lib/Connector/Sabre/ServerFactory.php
@@ -38,6 +38,7 @@ use OCA\DAV\Files\BrowserErrorPagePlugin;
use OCP\Files\Mount\IMountManager;
use OCP\IConfig;
use OCP\IDBConnection;
+use OCP\IL10N;
use OCP\ILogger;
use OCP\IPreview;
use OCP\IRequest;
@@ -66,6 +67,8 @@ class ServerFactory {
private $previewManager;
/** @var EventDispatcherInterface */
private $eventDispatcher;
+ /** @var IL10N */
+ private $l10n;
/**
* @param IConfig $config
@@ -86,7 +89,8 @@ class ServerFactory {
ITagManager $tagManager,
IRequest $request,
IPreview $previewManager,
- EventDispatcherInterface $eventDispatcher
+ EventDispatcherInterface $eventDispatcher,
+ IL10N $l10n
) {
$this->config = $config;
$this->logger = $logger;
@@ -97,6 +101,7 @@ class ServerFactory {
$this->request = $request;
$this->previewManager = $previewManager;
$this->eventDispatcher = $eventDispatcher;
+ $this->l10n = $l10n;
}
/**
@@ -118,7 +123,7 @@ class ServerFactory {
$server->setBaseUri($baseUri);
// Load plugins
- $server->addPlugin(new \OCA\DAV\Connector\Sabre\MaintenancePlugin($this->config));
+ $server->addPlugin(new \OCA\DAV\Connector\Sabre\MaintenancePlugin($this->config, $this->l10n));
$server->addPlugin(new \OCA\DAV\Connector\Sabre\BlockLegacyClientPlugin($this->config));
$server->addPlugin(new \OCA\DAV\Connector\Sabre\AnonymousOptionsPlugin());
$server->addPlugin($authPlugin);