aboutsummaryrefslogtreecommitdiffstats
path: root/admin/auth.php
diff options
context:
space:
mode:
authorThomas Lange <code@nerdmind.de>2021-06-17 22:00:39 +0200
committerThomas Lange <code@nerdmind.de>2021-06-17 22:00:39 +0200
commit5555624546ea48d6327700f32b80848e0662dc90 (patch)
tree47d61fb756a6cb008aaf33586d292fcfe43da2a1 /admin/auth.php
parent91d8a28c664afa5378735bcd0efe068dd74d589f (diff)
parent0a2614cb69fc732c2115ef2f0c356f39f602d311 (diff)
downloadblog-optimization.tar.gz
blog-optimization.tar.xz
blog-optimization.zip
Merge branch 'master' into 'optimization'optimization
Diffstat (limited to 'admin/auth.php')
-rw-r--r--admin/auth.php38
1 files changed, 14 insertions, 24 deletions
diff --git a/admin/auth.php b/admin/auth.php
index e2e1b57..8c6d5a6 100644
--- a/admin/auth.php
+++ b/admin/auth.php
@@ -50,29 +50,19 @@ if(HTTP::issetPOST(['token' => Application::getSecurityToken()], 'username', 'pa
}
#===============================================================================
-# TRY: Template\Exception
+# Build document
#===============================================================================
-try {
- $AuthTemplate = Template\Factory::build('auth');
- $AuthTemplate->set('FORM', [
- 'INFO' => $messages ?? [],
- 'DATA' => [
- 'USERNAME' => HTTP::POST('username'),
- 'PASSWORD' => HTTP::POST('password'),
- ],
- 'TOKEN' => Application::getSecurityToken()
- ]);
+$AuthTemplate = Template\Factory::build('auth');
+$AuthTemplate->set('FORM', [
+ 'INFO' => $messages ?? [],
+ 'DATA' => [
+ 'USERNAME' => HTTP::POST('username'),
+ 'PASSWORD' => HTTP::POST('password'),
+ ],
+ 'TOKEN' => Application::getSecurityToken()
+]);
- $MainTemplate = Template\Factory::build('main');
- $MainTemplate->set('NAME', 'Authentication');
- $MainTemplate->set('HTML', $AuthTemplate);
- echo $MainTemplate;
-}
-
-#===============================================================================
-# CATCH: Template\Exception
-#===============================================================================
-catch(Template\Exception $Exception) {
- Application::exit($Exception->getMessage());
-}
-?> \ No newline at end of file
+$MainTemplate = Template\Factory::build('main');
+$MainTemplate->set('NAME', 'Authentication');
+$MainTemplate->set('HTML', $AuthTemplate);
+echo $MainTemplate;