Completed
Push — master ( 2da078...a0c922 )
by
unknown
46:35 queued 17:59
created
apps/files_sharing/lib/Listener/LoadSidebarListener.php 1 patch
Indentation   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -26,28 +26,28 @@
 block discarded – undo
26 26
  */
27 27
 class LoadSidebarListener implements IEventListener {
28 28
 
29
-	public function __construct(
30
-		private IInitialState $initialState,
31
-		private IManager $shareManager,
32
-	) {
33
-	}
34
-
35
-	public function handle(Event $event): void {
36
-		if (!($event instanceof LoadSidebar)) {
37
-			return;
38
-		}
39
-		Util::addScript(Application::APP_ID, 'files_sharing_tab', 'files');
40
-
41
-		$appConfig = Server::get(IAppConfig::class);
42
-		$gsConfig = Server::get(IConfig::class);
43
-		$showFederatedToTrustedAsInternal = $gsConfig->isGlobalScaleEnabled() || $appConfig->getValueBool('files_sharing', ConfigLexicon::SHOW_FEDERATED_TO_TRUSTED_AS_INTERNAL);
44
-		$showFederatedAsInternal = ($gsConfig->isGlobalScaleEnabled() && $gsConfig->onlyInternalFederation())
45
-			|| $appConfig->getValueBool('files_sharing', ConfigLexicon::SHOW_FEDERATED_AS_INTERNAL);
46
-		$showExternalSharing = $appConfig->getValueBool('files_sharing', 'outgoing_server2server_share_enabled', true)
47
-			|| $appConfig->getValueBool('core', 'shareapi_allow_links', true);
48
-
49
-		$this->initialState->provideInitialState('showFederatedSharesAsInternal', $showFederatedAsInternal);
50
-		$this->initialState->provideInitialState('showFederatedSharesToTrustedServersAsInternal', $showFederatedToTrustedAsInternal);
51
-		$this->initialState->provideInitialState('showExternalSharing', $showExternalSharing);
52
-	}
29
+    public function __construct(
30
+        private IInitialState $initialState,
31
+        private IManager $shareManager,
32
+    ) {
33
+    }
34
+
35
+    public function handle(Event $event): void {
36
+        if (!($event instanceof LoadSidebar)) {
37
+            return;
38
+        }
39
+        Util::addScript(Application::APP_ID, 'files_sharing_tab', 'files');
40
+
41
+        $appConfig = Server::get(IAppConfig::class);
42
+        $gsConfig = Server::get(IConfig::class);
43
+        $showFederatedToTrustedAsInternal = $gsConfig->isGlobalScaleEnabled() || $appConfig->getValueBool('files_sharing', ConfigLexicon::SHOW_FEDERATED_TO_TRUSTED_AS_INTERNAL);
44
+        $showFederatedAsInternal = ($gsConfig->isGlobalScaleEnabled() && $gsConfig->onlyInternalFederation())
45
+            || $appConfig->getValueBool('files_sharing', ConfigLexicon::SHOW_FEDERATED_AS_INTERNAL);
46
+        $showExternalSharing = $appConfig->getValueBool('files_sharing', 'outgoing_server2server_share_enabled', true)
47
+            || $appConfig->getValueBool('core', 'shareapi_allow_links', true);
48
+
49
+        $this->initialState->provideInitialState('showFederatedSharesAsInternal', $showFederatedAsInternal);
50
+        $this->initialState->provideInitialState('showFederatedSharesToTrustedServersAsInternal', $showFederatedToTrustedAsInternal);
51
+        $this->initialState->provideInitialState('showExternalSharing', $showExternalSharing);
52
+    }
53 53
 }
Please login to merge, or discard this patch.