Loading lib/Command/UpdateBlacklistedDomains.php +6 −1 Original line number Diff line number Diff line Loading @@ -9,13 +9,17 @@ use OCA\EcloudAccounts\Service\BlackListService; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; use OCP\ILogger; class UpdateBlacklistedDomains extends Command { private BlackListService $blackListService; private ILogger $logger; public function __construct(BlackListService $blackListService) { public function __construct(BlackListService $blackListService, ILogger $logger) { parent::__construct(); $this->blackListService = $blackListService; $this->logger = $logger; } protected function configure() { Loading @@ -27,6 +31,7 @@ class UpdateBlacklistedDomains extends Command { $this->blackListService->updateBlacklistedDomains(); $output->writeln('Updated blacklisted domains for creation.'); } catch (\Throwable $th) { $this->logger->error('Error while updating blacklisted domains. ' . $th->getMessage()); $output->writeln('Error while updating blacklisted domains.'); } return 1; Loading lib/Service/BlackListService.php +1 −4 Original line number Diff line number Diff line Loading @@ -4,8 +4,6 @@ declare(strict_types=1); namespace OCA\EcloudAccounts\Service; require __DIR__ . '/../../vendor/autoload.php'; use OCP\Files\IAppData; use OCP\Files\NotFoundException; use OCP\ILogger; Loading Loading @@ -68,7 +66,6 @@ class BlackListService { try { $currentFolder = $this->appData->getFolder($foldername); } catch (NotFoundException $e) { $this->logger->error('Folder '.$foldername.' not found!'); $currentFolder = $this->appData->newFolder($foldername); } $filename = self::BLACKLISTED_DOMAINS_FILE_NAME; Loading @@ -92,7 +89,7 @@ class BlackListService { } return json_decode($blacklistedDomainsInJson, true); } catch (NotFoundException $e) { $this->logger->error('Blacklisted domains file '.$document.' not found!'); $this->logger->warning('Blacklisted domains file '.$document.' not found!'); return []; } Loading Loading
lib/Command/UpdateBlacklistedDomains.php +6 −1 Original line number Diff line number Diff line Loading @@ -9,13 +9,17 @@ use OCA\EcloudAccounts\Service\BlackListService; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; use OCP\ILogger; class UpdateBlacklistedDomains extends Command { private BlackListService $blackListService; private ILogger $logger; public function __construct(BlackListService $blackListService) { public function __construct(BlackListService $blackListService, ILogger $logger) { parent::__construct(); $this->blackListService = $blackListService; $this->logger = $logger; } protected function configure() { Loading @@ -27,6 +31,7 @@ class UpdateBlacklistedDomains extends Command { $this->blackListService->updateBlacklistedDomains(); $output->writeln('Updated blacklisted domains for creation.'); } catch (\Throwable $th) { $this->logger->error('Error while updating blacklisted domains. ' . $th->getMessage()); $output->writeln('Error while updating blacklisted domains.'); } return 1; Loading
lib/Service/BlackListService.php +1 −4 Original line number Diff line number Diff line Loading @@ -4,8 +4,6 @@ declare(strict_types=1); namespace OCA\EcloudAccounts\Service; require __DIR__ . '/../../vendor/autoload.php'; use OCP\Files\IAppData; use OCP\Files\NotFoundException; use OCP\ILogger; Loading Loading @@ -68,7 +66,6 @@ class BlackListService { try { $currentFolder = $this->appData->getFolder($foldername); } catch (NotFoundException $e) { $this->logger->error('Folder '.$foldername.' not found!'); $currentFolder = $this->appData->newFolder($foldername); } $filename = self::BLACKLISTED_DOMAINS_FILE_NAME; Loading @@ -92,7 +89,7 @@ class BlackListService { } return json_decode($blacklistedDomainsInJson, true); } catch (NotFoundException $e) { $this->logger->error('Blacklisted domains file '.$document.' not found!'); $this->logger->warning('Blacklisted domains file '.$document.' not found!'); return []; } Loading