Actually add error page

* The base route now has a function as well so it is not just some empty
route
* We now actually have an error page

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
Roeland Jago Douma 2018-10-11 11:56:55 +02:00
parent 7c526955bd
commit 140100b23e
No known key found for this signature in database
GPG Key ID: F941078878347C0C
2 changed files with 15 additions and 0 deletions

View File

@ -461,4 +461,15 @@ class SAMLController extends Controller {
return true;
}
/**
* @PublicPage
* @NoCSRFRequired
*
* @return Http\TemplateResponse
*/
public function base() {
$message = $this->l->t('This page should not be visted directly.');
return new Http\TemplateResponse($this->appName, 'error', ['message' => $message], 'guest');
}
}

4
templates/error.php Normal file
View File

@ -0,0 +1,4 @@
<div class="error">
<h2><?php p($l->t('Error')) ?></h2>
<p><?php p($_['message']) ?></p>
</div>