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

github.com/nextcloud/photos.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJakob <jakob.roehrl@web.de>2019-12-04 12:42:57 +0300
committerJakob <jakob.roehrl@web.de>2019-12-04 12:42:57 +0300
commit10778fd6bef59381cf6d224f0ef77bf29302d930 (patch)
tree1810a33e30f2b4df19565d068e6eddd392e052c5 /lib
parentc73e919829fd43d0f133609a8457790d447baa13 (diff)
get map info
Signed-off-by: Jakob <jakob.roehrl@web.de>
Diffstat (limited to 'lib')
-rw-r--r--lib/Controller/PageController.php7
1 files changed, 5 insertions, 2 deletions
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');