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:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user