Permalink
Browse files

fix(views): resources/error view now renders sanely within /admin

If `forward('', '400')` is called within admin context, the admin CSS is
already set up, so now we also apply the admin layout designed for that CSS.

Fixes #9327
  • Loading branch information...
mrclay committed Jan 29, 2016
1 parent ce0d28a commit c0b1a70336ba501ef2ee8074c39d2bbef5aec98b
Showing with 4 additions and 2 deletions.
  1. +4 −2 views/default/resources/error.php
@@ -30,8 +30,10 @@
header("HTTP/1.1 $type {$httpCodes[$type]}");
}
$body = elgg_view_layout('error', array(
$layout = elgg_in_context('admin') ? 'admin' : 'error';
$body = elgg_view_layout($layout, array(
'title' => $title,
'content' => $content,
));
echo elgg_view_page($title, $body, 'error');
echo elgg_view_page($title, $body, $layout);

0 comments on commit c0b1a70

Please sign in to comment.