From 937fb70757d7d5b164de73ed1089e13e15d1887c Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Wed, 7 Oct 2015 08:07:52 +0200 Subject: Do not trigger the update exception when we already show an error --- lib/private/template.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/private/template.php b/lib/private/template.php index 45e2af049cb..f64302341a3 100644 --- a/lib/private/template.php +++ b/lib/private/template.php @@ -69,7 +69,7 @@ class OC_Template extends \OC\Template\Base { public function __construct( $app, $name, $renderAs = "", $registerCall = true ) { // Read the selected theme from the config file - self::initTemplateEngine(); + self::initTemplateEngine($renderAs); $theme = OC_Util::getTheme(); @@ -89,13 +89,13 @@ class OC_Template extends \OC\Template\Base { parent::__construct($template, $requesttoken, $l10n, $themeDefaults); } - public static function initTemplateEngine() { + public static function initTemplateEngine($renderAs) { if (self::$initTemplateEngineFirstRun){ //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 ) && ! \OCP\Util::needUpgrade ()) { + if (\OC::$server->getSystemConfig()->getValue ('installed', false) && $renderAs !== 'error' && !\OCP\Util::needUpgrade()) { if (\OC::$server->getConfig ()->getAppValue ( 'core', 'backgroundjobs_mode', 'ajax' ) == 'ajax') { OC_Util::addScript ( 'backgroundjobs', null, true ); } -- cgit v1.2.3