Skip to content

Commit

Permalink
Merge pull request #3163 from nextcloud/issue-3148-wrong-page-title-o…
Browse files Browse the repository at this point in the history
…n-non-nonce-browser

Use correct theming when returning the defaults
  • Loading branch information
LukasReschke authored Jan 26, 2017
2 parents 29f5ab1 + 246affb commit 43315e2
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions core/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -66,5 +68,24 @@ public function __construct() {
$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()
);
});
}
}

0 comments on commit 43315e2

Please sign in to comment.