]> source.dussan.org Git - nextcloud-server.git/commitdiff
Use correct theming when returning the defaults 3163/head
authorJoas Schilling <coding@schilljs.com>
Thu, 19 Jan 2017 15:55:09 +0000 (16:55 +0100)
committerJoas Schilling <coding@schilljs.com>
Thu, 19 Jan 2017 15:55:09 +0000 (16:55 +0100)
Signed-off-by: Joas Schilling <coding@schilljs.com>
core/Application.php

index dad7546dcb8616d6497f2aecc4cb852c480c8673..6621964c289bc89c08fae2d5276b95b972e7a0c4 100644 (file)
@@ -30,7 +30,9 @@
 
 namespace OC\Core;
 
+use OC\Core\Controller\OCJSController;
 use OC\Security\IdentityProof\Manager;
+use OC\Server;
 use OCP\AppFramework\App;
 use OC\Core\Controller\CssController;
 use OCP\AppFramework\Utility\ITimeFactory;
@@ -66,5 +68,24 @@ class Application extends App {
                                $container->query(ITimeFactory::class)
                        );
                });
+               $container->registerService(OCJSController::class, function () use ($container) {
+                       /** @var Server $server */
+                       $server = $container->getServer();
+                       return new OCJSController(
+                               $container->query('appName'),
+                               $server->getRequest(),
+                               $server->getL10N('core'),
+                               // This is required for the theming to overwrite the `OC_Defaults`, see
+                               // https://github.com/nextcloud/server/issues/3148
+                               $server->getThemingDefaults(),
+                               $server->getAppManager(),
+                               $server->getSession(),
+                               $server->getUserSession(),
+                               $server->getConfig(),
+                               $server->getGroupManager(),
+                               $server->getIniWrapper(),
+                               $server->getURLGenerator()
+                       );
+               });
        }
 }