mirror of
https://github.com/nextcloud/server.git
synced 2026-06-11 01:30:50 -04:00
Merge pull request #56722 from nextcloud/fix/deduplicate-templates
fix(templates): deduplicate provider templates
This commit is contained in:
commit
070ec61759
1 changed files with 3 additions and 2 deletions
|
|
@ -213,12 +213,13 @@ class TemplateManager implements ITemplateManager {
|
|||
foreach ($this->getRegisteredProviders() as $provider) {
|
||||
foreach ($type->getMimetypes() as $mimetype) {
|
||||
foreach ($provider->getCustomTemplates($mimetype) as $template) {
|
||||
$templates[] = $template;
|
||||
$templateId = $template->jsonSerialize()['templateId'];
|
||||
$templates[$templateId] = $template;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $templates;
|
||||
return array_values($templates);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in a new issue