Skip to content

Commit 815fac1

Browse files
committed
fixes #33408 - no need to add sharing scripts if the server is not yet installed
1 parent 2fb3b28 commit 815fac1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/private/legacy/template.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,11 @@ public function __construct($app, $name, $renderAs = "", $registerCall = true, $
104104
public static function initTemplateEngine($renderAs) {
105105
if (self::$initTemplateEngineFirstRun) {
106106

107+
$isInstalled = \OC::$server->getSystemConfig()->getValue('installed', false);
107108
//apps that started before the template initialization can load their own scripts/styles
108109
//so to make sure this scripts/styles here are loaded first we use OC_Util::addScript() with $prepend=true
109110
//meaning the last script/style in this list will be loaded first
110-
if (\OC::$server->getSystemConfig()->getValue('installed', false) && $renderAs !== 'error' && !\OCP\Util::needUpgrade()) {
111+
if ($isInstalled && $renderAs !== 'error' && !\OCP\Util::needUpgrade()) {
111112
if (\OC::$server->getConfig()->getAppValue('core', 'backgroundjobs_mode', 'ajax') == 'ajax') {
112113
OC_Util::addScript('backgroundjobs', null, true);
113114
}
@@ -156,7 +157,7 @@ public static function initTemplateEngine($renderAs) {
156157
OC_Util::addScript('files/fileinfo');
157158
OC_Util::addScript('files/client');
158159

159-
if (\OCP\Share::isEnabled()) {
160+
if ($isInstalled && \OCP\Share::isEnabled()) {
160161
\OC_Util::addScript('core', 'shareconfigmodel');
161162
\OC_Util::addScript('core', 'shareitemmodel');
162163
\OC_Util::addScript('core', 'sharedialogresharerinfoview');

0 commit comments

Comments
 (0)