big restructure

This commit is contained in:
2026-02-11 19:28:12 +01:00
parent cd59ccd99b
commit 3eb9cc0ac4
209 changed files with 5101 additions and 2459 deletions

View File

@@ -43,7 +43,7 @@ if ($defaultLocale !== null) {
// Auto-login from remember-me cookie
if (empty($_SESSION['user']['id'])) {
\MintyPHP\Service\RememberMeService::autoLoginFromCookie();
\MintyPHP\Service\Auth\RememberMeService::autoLoginFromCookie();
}
// Parse request URI and resolve locale
@@ -84,7 +84,7 @@ if (!empty($_SESSION['user']['id']) && !$isAssetRequest) {
$needsRefresh = true;
}
if ($needsRefresh) {
\MintyPHP\Service\AuthService::loadTenantDataIntoSession($userId);
\MintyPHP\Service\Auth\AuthService::loadTenantDataIntoSession($userId);
$_SESSION['tenant_snapshot_at'] = time();
}
}
@@ -115,10 +115,17 @@ if (Router::getTemplateAction()) {
}
if (ob_get_contents()) {
ob_end_flush();
trigger_error('MintyPHP template action"' . Router::getTemplateAction() . '" should not send output. Error raised ', E_USER_WARNING);
if (!defined('MINTY_ALLOW_OUTPUT') || !MINTY_ALLOW_OUTPUT) {
trigger_error('MintyPHP template action"' . Router::getTemplateAction() . '" should not send output. Error raised ', E_USER_WARNING);
}
} else {
ob_end_clean();
}
if (defined('MINTY_ALLOW_OUTPUT') && MINTY_ALLOW_OUTPUT) {
Session::end();
DB::close();
exit;
}
ob_start();
if (Router::getAction()) {
@@ -127,10 +134,17 @@ if (Router::getAction()) {
}
if (ob_get_contents()) {
ob_end_flush();
trigger_error('MintyPHP action "' . Router::getAction() . '" should not send output. Error raised ', E_USER_WARNING);
if (!defined('MINTY_ALLOW_OUTPUT') || !MINTY_ALLOW_OUTPUT) {
trigger_error('MintyPHP action "' . Router::getAction() . '" should not send output. Error raised ', E_USER_WARNING);
}
} else {
ob_end_clean();
}
if (defined('MINTY_ALLOW_OUTPUT') && MINTY_ALLOW_OUTPUT) {
Session::end();
DB::close();
exit;
}
// End the session
Session::end();