Skip to content

Commit a459b9c

Browse files
committed
refactor(server): Register alias when needed
And remove useless service registration Signed-off-by: Carl Schwan <carlschwan@kde.org>
1 parent 2b7415e commit a459b9c

8 files changed

Lines changed: 94 additions & 249 deletions

File tree

config/config.sample.php

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1659,15 +1659,6 @@
16591659
*/
16601660
'comments.managerFactory' => '\OC\Comments\ManagerFactory',
16611661

1662-
/**
1663-
* Replaces the default System Tags Manager Factory. This can be utilized if an
1664-
* own or 3rd-party SystemTagsManager should be used that – for instance – uses the
1665-
* filesystem instead of the database to keep the tags.
1666-
*
1667-
* Defaults to ``\OC\SystemTag\ManagerFactory``
1668-
*/
1669-
'systemtags.managerFactory' => '\OC\SystemTag\ManagerFactory',
1670-
16711662
/**
16721663
* Maintenance
16731664
*

lib/private/Activity/EventMerger.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,15 @@
1010
use OCP\Activity\IEvent;
1111
use OCP\Activity\IEventMerger;
1212
use OCP\IL10N;
13+
use OCP\L10N\IFactory;
1314

1415
class EventMerger implements IEventMerger {
15-
/**
16-
* @param IL10N $l10n
17-
*/
16+
private readonly IL10N $l10n;
17+
1818
public function __construct(
19-
protected IL10N $l10n,
19+
IFactory $factory,
2020
) {
21+
$this->l10n = $factory->get('lib');
2122
}
2223

2324
/**

lib/private/App/AppStore/Bundles/BundleFetcher.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,14 @@
88
namespace OC\App\AppStore\Bundles;
99

1010
use OCP\IL10N;
11+
use OCP\L10N\IFactory;
1112

1213
class BundleFetcher {
14+
private IL10N $l10n;
1315
public function __construct(
14-
private IL10N $l10n,
16+
IFactory $factory,
1517
) {
18+
$this->l10n = $factory->get('lib');
1619
}
1720

1821
/**

lib/private/Diagnostics/QueryLogger.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
namespace OC\Diagnostics;
1010

11+
use OC\SystemConfig;
1112
use OCP\Cache\CappedMemoryCache;
1213
use OCP\Diagnostics\IQueryLogger;
1314

@@ -20,7 +21,11 @@ class QueryLogger implements IQueryLogger {
2021
/**
2122
* QueryLogger constructor.
2223
*/
23-
public function __construct() {
24+
public function __construct(SystemConfig $config) {
25+
if ($config->getValue('debug', false)) {
26+
// In debug mode, module is being activated by default
27+
$this->activate();
28+
}
2429
$this->queries = new CappedMemoryCache(1024);
2530
}
2631

0 commit comments

Comments
 (0)