Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2019-06-11 17:08:26 +0300
committerJulius Härtl <jus@bitgrid.net>2019-06-17 17:36:23 +0300
commitdf072471a7739e0bba30bf2d1687d6461354daf1 (patch)
tree0169170e7b5fb4e280c5c34244d9943b84481eb3 /lib/public/Util.php
parent2378012ee01c8eab6438d9c9005253c5b21f5e14 (diff)
Add extendedSupport to Subscription
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'lib/public/Util.php')
-rw-r--r--lib/public/Util.php18
1 files changed, 15 insertions, 3 deletions
diff --git a/lib/public/Util.php b/lib/public/Util.php
index 302eb8d035e..7e9f6b2efbc 100644
--- a/lib/public/Util.php
+++ b/lib/public/Util.php
@@ -89,7 +89,19 @@ class Util {
public static function getVersion() {
return \OC_Util::getVersion();
}
-
+
+ /**
+ * @since 17.0.0
+ */
+ public static function hasExtendedSupport(): bool {
+ try {
+ /** @var \OCP\Support\Subscription\IRegistry */
+ $subscriptionRegistry = \OC::$server->query(\OCP\Support\Subscription\IRegistry::class);
+ return $subscriptionRegistry->delegateHasExtendedSupport();
+ } catch (AppFramework\QueryException $e) {}
+ return \OC::$server->getConfig()->getSystemValueBool('extendedSupport', false);
+ }
+
/**
* Set current update channel
* @param string $channel
@@ -98,7 +110,7 @@ class Util {
public static function setChannel($channel) {
\OC::$server->getConfig()->setSystemValue('updater.release.channel', $channel);
}
-
+
/**
* Get current update channel
* @return string
@@ -501,7 +513,7 @@ class Util {
public static function needUpgrade() {
if (!isset(self::$needUpgradeCache)) {
self::$needUpgradeCache=\OC_Util::needUpgrade(\OC::$server->getSystemConfig());
- }
+ }
return self::$needUpgradeCache;
}