use find_one when loading Server which can use caching

This commit is contained in:
Isaac Connor 2021-03-22 17:46:13 -04:00
parent 96a96f4865
commit f306febb5f
1 changed files with 1 additions and 1 deletions

View File

@ -168,7 +168,7 @@ function queryRequest() {
foreach ( $results as $row ) { foreach ( $results as $row ) {
$row['DateTime'] = strftime('%Y-%m-%d %H:%M:%S', intval($row['TimeKey'])); $row['DateTime'] = strftime('%Y-%m-%d %H:%M:%S', intval($row['TimeKey']));
$Server = new ZM\Server($row['ServerId']); $Server = ZM\Server::find_one(array('Id'=>$row['ServerId']));
$row['Server'] = $Server->Name(); $row['Server'] = $Server->Name();
// First strip out any html tags // First strip out any html tags
// Second strip out all characters that are not ASCII 32-126 (yes, 126) // Second strip out all characters that are not ASCII 32-126 (yes, 126)