diff options
author | Julius Härtl <jus@bitgrid.net> | 2020-07-24 07:53:48 +0200 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2020-07-24 08:58:14 +0200 |
commit | e1b696929fe5f7a1f5f967c6833f7ca5bd4ecc7c (patch) | |
tree | 1e3ac29bafc2fc0b4739f3611d1b3741293e0537 /lib/public/AppFramework | |
parent | c4a6666e6c210079df9ac9f4c0f68d832fc23e60 (diff) | |
download | nextcloud-server-e1b696929fe5f7a1f5f967c6833f7ca5bd4ecc7c.tar.gz nextcloud-server-e1b696929fe5f7a1f5f967c6833f7ca5bd4ecc7c.zip |
Move NotFoundResponse to a proper TemplateResponse
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'lib/public/AppFramework')
-rw-r--r-- | lib/public/AppFramework/Http/NotFoundResponse.php | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/lib/public/AppFramework/Http/NotFoundResponse.php b/lib/public/AppFramework/Http/NotFoundResponse.php index ffebfdf3c76..9bf08443a89 100644 --- a/lib/public/AppFramework/Http/NotFoundResponse.php +++ b/lib/public/AppFramework/Http/NotFoundResponse.php @@ -24,30 +24,19 @@ namespace OCP\AppFramework\Http; -use OCP\Template; - /** * A generic 404 response showing an 404 error page as well to the end-user * @since 8.1.0 */ -class NotFoundResponse extends Response { +class NotFoundResponse extends TemplateResponse { /** * @since 8.1.0 */ public function __construct() { - parent::__construct(); + parent::__construct('core', '404', [], 'guest'); $this->setContentSecurityPolicy(new ContentSecurityPolicy()); $this->setStatus(404); } - - /** - * @return string - * @since 8.1.0 - */ - public function render() { - $template = new Template('core', '404', 'guest'); - return $template->fetchPage(); - } } |