fix code formating

This commit is contained in:
Uwe Steinmann 2025-10-16 15:30:35 +02:00
parent c6d3b70799
commit 69b82fde4b

View File

@ -34,7 +34,7 @@ require "inc/inc.Settings.php";
use DI\ContainerBuilder;
use Slim\Factory\AppFactory;
if(true) {
if (true) {
require_once("inc/inc.Utils.php");
require_once("inc/inc.LogInit.php");
require_once("inc/inc.Language.php");
@ -60,18 +60,18 @@ if(true) {
$container->set('notifier', $notifier);
$container->set('authenticator', $authenticator);
if(isset($GLOBALS['SEEDDMS_HOOKS']['initDMS'])) {
foreach($GLOBALS['SEEDDMS_HOOKS']['initDMS'] as $hookObj) {
if (method_exists($hookObj, 'addMiddleware')) {
$hookObj->addMiddleware($app);
}
if (isset($GLOBALS['SEEDDMS_HOOKS']['initDMS'])) {
foreach ($GLOBALS['SEEDDMS_HOOKS']['initDMS'] as $hookObj) {
if (method_exists($hookObj, 'addMiddleware')) {
$hookObj->addMiddleware($app);
}
}
}
$app->addErrorMiddleware(false, true, true);
if(isset($GLOBALS['SEEDDMS_HOOKS']['initDMS'])) {
foreach($GLOBALS['SEEDDMS_HOOKS']['initDMS'] as $hookObj) {
if (isset($GLOBALS['SEEDDMS_HOOKS']['initDMS'])) {
foreach ($GLOBALS['SEEDDMS_HOOKS']['initDMS'] as $hookObj) {
if (method_exists($hookObj, 'addRoute')) {
// FIXME: pass $app only just like initRestAPI. $app has a container
// which contains all other objects
@ -81,16 +81,14 @@ if(true) {
}
/* Catch all route */
$app->get('/{path:.*}', function($request, $response) use ($settings) {
$app->get('/{path:.*}', function ($request, $response) use ($settings) {
return $response
->withHeader('Location', $settings->_httpRoot.'out/out.ViewFolder.php')
->withStatus(302);
});
$app->run();
} else {
header("Location: ". (isset($settings->_siteDefaultPage) && strlen($settings->_siteDefaultPage)>0 ? $settings->_siteDefaultPage : "out/out.ViewFolder.php"));
?>
<html>