Merge pull request #25446 from nextcloud/bugfix/noid/avoid-duplicate-template-registration

Avoid template creators being registered multiple times
This commit is contained in:
Roeland Jago Douma 2021-02-02 20:37:36 +01:00 committed by GitHub
commit 9db3b28983
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -115,6 +115,9 @@ class TemplateManager implements ITemplateManager {
}
public function getTypes(): array {
if (!empty($this->types)) {
return $this->types;
}
foreach ($this->registeredTypes as $registeredType) {
$this->types[] = $registeredType();
}