summaryrefslogtreecommitdiffstats
path: root/lib/private/Server.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/Server.php')
-rw-r--r--lib/private/Server.php23
1 files changed, 15 insertions, 8 deletions
diff --git a/lib/private/Server.php b/lib/private/Server.php
index 7724feb551b..25c0b5d9cc9 100644
--- a/lib/private/Server.php
+++ b/lib/private/Server.php
@@ -43,6 +43,7 @@ namespace OC;
use bantu\IniGetWrapper\IniGetWrapper;
use OC\App\AppManager;
+use OC\App\AppStore\Bundles\BundleFetcher;
use OC\App\AppStore\Fetcher\AppFetcher;
use OC\App\AppStore\Fetcher\CategoryFetcher;
use OC\AppFramework\Http\Request;
@@ -602,22 +603,23 @@ class Server extends ServerContainer implements IServerContainer {
);
});
$this->registerAlias('HttpClientService', \OCP\Http\Client\IClientService::class);
-
$this->registerService(\OCP\Diagnostics\IEventLogger::class, function (Server $c) {
+ $eventLogger = new EventLogger();
if ($c->getSystemConfig()->getValue('debug', false)) {
- return new EventLogger();
- } else {
- return new NullEventLogger();
+ // In debug mode, module is being activated by default
+ $eventLogger->activate();
}
+ return $eventLogger;
});
$this->registerAlias('EventLogger', \OCP\Diagnostics\IEventLogger::class);
$this->registerService(\OCP\Diagnostics\IQueryLogger::class, function (Server $c) {
+ $queryLogger = new QueryLogger();
if ($c->getSystemConfig()->getValue('debug', false)) {
- return new QueryLogger();
- } else {
- return new NullQueryLogger();
+ // In debug mode, module is being activated by default
+ $queryLogger->activate();
}
+ return $queryLogger;
});
$this->registerAlias('QueryLogger', \OCP\Diagnostics\IQueryLogger::class);
@@ -816,7 +818,12 @@ class Server extends ServerContainer implements IServerContainer {
);
});
$this->registerAlias('MimeTypeLoader', \OCP\Files\IMimeTypeLoader::class);
-
+ $this->registerService(BundleFetcher::class, function () {
+ return new BundleFetcher($this->getL10N('lib'));
+ });
+ $this->registerService(AppFetcher::class, function() {
+ return $this->getAppFetcher();
+ });
$this->registerService(\OCP\Notification\IManager::class, function (Server $c) {
return new Manager(
$c->query(IValidator::class)