diff options
Diffstat (limited to 'apps/dav')
-rw-r--r-- | apps/dav/lib/Connector/Sabre/ServerFactory.php | 2 | ||||
-rw-r--r-- | apps/dav/lib/DAV/ViewOnlyPlugin.php | 8 | ||||
-rw-r--r-- | apps/dav/lib/Server.php | 2 | ||||
-rw-r--r-- | apps/dav/tests/unit/DAV/ViewOnlyPluginTest.php | 4 |
4 files changed, 8 insertions, 8 deletions
diff --git a/apps/dav/lib/Connector/Sabre/ServerFactory.php b/apps/dav/lib/Connector/Sabre/ServerFactory.php index 5b9471d537c..4c57f3412e3 100644 --- a/apps/dav/lib/Connector/Sabre/ServerFactory.php +++ b/apps/dav/lib/Connector/Sabre/ServerFactory.php @@ -161,7 +161,7 @@ class ServerFactory { // Allow view-only plugin for webdav requests $server->addPlugin(new ViewOnlyPlugin( - \OC::$server->getLogger() + $this->logger )); if ($this->userSession->isLoggedIn()) { diff --git a/apps/dav/lib/DAV/ViewOnlyPlugin.php b/apps/dav/lib/DAV/ViewOnlyPlugin.php index cd322572dcc..17b0823b7d7 100644 --- a/apps/dav/lib/DAV/ViewOnlyPlugin.php +++ b/apps/dav/lib/DAV/ViewOnlyPlugin.php @@ -26,7 +26,7 @@ use OCA\DAV\Connector\Sabre\File as DavFile; use OCA\DAV\Meta\MetaFile; use OCP\Files\FileInfo; use OCP\Files\NotFoundException; -use OCP\ILogger; +use Psr\Log\LoggerInterface; use Sabre\DAV\Server; use Sabre\DAV\ServerPlugin; use Sabre\HTTP\RequestInterface; @@ -40,13 +40,13 @@ class ViewOnlyPlugin extends ServerPlugin { /** @var Server $server */ private $server; - /** @var ILogger $logger */ + /** @var LoggerInterface $logger */ private $logger; /** - * @param ILogger $logger + * @param LoggerInterface $logger */ - public function __construct(ILogger $logger) { + public function __construct(LoggerInterface $logger) { $this->logger = $logger; $this->server = null; } diff --git a/apps/dav/lib/Server.php b/apps/dav/lib/Server.php index 5c83e5c2963..2cfcb3f5393 100644 --- a/apps/dav/lib/Server.php +++ b/apps/dav/lib/Server.php @@ -232,7 +232,7 @@ class Server { // Allow view-only plugin for webdav requests $this->server->addPlugin(new ViewOnlyPlugin( - \OC::$server->getLogger() + $logger )); if (BrowserErrorPagePlugin::isBrowserRequest($request)) { diff --git a/apps/dav/tests/unit/DAV/ViewOnlyPluginTest.php b/apps/dav/tests/unit/DAV/ViewOnlyPluginTest.php index 59a557d7006..3bd7a2d6dde 100644 --- a/apps/dav/tests/unit/DAV/ViewOnlyPluginTest.php +++ b/apps/dav/tests/unit/DAV/ViewOnlyPluginTest.php @@ -25,9 +25,9 @@ use OCA\Files_Sharing\SharedStorage; use OCA\DAV\Connector\Sabre\File as DavFile; use OCP\Files\File; use OCP\Files\Storage\IStorage; -use OCP\ILogger; use OCP\Share\IAttributes; use OCP\Share\IShare; +use Psr\Log\LoggerInterface; use Sabre\DAV\Server; use Sabre\DAV\Tree; use Test\TestCase; @@ -45,7 +45,7 @@ class ViewOnlyPluginTest extends TestCase { public function setUp(): void { $this->plugin = new ViewOnlyPlugin( - $this->createMock(ILogger::class) + $this->createMock(LoggerInterface::class) ); $this->request = $this->createMock(RequestInterface::class); $this->tree = $this->createMock(Tree::class); |