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
main
Dani Palou 2023-10-11 15:06:28 +02:00
parent 4e98e9f64a
commit f4030ab5a7
1 changed files with 7 additions and 0 deletions

View File

@ -28,6 +28,13 @@ export class AddonModGlossaryIndexLinkHandlerService extends CoreContentLinksMod
super('AddonModGlossary', 'glossary', 'g');
}
/**
* @inheritdoc
*/
async isEnabled(siteId: string, url: string, params: Record<string, string>): Promise<boolean> {
return !params.hook && !params.eid;
}
}
export const AddonModGlossaryIndexLinkHandler = makeSingleton(AddonModGlossaryIndexLinkHandlerService);