diff options
author | Thomas Lange <code@nerdmind.de> | 2021-06-17 22:00:39 +0200 |
---|---|---|
committer | Thomas Lange <code@nerdmind.de> | 2021-06-17 22:00:39 +0200 |
commit | 5555624546ea48d6327700f32b80848e0662dc90 (patch) | |
tree | 47d61fb756a6cb008aaf33586d292fcfe43da2a1 /admin/post/delete.php | |
parent | 91d8a28c664afa5378735bcd0efe068dd74d589f (diff) | |
parent | 0a2614cb69fc732c2115ef2f0c356f39f602d311 (diff) | |
download | blog-5555624546ea48d6327700f32b80848e0662dc90.tar.gz blog-5555624546ea48d6327700f32b80848e0662dc90.tar.xz blog-5555624546ea48d6327700f32b80848e0662dc90.zip |
Merge branch 'master' into 'optimization'optimization
Diffstat (limited to 'admin/post/delete.php')
-rw-r--r-- | admin/post/delete.php | 44 |
1 files changed, 17 insertions, 27 deletions
diff --git a/admin/post/delete.php b/admin/post/delete.php index 78fdf6e..6da8a68 100644 --- a/admin/post/delete.php +++ b/admin/post/delete.php @@ -28,33 +28,24 @@ try { } #=============================================================================== - # TRY: Template\Exception + # Build document #=============================================================================== - try { - $FormTemplate = Template\Factory::build('post/form'); - $FormTemplate->set('HTML', $Post->getHTML()); - $FormTemplate->set('FORM', [ - 'TYPE' => 'DELETE', - 'INFO' => $messages ?? [], - 'DATA' => array_change_key_case($Attribute->getAll(), CASE_UPPER), - 'TOKEN' => Application::getSecurityToken() - ]); - - $DeleteTemplate = Template\Factory::build('post/delete'); - $DeleteTemplate->set('HTML', $FormTemplate); - - $MainTemplate = Template\Factory::build('main'); - $MainTemplate->set('NAME', $Language->text('title_post_delete')); - $MainTemplate->set('HTML', $DeleteTemplate); - echo $MainTemplate; - } - - #=============================================================================== - # CATCH: Template\Exception - #=============================================================================== - catch(Template\Exception $Exception) { - Application::exit($Exception->getMessage()); - } + $FormTemplate = Template\Factory::build('post/form'); + $FormTemplate->set('HTML', $Post->getHTML()); + $FormTemplate->set('FORM', [ + 'TYPE' => 'DELETE', + 'INFO' => $messages ?? [], + 'DATA' => array_change_key_case($Attribute->getAll(), CASE_UPPER), + 'TOKEN' => Application::getSecurityToken() + ]); + + $DeleteTemplate = Template\Factory::build('post/delete'); + $DeleteTemplate->set('HTML', $FormTemplate); + + $MainTemplate = Template\Factory::build('main'); + $MainTemplate->set('NAME', $Language->text('title_post_delete')); + $MainTemplate->set('HTML', $DeleteTemplate); + echo $MainTemplate; } #=============================================================================== @@ -63,4 +54,3 @@ try { catch(Post\Exception $Exception) { Application::error404(); } -?>
\ No newline at end of file |