aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/legacy/OC_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/private/legacy/OC_Util.php
parent7ff911665e7507a800e05fe9cd80e0304cd11dbc (diff)
downloadnextcloud-server-clean/version-ocp.tar.gz
nextcloud-server-clean/version-ocp.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/legacy/OC_Util.php')
-rw-r--r--lib/private/legacy/OC_Util.php84
1 files changed, 0 insertions, 84 deletions
diff --git a/lib/private/legacy/OC_Util.php b/lib/private/legacy/OC_Util.php
index c390b7727e9..7b41f797e32 100644
--- a/lib/private/legacy/OC_Util.php
+++ b/lib/private/legacy/OC_Util.php
@@ -216,76 +216,6 @@ class OC_Util {
}
/**
- * get the current installed version of ownCloud
- *
- * @return array
- */
- public static function getVersion() {
- OC_Util::loadVersion();
- return self::$versionCache['OC_Version'];
- }
-
- /**
- * get the current installed version string of ownCloud
- *
- * @return string
- */
- public static function getVersionString() {
- OC_Util::loadVersion();
- return self::$versionCache['OC_VersionString'];
- }
-
- /**
- * @deprecated 11.0.0 the value is of no use anymore
- * @return string
- */
- public static function getEditionString() {
- return '';
- }
-
- /**
- * @description get the update channel of the current installed of ownCloud.
- * @return string
- */
- public static function getChannel() {
- OC_Util::loadVersion();
- return \OC::$server->getConfig()->getSystemValueString('updater.release.channel', self::$versionCache['OC_Channel']);
- }
-
- /**
- * @description get the build number of the current installed of ownCloud.
- * @return string
- */
- public static function getBuild() {
- OC_Util::loadVersion();
- return self::$versionCache['OC_Build'];
- }
-
- /**
- * @description load the version.php into the session as cache
- * @suppress PhanUndeclaredVariable
- */
- private static function loadVersion() {
- if (self::$versionCache !== null) {
- return;
- }
-
- $timestamp = filemtime(OC::$SERVERROOT . '/version.php');
- require OC::$SERVERROOT . '/version.php';
- /** @var int $timestamp */
- self::$versionCache['OC_Version_Timestamp'] = $timestamp;
- /** @var string $OC_Version */
- self::$versionCache['OC_Version'] = $OC_Version;
- /** @var string $OC_VersionString */
- self::$versionCache['OC_VersionString'] = $OC_VersionString;
- /** @var string $OC_Build */
- self::$versionCache['OC_Build'] = $OC_Build;
-
- /** @var string $OC_Channel */
- self::$versionCache['OC_Channel'] = $OC_Channel;
- }
-
- /**
* generates a path for JS/CSS files. If no application is provided it will create the path for core.
*
* @param string $application application to get the files from
@@ -1022,20 +952,6 @@ class OC_Util {
}
/**
- * A human readable string is generated based on version and build number
- *
- * @return string
- */
- public static function getHumanVersion() {
- $version = OC_Util::getVersionString();
- $build = OC_Util::getBuild();
- if (!empty($build) and OC_Util::getChannel() === 'daily') {
- $version .= ' Build:' . $build;
- }
- return $version;
- }
-
- /**
* Check whether the instance needs to perform an upgrade,
* either when the core version is higher or any app requires
* an upgrade.