refactor(pages): replace superglobals with request/session abstractions

This commit is contained in:
2026-03-06 11:28:22 +01:00
parent ebf15081e1
commit 205da203cc
87 changed files with 368 additions and 127 deletions

View File

@@ -1,10 +1,12 @@
<?php
use MintyPHP\Http\SessionStoreInterface;
use MintyPHP\I18n;
use MintyPHP\Router;
use MintyPHP\Service\Search\SearchDataService;
use MintyPHP\Support\Guard;
$session = app(SessionStoreInterface::class)->all();
Guard::requireLogin();
gridRequireGetRequest();
@@ -14,7 +16,7 @@ if ($filters['q'] === '') {
Router::json([]);
}
$userId = (int) ($_SESSION['user']['id'] ?? 0);
$userId = (int) ($session['user']['id'] ?? 0);
$locale = I18n::$locale ?? (I18n::$defaultLocale ?? 'de');
$result = app(SearchDataService::class)->buildPreviewData($userId, $filters['q'], $locale, 5);