update api and ajax handling and response

This commit is contained in:
envoyr
2022-02-20 11:38:08 +01:00
parent d5e53cc7db
commit 424a00b39e
65 changed files with 881 additions and 2736 deletions

View File

@@ -142,8 +142,8 @@ class PhpHelper
// end later
$err_display .= '</div>';
// check for more existing errors
$errors = isset(\Froxlor\UI\Panel\UI::Twig()->getGlobals()['global_errors']) ? \Froxlor\UI\Panel\UI::Twig()->getGlobals()['global_errors'] : "";
\Froxlor\UI\Panel\UI::Twig()->addGlobal('global_errors', $errors . $err_display);
$errors = isset(\Froxlor\UI\Panel\UI::twig()->getGlobals()['global_errors']) ? \Froxlor\UI\Panel\UI::twig()->getGlobals()['global_errors'] : "";
\Froxlor\UI\Panel\UI::twig()->addGlobal('global_errors', $errors . $err_display);
// return true to ignore php standard error-handler
return true;
}
@@ -157,15 +157,15 @@ class PhpHelper
if (!isset($_SERVER['SHELL']) || (isset($_SERVER['SHELL']) && $_SERVER['SHELL'] == '')) {
// show
\Froxlor\UI\Panel\UI::initTwig(true);
\Froxlor\UI\Panel\UI::Twig()->addGlobal('install_mode', '1');
\Froxlor\UI\Panel\UI::TwigBuffer('misc/alert_nosession.html.twig', [
\Froxlor\UI\Panel\UI::twig()->addGlobal('install_mode', '1');
\Froxlor\UI\Panel\UI::twigBuffer('misc/alert_nosession.html.twig', [
'page_title' => 'Uncaught exception',
'heading' => 'Uncaught exception',
'type' => 'danger',
'alert_msg' => $exception->getCode() . ' ' . $exception->getMessage(),
'alert_info' => $exception->getTraceAsString()
]);
echo \Froxlor\UI\Panel\UI::TwigOutputBuffer();
echo \Froxlor\UI\Panel\UI::twigOutputBuffer();
die();
}
}