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/database.php | |
parent | 91d8a28c664afa5378735bcd0efe068dd74d589f (diff) | |
parent | 0a2614cb69fc732c2115ef2f0c356f39f602d311 (diff) | |
download | blog-optimization.tar.gz blog-optimization.tar.xz blog-optimization.zip |
Merge branch 'master' into 'optimization'optimization
Diffstat (limited to 'admin/database.php')
-rw-r--r-- | admin/database.php | 36 |
1 files changed, 13 insertions, 23 deletions
diff --git a/admin/database.php b/admin/database.php index d37e158..78d47c1 100644 --- a/admin/database.php +++ b/admin/database.php @@ -26,27 +26,17 @@ if(HTTP::issetPOST(['token' => Application::getSecurityToken()], 'command')) { } #=============================================================================== -# TRY: Template\Exception -#=============================================================================== -try { - $DatabaseTemplate = Template\Factory::build('database'); - $DatabaseTemplate->set('FORM', [ - 'INFO' => $messages ?? [], - 'TOKEN' => Application::getSecurityToken(), - 'RESULT' => implode(NULL, $result ?? []), - 'COMMAND' => HTTP::POST('command'), - ]); +# Build document +#=============================================================================== +$DatabaseTemplate = Template\Factory::build('database'); +$DatabaseTemplate->set('FORM', [ + 'INFO' => $messages ?? [], + 'TOKEN' => Application::getSecurityToken(), + 'RESULT' => implode(NULL, $result ?? []), + 'COMMAND' => HTTP::POST('command'), +]); - $MainTemplate = Template\Factory::build('main'); - $MainTemplate->set('NAME', 'SQL'); - $MainTemplate->set('HTML', $DatabaseTemplate); - 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', 'SQL'); +$MainTemplate->set('HTML', $DatabaseTemplate); +echo $MainTemplate; |