diff options
author | Roeland Jago Douma <rullzer@users.noreply.github.com> | 2019-10-30 10:54:42 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-30 10:54:42 +0100 |
commit | 938428c2756c658aab3a18937b06105b8004aae3 (patch) | |
tree | 3ef7e867b8729411cf51d722d88f50d4780da146 /lib/private/TemplateLayout.php | |
parent | 380563fd53a2f03d772614388a9f345579ba7ca3 (diff) | |
parent | 931c68c0bf6e69bfde1d7084f3fa5fa975cde703 (diff) | |
download | nextcloud-server-938428c2756c658aab3a18937b06105b8004aae3.tar.gz nextcloud-server-938428c2756c658aab3a18937b06105b8004aae3.zip |
Merge pull request #17674 from nextcloud/enh/do_not_show_footer_sub
Do not show 'Get your own free account' on services under subscription
Diffstat (limited to 'lib/private/TemplateLayout.php')
-rw-r--r-- | lib/private/TemplateLayout.php | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/private/TemplateLayout.php b/lib/private/TemplateLayout.php index e7809b5a39d..6de6b33172c 100644 --- a/lib/private/TemplateLayout.php +++ b/lib/private/TemplateLayout.php @@ -43,6 +43,7 @@ use OC\Template\JSConfigHelper; use OC\Template\SCSSCacher; use OCP\Defaults; use OC\AppFramework\Http\Request; +use OCP\Support\Subscription\IRegistry; class TemplateLayout extends \OC_Template { @@ -134,7 +135,14 @@ class TemplateLayout extends \OC_Template { parent::__construct('core', 'layout.public'); $this->assign( 'appid', $appId ); $this->assign('bodyid', 'body-public'); - $this->assign('showSimpleSignUpLink', $this->config->getSystemValue('simpleSignUpLink.shown', true) !== false); + + /** @var IRegistry $subscription */ + $subscription = \OC::$server->query(IRegistry::class); + $showSimpleSignup = $this->config->getSystemValueBool('simpleSignUpLink.shown', true); + if ($showSimpleSignup && $subscription->delegateHasValidSubscription()) { + $showSimpleSignup = false; + } + $this->assign('showSimpleSignUpLink', $showSimpleSignup); } else { parent::__construct('core', 'layout.base'); |