Merge pull request #111 from GameServerPanel/copilot/fix-game-monitor-issues

This commit is contained in:
Frank Harris 2026-05-04 05:30:37 -07:00 committed by GitHub
commit 62749a9a0c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 10 additions and 17 deletions

View file

@ -594,7 +594,6 @@ echo "<table id='servermonitor' class='tablesorter' data-sortlist='[[0,0],[3,1]]
"' data-upload_failure='". get_lang("check_dev_console") .
"' >put the log file here</div>\n";
*/
echo "<div>Put the log file here</div>";
//include("log.php");
?>

View file

@ -148,8 +148,8 @@ class AdminWorkshopController
{
$rows = [];
foreach ($this->gameGroups as $group) {
$primaryKey = $group['primary_game_key'];
$override = ($this->adapterFormGameKey === $primaryKey) ? $this->adapterFormOverride : null;
$primaryKey = isset($group['primary_game_key']) ? (string)$group['primary_game_key'] : '';
$override = ($primaryKey !== '' && $this->adapterFormGameKey === $primaryKey) ? $this->adapterFormOverride : null;
$mappingValues = [];
foreach ((array)$group['game_keys'] as $gameKey) {
@ -159,16 +159,16 @@ class AdminWorkshopController
}
$rows[] = [
'group_key' => $group['group_key'],
'app_id' => $group['app_id'],
'game_name' => $group['game_name'],
'game_keys' => $group['game_keys'],
'group_key' => $group['group_key'] ?? '',
'app_id' => $group['app_id'] ?? '',
'game_name' => $group['game_name'] ?? '',
'game_keys' => $group['game_keys'] ?? [],
'primary_game_key' => $primaryKey,
'mixed_mapping' => count((array)$mappingValues) > 1,
'selected_adapter' => count((array)$mappingValues) === 1 ? array_key_first($mappingValues) : '',
'exists' => $this->service->gameAdapterExists($primaryKey),
'adapter' => $this->service->getGameAdapter($primaryKey),
'updated_at' => $this->service->getGameAdapterUpdatedAt($primaryKey),
'exists' => $primaryKey !== '' && $this->service->gameAdapterExists($primaryKey),
'adapter' => $primaryKey !== '' ? $this->service->getGameAdapter($primaryKey) : null,
'updated_at' => $primaryKey !== '' ? $this->service->getGameAdapterUpdatedAt($primaryKey) : null,
'form' => $this->service->getAdapterFormData($primaryKey, $override),
];
}

View file

@ -26,13 +26,7 @@ $module_title = "Steam Workshop";
$module_version = "2.1";
$db_version = 1;
$module_required = TRUE;
$module_menus = array(
array(
'subpage' => 'workshop_admin',
'name' => 'Steam Workshop',
'group' => 'admin'
)
);
$module_menus = array();
// Database schema migration: create the three Workshop tables when not present.
// Called by the panel module installer when db_version increments.