Fix duplicate navigation registration on old Nextcloud versions

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl
2020-08-24 17:30:06 +02:00
parent e5cc5fcd1e
commit 7bbf50b9cf

View File

@@ -92,7 +92,6 @@ class ApplicationLegacy extends App {
}
public function register(): void {
$this->registerNavigationEntry();
$this->registerUserGroupHooks();
$this->registerNotifications();
$this->registerCommentsEntity();
@@ -100,20 +99,6 @@ class ApplicationLegacy extends App {
$this->registerCollaborationResources();
}
public function registerNavigationEntry(): void {
$container = $this->getContainer();
$this->server->getNavigationManager()->add(static function () use ($container) {
$urlGenerator = $container->query(IURLGenerator::class);
return [
'id' => 'deck',
'order' => 10,
'href' => $urlGenerator->linkToRoute('deck.page.index'),
'icon' => $urlGenerator->imagePath('deck', 'deck.svg'),
'name' => 'Deck',
];
});
}
private function registerUserGroupHooks(): void {
$container = $this->getContainer();
// Delete user/group acl entries when they get deleted