aboutsummaryrefslogtreecommitdiffstats
path: root/lib/public/Util.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/public/Util.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/public/Util.php')
-rw-r--r--lib/public/Util.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/public/Util.php b/lib/public/Util.php
index 520e4616de5..28da91c9a0f 100644
--- a/lib/public/Util.php
+++ b/lib/public/Util.php
@@ -35,9 +35,10 @@ class Util {
* get the current installed version of Nextcloud
* @return array
* @since 4.0.0
+ * @deprecated 31.0.0 Use \OCP\ServerVersion::getVersion
*/
public static function getVersion() {
- return \OC_Util::getVersion();
+ return Server::get(ServerVersion::class)->getVersion();
}
/**
@@ -46,7 +47,7 @@ class Util {
public static function hasExtendedSupport(): bool {
try {
/** @var \OCP\Support\Subscription\IRegistry */
- $subscriptionRegistry = \OCP\Server::get(\OCP\Support\Subscription\IRegistry::class);
+ $subscriptionRegistry = Server::get(\OCP\Support\Subscription\IRegistry::class);
return $subscriptionRegistry->delegateHasExtendedSupport();
} catch (ContainerExceptionInterface $e) {
}
@@ -66,9 +67,10 @@ class Util {
* Get current update channel
* @return string
* @since 8.1.0
+ * @deprecated 31.0.0 Use \OCP\ServerVersion::getChannel
*/
public static function getChannel() {
- return \OC_Util::getChannel();
+ return \OCP\Server::get(ServerVersion::class)->getChannel();
}
/**
@@ -567,7 +569,7 @@ class Util {
if (!function_exists($functionName)) {
return false;
}
- $ini = \OCP\Server::get(IniGetWrapper::class);
+ $ini = Server::get(IniGetWrapper::class);
$disabled = explode(',', $ini->get('disable_functions') ?: '');
$disabled = array_map('trim', $disabled);
if (in_array($functionName, $disabled)) {