From f4030ab5a7b64161671fe21ca383c1ccffac572f Mon Sep 17 00:00:00 2001 From: Dani Palou Date: Wed, 11 Oct 2023 15:06:28 +0200 Subject: [PATCH] MOBILE-4362 glossary: Fix some entry links not handled properly If the entry link used the view.php endpoint, the index link handler treated it instead of the entry link handler --- src/addons/mod/glossary/services/handlers/index-link.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/addons/mod/glossary/services/handlers/index-link.ts b/src/addons/mod/glossary/services/handlers/index-link.ts index 3658be016..6dd91ec52 100644 --- a/src/addons/mod/glossary/services/handlers/index-link.ts +++ b/src/addons/mod/glossary/services/handlers/index-link.ts @@ -28,6 +28,13 @@ export class AddonModGlossaryIndexLinkHandlerService extends CoreContentLinksMod super('AddonModGlossary', 'glossary', 'g'); } + /** + * @inheritdoc + */ + async isEnabled(siteId: string, url: string, params: Record): Promise { + return !params.hook && !params.eid; + } + } export const AddonModGlossaryIndexLinkHandler = makeSingleton(AddonModGlossaryIndexLinkHandlerService);