diff options
author | dartcafe <github@dartcafe.de> | 2021-03-24 01:18:47 +0300 |
---|---|---|
committer | dartcafe <github@dartcafe.de> | 2021-03-24 01:18:47 +0300 |
commit | 03bd2bca7a04e9bb8efc01caf4957a77cd956e45 (patch) | |
tree | 451a8c14b908d273c4a8e4e85fac977bd54dab8f /lib/Service/ShareService.php | |
parent | 538d5dd7af238de33811d0ebe99c2f2f7eea479c (diff) |
change logger to Psr\Log\LoggerInterface
Signed-off-by: dartcafe <github@dartcafe.de>
Diffstat (limited to 'lib/Service/ShareService.php')
-rw-r--r-- | lib/Service/ShareService.php | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/lib/Service/ShareService.php b/lib/Service/ShareService.php index d15582d7..c1cf37f6 100644 --- a/lib/Service/ShareService.php +++ b/lib/Service/ShareService.php @@ -23,6 +23,7 @@ namespace OCA\Polls\Service; +use Psr\Log\LoggerInterface; use OCP\AppFramework\Db\DoesNotExistException; use OCP\AppFramework\Db\MultipleObjectsReturnedException; use OCA\Polls\Exceptions\NotAuthorizedException; @@ -39,6 +40,12 @@ use OCA\Polls\Model\UserGroupClass; class ShareService { + /** @var LoggerInterface */ + private $logger; + + /** @var string */ + private $appName; + /** @var string|null */ private $userId; @@ -61,6 +68,8 @@ class ShareService { private $acl; public function __construct( + string $AppName, + LoggerInterface $logger, ?string $UserId, IGroupManager $groupManager, SystemService $systemService, @@ -69,6 +78,8 @@ class ShareService { MailService $mailService, Acl $acl ) { + $this->appName = $AppName; + $this->logger = $logger; $this->userId = $UserId; $this->groupManager = $groupManager; $this->systemService = $systemService; @@ -127,7 +138,7 @@ class ShareService { case Share::TYPE_EXTERNAL: break; default: - \OC::$server->getLogger()->alert(json_encode('invalid share type ' . $this->share->getType())); + $this->logger->alert(json_encode('invalid share type ' . $this->share->getType())); throw new NotAuthorizedException; } } |