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 <jus@bitgrid.net>
  • Loading branch information
juliushaertl committed Feb 7, 2022
1 parent 26df2c5 commit 88c5462
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) {
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 88c5462

Please sign in to comment.