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 Röhrl <jakob.roehrl@web.de>2020-01-15 12:27:49 +0300
committerJakob Röhrl <jakob.roehrl@web.de>2020-01-15 12:27:49 +0300
commit1287d14f21be42feefba5ecd5c75e08bd17fbefe (patch)
tree674a9bbedafd84d0bdab7f55e9ab66c3013892ce /lib
parent1895bfe1a5220c1a916b7da5334acf3cab1285c1 (diff)
fix map link
Signed-off-by: Jakob Röhrl <jakob.roehrl@web.de>
Diffstat (limited to 'lib')
-rw-r--r--lib/Controller/PageController.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/Controller/PageController.php b/lib/Controller/PageController.php
index fe09175e..b4b0e99a 100644
--- a/lib/Controller/PageController.php
+++ b/lib/Controller/PageController.php
@@ -34,6 +34,7 @@ use OCP\IInitialStateService;
use OCP\IRequest;
use OCP\Util;
use OCP\IConfig;
+use OCP\App\IAppManager;
class PageController extends Controller {
@@ -45,7 +46,11 @@ class PageController extends Controller {
/** @var IInitialStateService */
private $initialStateService;
+ /** @var IAppManager */
+ private $appManager;
+
public function __construct($appName,
+ IAppManager $appManager,
IRequest $request,
IEventDispatcher $eventDispatcher,
IConfig $config,
@@ -53,6 +58,7 @@ class PageController extends Controller {
parent::__construct($appName, $request);
$this->appName = $appName;
+ $this->appManager = $appManager;
$this->eventDispatcher = $eventDispatcher;
$this->initialStateService = $initialStateService;
$this->config = $config;
@@ -71,8 +77,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', $this->config->getAppValue('maps', 'enabled', 'no') === 'yes');
-
+ $this->initialStateService->provideInitialState($this->appName, 'maps', $this->appManager->isEnabledForUser('maps') === true);
Util::addScript($this->appName, 'photos');
Util::addStyle($this->appName, 'icons');