Add a limit of 1000 when pulling sessions. Sessions table can contain hundreds of thousands of lines all relatively useless. Modals need to pop up fast.

This commit is contained in:
Isaac Connor 2021-06-12 11:57:10 -04:00
parent b634338398
commit 3141ec32fe
1 changed files with 9 additions and 10 deletions

View File

@ -43,7 +43,7 @@ global $CLANG;
<tbody> <tbody>
<?php <?php
require_once('includes/User.php'); require_once('includes/User.php');
$result = dbQuery('SELECT * FROM Sessions ORDER BY access DESC'); $result = dbQuery('SELECT * FROM Sessions ORDER BY access DESC LIMIT 1000');
if (!$result) return; if (!$result) return;
$current_session = $_SESSION; $current_session = $_SESSION;
@ -56,7 +56,6 @@ while ( $row = $result->fetch(PDO::FETCH_ASSOC) ) {
ZM\Warning('Failed to decode '.$row['data']); ZM\Warning('Failed to decode '.$row['data']);
continue; continue;
} }
ZM\Debug(print_r($_SESSION, true));
if (isset($_SESSION['last_time'])) { if (isset($_SESSION['last_time'])) {
# This is a dead session # This is a dead session
continue; continue;