aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Server.php
diff options
context:
space:
mode:
authorJulius Knorr <jus@bitgrid.net>2024-09-17 22:38:44 +0200
committerJulius Knorr <jus@bitgrid.net>2024-09-20 14:53:34 +0200
commit606241caebda2e01702c0d08adbc35ace8d01f13 (patch)
treeda9cc49d1079724a9192f89415c594b97db93aa9 /lib/private/Server.php
parent7ff911665e7507a800e05fe9cd80e0304cd11dbc (diff)
downloadnextcloud-server-606241caebda2e01702c0d08adbc35ace8d01f13.tar.gz
nextcloud-server-606241caebda2e01702c0d08adbc35ace8d01f13.zip
chore(legacy): Introduce public version ct plass and drop version methods from OC_Utilclean/version-ocp
Signed-off-by: Julius Knorr <jus@bitgrid.net>
Diffstat (limited to 'lib/private/Server.php')
-rw-r--r--lib/private/Server.php12
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/private/Server.php b/lib/private/Server.php
index 943b4fc6997..19c3b72c11c 100644
--- a/lib/private/Server.php
+++ b/lib/private/Server.php
@@ -216,6 +216,7 @@ use OCP\Security\ISecureRandom;
use OCP\Security\ITrustedDomainHelper;
use OCP\Security\RateLimiting\ILimiter;
use OCP\Security\VerificationToken\IVerificationToken;
+use OCP\ServerVersion;
use OCP\Settings\IDeclarativeManager;
use OCP\SetupCheck\ISetupCheckManager;
use OCP\Share\IProviderFactory;
@@ -593,10 +594,12 @@ class Server extends ServerContainer implements IServerContainer {
);
/** @var SystemConfig $config */
$config = $c->get(SystemConfig::class);
+ /** @var ServerVersion $serverVersion */
+ $serverVersion = $c->get(ServerVersion::class);
if ($config->getValue('installed', false) && !(defined('PHPUNIT_RUN') && PHPUNIT_RUN)) {
$logQuery = $config->getValue('log_query');
- $prefixClosure = function () use ($logQuery) {
+ $prefixClosure = function () use ($logQuery, $serverVersion) {
if (!$logQuery) {
try {
$v = \OC_App::getAppVersions();
@@ -613,7 +616,7 @@ class Server extends ServerContainer implements IServerContainer {
'log_query' => 'enabled',
];
}
- $v['core'] = implode(',', \OC_Util::getVersion());
+ $v['core'] = implode(',', $serverVersion->getVersion());
$version = implode(',', $v);
$instanceId = \OC_Util::getInstanceId();
$path = \OC::$SERVERROOT;
@@ -865,7 +868,8 @@ class Server extends ServerContainer implements IServerContainer {
$appManager = $c->get(IAppManager::class);
return new Checker(
- new EnvironmentHelper(),
+ $c->get(ServerVersion::class),
+ $c->get(EnvironmentHelper::class),
new FileAccessHelper(),
new AppLocator(),
$config,
@@ -1056,7 +1060,7 @@ class Server extends ServerContainer implements IServerContainer {
$c->get(IUserSession::class),
$c->get(IURLGenerator::class),
$c->get(ICacheFactory::class),
- new Util($c->get(\OCP\IConfig::class), $this->get(IAppManager::class), $c->getAppDataDir('theming'), $imageManager),
+ new Util($c->get(ServerVersion::class), $c->get(\OCP\IConfig::class), $this->get(IAppManager::class), $c->getAppDataDir('theming'), $imageManager),
$imageManager,
$c->get(IAppManager::class),
$c->get(INavigationManager::class),