From f471bd292fa70937050f971cba3b07e8ca3ae9d2 Mon Sep 17 00:00:00 2001 From: nfebe Date: Sat, 3 May 2025 10:34:21 +0100 Subject: fix(files_sharing): Move `ConfigLexicon` to Config dir, update sharing input - Fix autoloading for new `ConfigLexicon` - Ensure that sharing input in sharing tab respect `show-federated-shares-as-internal`: This is important, because when federated shares are shown as internal the users should add them from the internal shares section Signed-off-by: nfebe --- apps/files_sharing/lib/AppInfo/Application.php | 6 +--- apps/files_sharing/lib/AppInfo/ConfigLexicon.php | 39 ---------------------- apps/files_sharing/lib/Config/ConfigLexicon.php | 39 ++++++++++++++++++++++ .../lib/Listener/LoadSidebarListener.php | 5 +++ 4 files changed, 45 insertions(+), 44 deletions(-) delete mode 100644 apps/files_sharing/lib/AppInfo/ConfigLexicon.php create mode 100644 apps/files_sharing/lib/Config/ConfigLexicon.php (limited to 'apps/files_sharing/lib') diff --git a/apps/files_sharing/lib/AppInfo/Application.php b/apps/files_sharing/lib/AppInfo/Application.php index 1fdd042869f..8ddb3afaf33 100644 --- a/apps/files_sharing/lib/AppInfo/Application.php +++ b/apps/files_sharing/lib/AppInfo/Application.php @@ -13,6 +13,7 @@ use OC\User\DisplayNameCache; use OCA\Files\Event\LoadAdditionalScriptsEvent; use OCA\Files\Event\LoadSidebar; use OCA\Files_Sharing\Capabilities; +use OCA\Files_Sharing\Config\ConfigLexicon; use OCA\Files_Sharing\External\Manager; use OCA\Files_Sharing\External\MountProvider as ExternalMountProvider; use OCA\Files_Sharing\Helper; @@ -38,7 +39,6 @@ use OCP\AppFramework\Bootstrap\IBootContext; use OCP\AppFramework\Bootstrap\IBootstrap; use OCP\AppFramework\Bootstrap\IRegistrationContext; use OCP\AppFramework\Http\Events\BeforeTemplateRenderedEvent; -use OCP\AppFramework\Services\IInitialState; use OCP\Collaboration\Resources\LoadAdditionalScriptsEvent as ResourcesLoadAdditionalScriptsEvent; use OCP\EventDispatcher\IEventDispatcher; use OCP\Federation\ICloudIdManager; @@ -49,7 +49,6 @@ use OCP\Files\Events\Node\BeforeNodeReadEvent; use OCP\Group\Events\GroupChangedEvent; use OCP\Group\Events\GroupDeletedEvent; use OCP\Group\Events\UserAddedEvent; -use OCP\IAppConfig; use OCP\IDBConnection; use OCP\IGroup; use OCP\Share\Events\ShareCreatedEvent; @@ -116,9 +115,6 @@ class Application extends App implements IBootstrap { public function boot(IBootContext $context): void { $context->injectFn([$this, 'registerMountProviders']); $context->injectFn([$this, 'registerEventsScripts']); - $context->injectFn(function (IInitialState $initialState, IAppConfig $appConfig) { - $initialState->provideInitialState('showFederatedSharesAsInternal', $appConfig->getValueBool(self::APP_ID, ConfigLexicon::SHOW_FEDERATED_AS_INTERNAL)); - }); Helper::registerHooks(); diff --git a/apps/files_sharing/lib/AppInfo/ConfigLexicon.php b/apps/files_sharing/lib/AppInfo/ConfigLexicon.php deleted file mode 100644 index 90739fac633..00000000000 --- a/apps/files_sharing/lib/AppInfo/ConfigLexicon.php +++ /dev/null @@ -1,39 +0,0 @@ -initialState->provideInitialState('showFederatedSharesAsInternal', $appConfig->getValueBool('files_sharing', ConfigLexicon::SHOW_FEDERATED_AS_INTERNAL)); Util::addScript(Application::APP_ID, 'files_sharing_tab', 'files'); } } -- cgit v1.2.3