aboutsummaryrefslogtreecommitdiffstats
path: root/core/Application.php
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2017-01-19 16:55:09 +0100
committerJoas Schilling <coding@schilljs.com>2017-01-19 16:55:09 +0100
commit246affb1a057dc11ba6af6bcd08fbf5c53393e01 (patch)
tree103fdc1c6661da528aafbe7514aac8334b33c55b /core/Application.php
parent13a5c5d64c3ef0942225f02e8d812e0a4f621aa9 (diff)
downloadnextcloud-server-246affb1a057dc11ba6af6bcd08fbf5c53393e01.tar.gz
nextcloud-server-246affb1a057dc11ba6af6bcd08fbf5c53393e01.zip
Use correct theming when returning the defaults
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'core/Application.php')
-rw-r--r--core/Application.php21
1 files changed, 21 insertions, 0 deletions
diff --git a/core/Application.php b/core/Application.php
index dad7546dcb8..6621964c289 100644
--- a/core/Application.php
+++ b/core/Application.php
@@ -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()
+ );
+ });
}
}