aboutsummaryrefslogtreecommitdiffstats
path: root/403.php
diff options
context:
space:
mode:
authorThomas Lange <code@nerdmind.de>2021-08-04 00:40:54 +0200
committerThomas Lange <code@nerdmind.de>2021-08-04 00:45:48 +0200
commitd1a68c763bdfa6ebbd71e2eee4ff870fed88be5f (patch)
tree0969653208b1c303be65286cb724af2a76238d91 /403.php
parent78dad732e1fd3d4a57f7fa5747624ce0be50d803 (diff)
downloadblog-d1a68c763bdfa6ebbd71e2eee4ff870fed88be5f.tar.gz
blog-d1a68c763bdfa6ebbd71e2eee4ff870fed88be5f.tar.xz
blog-d1a68c763bdfa6ebbd71e2eee4ff870fed88be5f.zip
Move error page logic into the Application class
Move the logic for generating the error pages into the Application class to remove this ugly "require" call in the error403 and error404 methods.
Diffstat (limited to '403.php')
-rw-r--r--403.php16
1 files changed, 3 insertions, 13 deletions
diff --git a/403.php b/403.php
index 82f6836..6a3cb54 100644
--- a/403.php
+++ b/403.php
@@ -2,19 +2,9 @@
#===============================================================================
# INCLUDE: Initialization
#===============================================================================
-require_once 'core/application.php';
+require 'core/application.php';
#===============================================================================
-# Send HTTP status code
+# Show "403 Forbidden" error page
#===============================================================================
-http_response_code(403);
-
-#===============================================================================
-# Build document
-#===============================================================================
-$MainTemplate = Template\Factory::build('main');
-$MainTemplate->set('NAME', '403 Forbidden');
-$MainTemplate->set('HEAD', ['NAME' => $MainTemplate->get('NAME')]);
-$MainTemplate->set('HTML', Template\Factory::build('403'));
-
-echo $MainTemplate;
+Application::error403();