summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorLukas Reschke <lukas@statuscode.ch>2017-04-11 14:39:46 +0200
committerGitHub <noreply@github.com>2017-04-11 14:39:46 +0200
commitafb5d45705f7d7743b9dfd2d79b618938cb05b77 (patch)
treea0828097cae435e504350d6aae0bbca56f40435c /core
parent5ca5ebe584999d6dbc4b363bb285c8ae00c1b5f2 (diff)
parentd83c8e02718f5ae555e75d8582904611a4d6766a (diff)
downloadnextcloud-server-afb5d45705f7d7743b9dfd2d79b618938cb05b77.tar.gz
nextcloud-server-afb5d45705f7d7743b9dfd2d79b618938cb05b77.zip
Merge pull request #4256 from nextcloud/theming
Move OC_Defaults to OCP\Defaults
Diffstat (limited to 'core')
-rw-r--r--core/Application.php22
-rw-r--r--core/Command/Maintenance/Install.php3
-rw-r--r--core/Controller/LostController.php7
-rw-r--r--core/Controller/OCJSController.php5
-rw-r--r--core/templates/404.php2
5 files changed, 10 insertions, 29 deletions
diff --git a/core/Application.php b/core/Application.php
index 33b7dd1b333..6fa301e5906 100644
--- a/core/Application.php
+++ b/core/Application.php
@@ -30,11 +30,8 @@
namespace OC\Core;
-use OC\AppFramework\Utility\SimpleContainer;
use OC\Core\Controller\JsController;
-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;
@@ -70,25 +67,6 @@ 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()
- );
- });
$container->registerService(JsController::class, function () use ($container) {
return new JsController(
$container->query('AppName'),
diff --git a/core/Command/Maintenance/Install.php b/core/Command/Maintenance/Install.php
index 86180489fa4..fa6262d24ad 100644
--- a/core/Command/Maintenance/Install.php
+++ b/core/Command/Maintenance/Install.php
@@ -30,6 +30,7 @@ namespace OC\Core\Command\Maintenance;
use InvalidArgumentException;
use OC\Setup;
use OC\SystemConfig;
+use OCP\Defaults;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Helper\QuestionHelper;
use Symfony\Component\Console\Input\InputInterface;
@@ -70,7 +71,7 @@ class Install extends Command {
// validate the environment
$server = \OC::$server;
$setupHelper = new Setup($this->config, $server->getIniWrapper(),
- $server->getL10N('lib'), $server->getThemingDefaults(), $server->getLogger(),
+ $server->getL10N('lib'), $server->query(Defaults::class), $server->getLogger(),
$server->getSecureRandom());
$sysInfo = $setupHelper->getSystemInfo(true);
$errors = $sysInfo['errors'];
diff --git a/core/Controller/LostController.php b/core/Controller/LostController.php
index 4de1cf5eb00..639dd9da574 100644
--- a/core/Controller/LostController.php
+++ b/core/Controller/LostController.php
@@ -34,6 +34,7 @@ use OCA\Encryption\Exceptions\PrivateKeyMissingException;
use \OCP\AppFramework\Controller;
use \OCP\AppFramework\Http\TemplateResponse;
use OCP\AppFramework\Utility\ITimeFactory;
+use OCP\Defaults;
use OCP\Encryption\IManager;
use \OCP\IURLGenerator;
use \OCP\IRequest;
@@ -58,7 +59,7 @@ class LostController extends Controller {
protected $urlGenerator;
/** @var IUserManager */
protected $userManager;
- /** @var \OC_Defaults */
+ /** @var Defaults */
protected $defaults;
/** @var IL10N */
protected $l10n;
@@ -82,7 +83,7 @@ class LostController extends Controller {
* @param IRequest $request
* @param IURLGenerator $urlGenerator
* @param IUserManager $userManager
- * @param \OC_Defaults $defaults
+ * @param Defaults $defaults
* @param IL10N $l10n
* @param IConfig $config
* @param ISecureRandom $secureRandom
@@ -96,7 +97,7 @@ class LostController extends Controller {
IRequest $request,
IURLGenerator $urlGenerator,
IUserManager $userManager,
- \OC_Defaults $defaults,
+ Defaults $defaults,
IL10N $l10n,
IConfig $config,
ISecureRandom $secureRandom,
diff --git a/core/Controller/OCJSController.php b/core/Controller/OCJSController.php
index c2292a6733e..9c19f0c0adf 100644
--- a/core/Controller/OCJSController.php
+++ b/core/Controller/OCJSController.php
@@ -28,6 +28,7 @@ use OCP\App\IAppManager;
use OCP\AppFramework\Controller;
use OCP\AppFramework\Http;
use OCP\AppFramework\Http\DataDisplayResponse;
+use OCP\Defaults;
use OCP\IConfig;
use OCP\IGroupManager;
use OCP\IL10N;
@@ -47,7 +48,7 @@ class OCJSController extends Controller {
* @param string $appName
* @param IRequest $request
* @param IL10N $l
- * @param \OC_Defaults $defaults
+ * @param Defaults $defaults
* @param IAppManager $appManager
* @param ISession $session
* @param IUserSession $userSession
@@ -59,7 +60,7 @@ class OCJSController extends Controller {
public function __construct($appName,
IRequest $request,
IL10N $l,
- \OC_Defaults $defaults,
+ Defaults $defaults,
IAppManager $appManager,
ISession $session,
IUserSession $userSession,
diff --git a/core/templates/404.php b/core/templates/404.php
index 79a67b3ce2c..cc45cbeaf5d 100644
--- a/core/templates/404.php
+++ b/core/templates/404.php
@@ -1,7 +1,7 @@
<?php
/** @var $_ array */
/** @var $l \OCP\IL10N */
-/** @var $theme OC_Theme */
+/** @var $theme OCP\Defaults */
// @codeCoverageIgnoreStart
if(!isset($_)) {//also provide standalone error page
require_once '../../lib/base.php';