From 10778fd6bef59381cf6d224f0ef77bf29302d930 Mon Sep 17 00:00:00 2001 From: Jakob Date: Wed, 4 Dec 2019 10:42:57 +0100 Subject: get map info Signed-off-by: Jakob --- lib/Controller/PageController.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/Controller/PageController.php b/lib/Controller/PageController.php index e4fb631f..6a8baa96 100644 --- a/lib/Controller/PageController.php +++ b/lib/Controller/PageController.php @@ -33,6 +33,7 @@ use OCP\EventDispatcher\IEventDispatcher; use OCP\IInitialStateService; use OCP\IRequest; use OCP\Util; +use OCP\IConfig; class PageController extends Controller { @@ -47,12 +48,14 @@ class PageController extends Controller { public function __construct($appName, IRequest $request, IEventDispatcher $eventDispatcher, + IConfig $config, IInitialStateService $initialStateService) { - parent::__construct($appName, $request); + parent::__construct($appName, $request, $config); $this->appName = $appName; $this->eventDispatcher = $eventDispatcher; $this->initialStateService = $initialStateService; + $this->config = $config; } @@ -68,7 +71,7 @@ class PageController extends Controller { $this->eventDispatcher->dispatch(LoadViewer::class, new LoadViewer()); $this->initialStateService->provideInitialState($this->appName, 'mimes', Application::MIMES); - $this->initialStateService->provideInitialState($this->appName, 'maps', Application::MAPS); + $this->initialStateService->provideInitialState($this->appName, 'maps', $this->config->getAppValue('maps', 'enabled', 'no') === 'yes'); Util::addScript($this->appName, 'photos'); Util::addStyle($this->appName, 'icons'); -- cgit v1.2.3