]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fix remaining #25359 25566/head
authorRoeland Jago Douma <roeland@famdouma.nl>
Wed, 10 Feb 2021 14:41:25 +0000 (15:41 +0100)
committerRoeland Jago Douma <roeland@famdouma.nl>
Wed, 10 Feb 2021 14:41:25 +0000 (15:41 +0100)
As a wise man once said:

"I like PRs that pass tests before merging"
C. Wurst, Feb 9th 2021

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
lib/private/AppFramework/Bootstrap/RegistrationContext.php
lib/private/legacy/OC_App.php

index 619e4f55011f5cbf83c1866bc06ff2c0a4c97796..fc13a78f3d3fa9537175b6073c98b7bd8715e6ad 100644 (file)
@@ -271,10 +271,7 @@ class RegistrationContext {
        }
 
        public function registerTemplateProvider(string $appId, string $class): void {
-               $this->templateProviders[] = [
-                       'appId' => $appId,
-                       'class' => $class,
-               ];
+               $this->templateProviders[] = new ServiceRegistration($appId, $class);
        }
 
        /**
index 530291002bbc577f95a2b6c549f69dbb5bde4c83..d48d6c4081089afe75bc51e7199c4ae775f4be16 100644 (file)
@@ -709,12 +709,12 @@ class OC_App {
 
                        try {
                                /** @var IAlternativeLogin $provider */
-                               $provider = \OC::$server->query($registration['class']);
+                               $provider = \OC::$server->query($registration->getService());
                        } catch (QueryException $e) {
                                \OC::$server->getLogger()->logException($e, [
                                        'message' => 'Alternative login option {option} can not be initialised.',
-                                       'option' => $registration['class'],
-                                       'app' => $registration['app'],
+                                       'option' => $registration->getService(),
+                                       'app' => $registration->getAppId(),
                                ]);
                        }
 
@@ -729,8 +729,8 @@ class OC_App {
                        } catch (Throwable $e) {
                                \OC::$server->getLogger()->logException($e, [
                                        'message' => 'Alternative login option {option} had an error while loading.',
-                                       'option' => $registration['class'],
-                                       'app' => $registration['app'],
+                                       'option' => $registration->getService(),
+                                       'app' => $registration->getAppId(),
                                ]);
                        }
                }