Refactor global stats handling and user ID access

Moved global stats logic from LayoutHelper to Domain model and updated views/controllers to use the new stats structure. Replaced direct $_SESSION['user_id'] access with Core\Auth::id() for consistency. Cleaned up redundant code and improved isolation mode handling for statistics.
This commit is contained in:
Hosteroid
2025-10-20 18:38:58 +03:00
parent 719fb86c7a
commit 7ad01a7da0
8 changed files with 47 additions and 91 deletions

View File

@@ -100,7 +100,7 @@ class ErrorLogController extends Controller
$notes = $_POST['notes'] ?? null;
// Mark error as resolved using model
$this->errorLogModel->markErrorResolved($errorId, $_SESSION['user_id'], $notes);
$this->errorLogModel->markErrorResolved($errorId, \Core\Auth::id(), $notes);
$_SESSION['success'] = 'Error marked as resolved';
header('Location: /errors/' . urlencode($errorId));