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
juliusknorr committed May 13, 2022
1 parent aff3740 commit 155ad43
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 @@ -113,9 +113,11 @@ public static function initTemplateEngine($renderAs) {
Util::addTranslations('core');

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

// If installed and background job is set to ajax, add dedicated script
Expand Down

0 comments on commit 155ad43

Please sign in to comment.