Skip to content

Commit 155ad43

Browse files
committed
Avoid loading anything else than core scripts/styles on empty/base template
Signed-off-by: Julius Härtl <jus@bitgrid.net>
1 parent aff3740 commit 155ad43

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

lib/private/legacy/OC_Template.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,11 @@ public static function initTemplateEngine($renderAs) {
113113
Util::addTranslations('core');
114114

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

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

0 commit comments

Comments
 (0)