Add extendedSupport to Subscription

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl 2019-06-11 16:08:26 +02:00
parent 1d24a06aa5
commit 78d7448c7d
No known key found for this signature in database
GPG Key ID: 4C614C6ED2CDE6DF
3 changed files with 12 additions and 5 deletions

View File

@ -97,6 +97,7 @@ class OCSController extends \OCP\AppFramework\OCSController {
'micro' => $micro,
'string' => \OC_Util::getVersionString(),
'edition' => '',
'extendedSupport' => \OCP\Util::hasExtendedSupport()
);
if($this->userSession->isLoggedIn()) {

View File

@ -89,7 +89,11 @@ class Util {
public static function getVersion() {
return \OC_Util::getVersion();
}
public static function hasExtendedSupport(): bool {
return \OC::$server->getConfig()->getSystemValueBool('extendedSupport', false);
}
/**
* Set current update channel
* @param string $channel
@ -98,7 +102,7 @@ class Util {
public static function setChannel($channel) {
\OC::$server->getConfig()->setSystemValue('updater.release.channel', $channel);
}
/**
* Get current update channel
* @return string
@ -555,7 +559,7 @@ class Util {
public static function needUpgrade() {
if (!isset(self::$needUpgradeCache)) {
self::$needUpgradeCache=\OC_Util::needUpgrade(\OC::$server->getSystemConfig());
}
}
return self::$needUpgradeCache;
}

View File

@ -42,14 +42,16 @@ try {
# see core/lib/private/legacy/defaults.php and core/themes/example/defaults.php
# for description and defaults
$defaults = new \OCP\Defaults();
$values=array(
$values = [
'installed'=>$installed,
'maintenance' => $maintenance,
'needsDbUpgrade' => \OCP\Util::needUpgrade(),
'version'=>implode('.', \OCP\Util::getVersion()),
'versionstring'=>OC_Util::getVersionString(),
'edition'=> '',
'productname'=>$defaults->getName());
'productname'=>$defaults->getName(),
'extendedSupport' => \OCP\Util::hasExtendedSupport()
];
if (OC::$CLI) {
print_r($values);
} else {