Skip to content

Commit

Permalink
Avoid loading anything else than core scripts/styles on empty/base te…
Browse files Browse the repository at this point in the history
…mplate

Signed-off-by: Julius Härtl <[email protected]>
  • Loading branch information
juliushaertl committed Jan 3, 2022
1 parent 55219ac commit 2e322ca
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lib/private/legacy/OC_Template.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,11 @@ public static function initTemplateEngine($renderAs) {
OC_Util::addTranslations('core', null, true);

if (\OC::$server->getSystemConfig()->getValue('installed', false) && !\OCP\Util::needUpgrade()) {
OC_Util::addScript('merged-template-prepend', null, true);
OC_Util::addScript('dist/files_client', null, true);
OC_Util::addScript('dist/files_fileinfo', null, true);
if ($renderAs !== TemplateResponse::RENDER_AS_BLANK && $renderAs !== TemplateResponse::RENDER_AS_BASE) {
OC_Util::addScript('merged-template-prepend', null, true);
OC_Util::addScript('dist/files_client', null, true);
OC_Util::addScript('dist/files_fileinfo', null, true);
}
}
OC_Util::addScript('core', 'dist/main', true);

Expand Down

0 comments on commit 2e322ca

Please sign in to comment.