diff options
author | Daniel Kesselberg <mail@danielkesselberg.de> | 2019-01-05 01:46:20 +0300 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2019-01-07 22:11:38 +0300 |
commit | a9381706c17383e07db6073ec5a48b868b92b821 (patch) | |
tree | dcc30188bf4d13c3e9159be292aab7e5d1ca0671 /lib | |
parent | 43ef1f63e2dcdc6d4a8fecf9c06589891d243af1 (diff) |
Hide appstore page when not available
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Controller/WizardController.php | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/lib/Controller/WizardController.php b/lib/Controller/WizardController.php index 8b92e86b..2c38bb05 100644 --- a/lib/Controller/WizardController.php +++ b/lib/Controller/WizardController.php @@ -29,7 +29,7 @@ use OCP\Defaults; use OCP\IConfig; use OCP\IRequest; -class WizardController extends Controller { +class WizardController extends Controller { /** @var IConfig */ protected $config; @@ -37,17 +37,22 @@ class WizardController extends Controller { /** @var string */ protected $userId; + /** @var Defaults */ + protected $theming; + /** * @param string $appName * @param IRequest $request * @param IConfig $config * @param string $userId + * @param Defaults $theming */ - public function __construct($appName, IRequest $request, IConfig $config, $userId) { + public function __construct($appName, IRequest $request, IConfig $config, $userId, Defaults $theming) { parent::__construct($appName, $request); $this->config = $config; $this->userId = $userId; + $this->theming = $theming; } /** @@ -64,12 +69,11 @@ class WizardController extends Controller { * @return TemplateResponse */ public function show() { - /** @var Defaults $theming */ - $theming = \OC::$server->query(Defaults::class); return new TemplateResponse('firstrunwizard', 'wizard', [ - 'desktop' => $this->config->getSystemValue('customclient_desktop', $theming->getSyncClientUrl()), - 'android' => $this->config->getSystemValue('customclient_android', $theming->getAndroidClientUrl()), - 'ios' => $this->config->getSystemValue('customclient_ios', $theming->getiOSClientUrl()), + 'desktop' => $this->config->getSystemValue('customclient_desktop', $this->theming->getSyncClientUrl()), + 'android' => $this->config->getSystemValue('customclient_android', $this->theming->getAndroidClientUrl()), + 'ios' => $this->config->getSystemValue('customclient_ios', $this->theming->getiOSClientUrl()), + 'appStore' => $this->config->getSystemValue('appstoreenabled', true), ], ''); } } |