File tree Expand file tree Collapse file tree 1 file changed +10
-8
lines changed
wcfsetup/install/files/lib/system/template Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -1044,17 +1044,19 @@ protected function getCompileFilePrefix(string $templateName): string
10441044
10451045 private function getSharedTemplateGroupID (): int
10461046 {
1047- $ templateGroup = \array_find (
1048- TemplateGroupCacheBuilder::getInstance ()->getData (),
1049- static fn (TemplateGroup $ group ) => $ group ->templateGroupFolderName === '_wcf_shared/ '
1050- );
1047+ if (!isset ($ this ->sharedTemplateGroupID )) {
1048+ $ templateGroup = \array_find (
1049+ TemplateGroupCacheBuilder::getInstance ()->getData (),
1050+ static fn (TemplateGroup $ group ) => $ group ->templateGroupFolderName === '_wcf_shared/ '
1051+ );
1052+
1053+ if ($ templateGroup === null ) {
1054+ throw new \RuntimeException ('Shared template group not found ' );
1055+ }
10511056
1052- if ($ templateGroup === null ) {
1053- throw new \RuntimeException ('Shared template group not found ' );
1057+ $ this ->sharedTemplateGroupID = $ templateGroup ->templateGroupID ;
10541058 }
10551059
1056- $ this ->sharedTemplateGroupID = $ templateGroup ->templateGroupID ;
1057-
10581060 return $ this ->sharedTemplateGroupID ;
10591061 }
10601062}
You can’t perform that action at this time.
0 commit comments