summaryrefslogtreecommitdiffstats
path: root/lib/private/legacy/OC_Template.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/legacy/OC_Template.php')
-rw-r--r--lib/private/legacy/OC_Template.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/private/legacy/OC_Template.php b/lib/private/legacy/OC_Template.php
index 856d5491090..32d185d25fd 100644
--- a/lib/private/legacy/OC_Template.php
+++ b/lib/private/legacy/OC_Template.php
@@ -39,6 +39,7 @@
*/
use OC\TemplateLayout;
+use OCP\AppFramework\Http\TemplateResponse;
require_once __DIR__.'/template/functions.php';
@@ -72,7 +73,7 @@ class OC_Template extends \OC\Template\Base {
* "admin".
* @param bool $registerCall = true
*/
- public function __construct($app, $name, $renderAs = "", $registerCall = true) {
+ public function __construct($app, $name, $renderAs = TemplateResponse::RENDER_AS_BLANK, $registerCall = true) {
// Read the selected theme from the config file
self::initTemplateEngine($renderAs);
@@ -104,7 +105,7 @@ class OC_Template extends \OC\Template\Base {
//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 (\OC::$server->getSystemConfig()->getValue('installed', false) && $renderAs !== TemplateResponse::RENDER_AS_ERROR && !\OCP\Util::needUpgrade()) {
if (\OC::$server->getConfig()->getAppValue('core', 'backgroundjobs_mode', 'ajax') == 'ajax') {
OC_Util::addScript('backgroundjobs', null, true);
}