From 8ce3a8e99ebec6c49f5a4032816a3ec0a317968f Mon Sep 17 00:00:00 2001 From: navid-shokri <123634558+navid-shokri@users.noreply.github.com> Date: Thu, 13 Apr 2023 13:16:51 +0000 Subject: [PATCH] initiate config container variable --- .../federatedfilesharing/lib/Controller/OcmController.php | 7 +++++++ .../lib/Controllers/ExternalSharesController.php | 8 ++++++++ 2 files changed, 15 insertions(+) diff --git a/apps/federatedfilesharing/lib/Controller/OcmController.php b/apps/federatedfilesharing/lib/Controller/OcmController.php index 02801e99c254..d6211746c4c1 100644 --- a/apps/federatedfilesharing/lib/Controller/OcmController.php +++ b/apps/federatedfilesharing/lib/Controller/OcmController.php @@ -75,6 +75,12 @@ class OcmController extends Controller { */ protected $logger; + /** + * @var IConfig + */ + protected $config; + + /** * OcmController constructor. * @@ -105,6 +111,7 @@ public function __construct( $this->addressHandler = $addressHandler; $this->fedShareManager = $fedShareManager; $this->logger = $logger; + $this->config = \OC::$server->getConfig(); } /** diff --git a/apps/files_sharing/lib/Controllers/ExternalSharesController.php b/apps/files_sharing/lib/Controllers/ExternalSharesController.php index 093f1d40a04b..fe7bde73b59d 100644 --- a/apps/files_sharing/lib/Controllers/ExternalSharesController.php +++ b/apps/files_sharing/lib/Controllers/ExternalSharesController.php @@ -50,6 +50,12 @@ class ExternalSharesController extends Controller { */ private $dispatcher; + /** + * @var IConfig + */ + protected $config; + + /** * ExternalSharesController constructor. * @@ -70,6 +76,8 @@ public function __construct( $this->externalManager = $externalManager; $this->clientService = $clientService; $this->dispatcher = $eventDispatcher; + $this->config = \OC::$server->getConfig(); + // Allow other apps to add an external manager for user-to-group shares $managerClass = $this->config->getSystemValue('sharing.groupExternalManager'); if ($managerClass !== '') {