Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lib/private/legacy/template.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,11 @@ public function __construct($app, $name, $renderAs = "", $registerCall = true, $
*/
public static function initTemplateEngine($renderAs) {
if (self::$initTemplateEngineFirstRun) {

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

if (\OCP\Share::isEnabled()) {
if ($isInstalled && \OCP\Share::isEnabled()) {
\OC_Util::addScript('core', 'shareconfigmodel');
\OC_Util::addScript('core', 'shareitemmodel');
\OC_Util::addScript('core', 'sharedialogresharerinfoview');
Expand Down