mirror of
https://github.com/nextcloud/server.git
synced 2026-02-22 09:21:04 -05:00
fix(templates): deduplicate provider templates
Signed-off-by: Elizabeth Danzberger <elizabeth@elzody.dev>
This commit is contained in:
parent
28a735d342
commit
00005689e9
1 changed files with 3 additions and 2 deletions
|
|
@ -223,12 +223,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