summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/template.php4
-rw-r--r--lib/templatelayout.php4
2 files changed, 5 insertions, 3 deletions
diff --git a/lib/template.php b/lib/template.php
index 3df5a24f946..0f9efe66496 100644
--- a/lib/template.php
+++ b/lib/template.php
@@ -530,8 +530,10 @@ class OC_Template{
* @param string $hint An option hint message
*/
public static function printErrorPage( $error_msg, $hint = '' ) {
+ $content = new OC_Template( '', 'error', 'error' );
$errors = array(array('error' => $error_msg, 'hint' => $hint));
- OC_Template::printGuestPage("", "error", array("errors" => $errors));
+ $content->assign( 'errors', $errors, false );
+ $content->printPage();
die();
}
}
diff --git a/lib/templatelayout.php b/lib/templatelayout.php
index 25d4033d9ee..afa875b0a6d 100644
--- a/lib/templatelayout.php
+++ b/lib/templatelayout.php
@@ -31,7 +31,7 @@ class OC_TemplateLayout extends OC_Template {
}
$user_displayname = OC_User::getDisplayName();
$this->assign( 'user_displayname', $user_displayname );
- } else if ($renderas == 'guest') {
+ } else if ($renderas == 'guest' || $renderas == 'error') {
parent::__construct('core', 'layout.guest');
} else {
parent::__construct('core', 'layout.base');
@@ -39,7 +39,7 @@ class OC_TemplateLayout extends OC_Template {
// Add the js files
$jsfiles = self::findJavascriptFiles(OC_Util::$scripts);
$this->assign('jsfiles', array(), false);
- if (OC_Config::getValue('installed', false)) {
+ if (OC_Config::getValue('installed', false) && $renderas!='error') {
$this->append( 'jsfiles', OC_Helper::linkToRoute('js_config'));
}
if (!empty(OC_Util::$core_scripts)) {