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