Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorCôme Chilliet <come.chilliet@nextcloud.com>2022-03-31 16:51:29 +0300
committerCôme Chilliet <come.chilliet@nextcloud.com>2022-05-02 11:52:44 +0300
commit5fb9de62488dec879de14f0bf2b703b7a9c3a1b7 (patch)
treea73a737ee17093cd8804a2df9b41748fd9231c25 /apps
parente2531f8503dea904dd1cb389ca017ce7bda5ccfc (diff)
Migrate last instances of $server::getLogger() from dav
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'apps')
-rw-r--r--apps/dav/appinfo/v1/caldav.php6
-rw-r--r--apps/dav/appinfo/v1/carddav.php5
-rw-r--r--apps/dav/appinfo/v1/publicwebdav.php2
-rw-r--r--apps/dav/appinfo/v1/webdav.php2
-rw-r--r--apps/dav/lib/CalDAV/InvitationResponse/InvitationResponseServer.php3
-rw-r--r--apps/dav/lib/Command/CreateCalendar.php3
6 files changed, 12 insertions, 9 deletions
diff --git a/apps/dav/appinfo/v1/caldav.php b/apps/dav/appinfo/v1/caldav.php
index 75400264f75..9036a30f95c 100644
--- a/apps/dav/appinfo/v1/caldav.php
+++ b/apps/dav/appinfo/v1/caldav.php
@@ -59,7 +59,7 @@ $principalBackend = new Principal(
$db = \OC::$server->getDatabaseConnection();
$userManager = \OC::$server->getUserManager();
$random = \OC::$server->getSecureRandom();
-$logger = \OC::$server->getLogger();
+$logger = \OC::$server->get(LoggerInterface::class);
$dispatcher = \OC::$server->get(\OCP\EventDispatcher\IEventDispatcher::class);
$legacyDispatcher = \OC::$server->getEventDispatcher();
$config = \OC::$server->get(\OCP\IConfig::class);
@@ -84,7 +84,7 @@ $sendInvitations = \OC::$server->getConfig()->getAppValue('dav', 'sendInvitation
$principalCollection = new \Sabre\CalDAV\Principal\Collection($principalBackend);
$principalCollection->disableListing = !$debugging; // Disable listing
-$addressBookRoot = new CalendarRoot($principalBackend, $calDavBackend, 'principals', \OC::$server->get(LoggerInterface::class));
+$addressBookRoot = new CalendarRoot($principalBackend, $calDavBackend, 'principals', $logger);
$addressBookRoot->disableListing = !$debugging; // Disable listing
$nodes = [
@@ -115,7 +115,7 @@ $server->addPlugin(new \OCA\DAV\CalDAV\Schedule\Plugin(\OC::$server->getConfig()
if ($sendInvitations) {
$server->addPlugin(\OC::$server->query(\OCA\DAV\CalDAV\Schedule\IMipPlugin::class));
}
-$server->addPlugin(new ExceptionLoggerPlugin('caldav', \OC::$server->getLogger()));
+$server->addPlugin(new ExceptionLoggerPlugin('caldav', $logger));
// And off we go!
$server->exec();
diff --git a/apps/dav/appinfo/v1/carddav.php b/apps/dav/appinfo/v1/carddav.php
index 53449b91c4b..a0306118781 100644
--- a/apps/dav/appinfo/v1/carddav.php
+++ b/apps/dav/appinfo/v1/carddav.php
@@ -36,6 +36,7 @@ use OCA\DAV\Connector\Sabre\ExceptionLoggerPlugin;
use OCA\DAV\Connector\Sabre\MaintenancePlugin;
use OCA\DAV\Connector\Sabre\Principal;
use OCP\App\IAppManager;
+use Psr\Log\LoggerInterface;
use Sabre\CardDAV\Plugin;
$authBackend = new Auth(
@@ -95,9 +96,9 @@ $server->addPlugin(new \Sabre\DAV\Sync\Plugin());
$server->addPlugin(new \Sabre\CardDAV\VCFExportPlugin());
$server->addPlugin(new \OCA\DAV\CardDAV\ImageExportPlugin(new \OCA\DAV\CardDAV\PhotoCache(
\OC::$server->getAppDataDir('dav-photocache'),
- \OC::$server->getLogger()
+ \OC::$server->get(LoggerInterface::class)
)));
-$server->addPlugin(new ExceptionLoggerPlugin('carddav', \OC::$server->getLogger()));
+$server->addPlugin(new ExceptionLoggerPlugin('carddav', \OC::$server->get(LoggerInterface::class)));
// And off we go!
$server->exec();
diff --git a/apps/dav/appinfo/v1/publicwebdav.php b/apps/dav/appinfo/v1/publicwebdav.php
index c99c5bcd833..43b472c107b 100644
--- a/apps/dav/appinfo/v1/publicwebdav.php
+++ b/apps/dav/appinfo/v1/publicwebdav.php
@@ -48,7 +48,7 @@ $authPlugin = new \Sabre\DAV\Auth\Plugin($authBackend);
$serverFactory = new OCA\DAV\Connector\Sabre\ServerFactory(
\OC::$server->getConfig(),
- \OC::$server->getLogger(),
+ \OC::$server->get(Psr\Log\LoggerInterface::class),
\OC::$server->getDatabaseConnection(),
\OC::$server->getUserSession(),
\OC::$server->getMountManager(),
diff --git a/apps/dav/appinfo/v1/webdav.php b/apps/dav/appinfo/v1/webdav.php
index 7b0a0ae11df..e39a6b48d57 100644
--- a/apps/dav/appinfo/v1/webdav.php
+++ b/apps/dav/appinfo/v1/webdav.php
@@ -39,7 +39,7 @@ ignore_user_abort(true);
$serverFactory = new \OCA\DAV\Connector\Sabre\ServerFactory(
\OC::$server->getConfig(),
- \OC::$server->getLogger(),
+ \OC::$server->get(Psr\Log\LoggerInterface::class),
\OC::$server->getDatabaseConnection(),
\OC::$server->getUserSession(),
\OC::$server->getMountManager(),
diff --git a/apps/dav/lib/CalDAV/InvitationResponse/InvitationResponseServer.php b/apps/dav/lib/CalDAV/InvitationResponse/InvitationResponseServer.php
index 5317dc1b169..c8da92c8277 100644
--- a/apps/dav/lib/CalDAV/InvitationResponse/InvitationResponseServer.php
+++ b/apps/dav/lib/CalDAV/InvitationResponse/InvitationResponseServer.php
@@ -35,6 +35,7 @@ use OCA\DAV\Connector\Sabre\DavAclPlugin;
use OCA\DAV\Events\SabrePluginAuthInitEvent;
use OCA\DAV\RootCollection;
use OCP\EventDispatcher\IEventDispatcher;
+use Psr\Log\LoggerInterface;
use Sabre\VObject\ITip\Message;
class InvitationResponseServer {
@@ -47,7 +48,7 @@ class InvitationResponseServer {
*/
public function __construct(bool $public = true) {
$baseUri = \OC::$WEBROOT . '/remote.php/dav/';
- $logger = \OC::$server->getLogger();
+ $logger = \OC::$server->get(LoggerInterface::class);
/** @var IEventDispatcher $dispatcher */
$dispatcher = \OC::$server->query(IEventDispatcher::class);
diff --git a/apps/dav/lib/Command/CreateCalendar.php b/apps/dav/lib/Command/CreateCalendar.php
index 1d818809245..2bea82a345e 100644
--- a/apps/dav/lib/Command/CreateCalendar.php
+++ b/apps/dav/lib/Command/CreateCalendar.php
@@ -34,6 +34,7 @@ use OCP\IConfig;
use OCP\IDBConnection;
use OCP\IGroupManager;
use OCP\IUserManager;
+use Psr\Log\LoggerInterface;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
@@ -91,7 +92,7 @@ class CreateCalendar extends Command {
\OC::$server->getL10NFactory(),
);
$random = \OC::$server->getSecureRandom();
- $logger = \OC::$server->getLogger();
+ $logger = \OC::$server->get(LoggerInterface::class);
$dispatcher = \OC::$server->get(IEventDispatcher::class);
$legacyDispatcher = \OC::$server->getEventDispatcher();
$config = \OC::$server->get(IConfig::class);