fix: remove debug output, Steam Workshop menu item, and PHP 8.3 TypeErrors in admin controller

Agent-Logs-Url: https://github.com/GameServerPanel/GSP/sessions/b402e67e-690f-4d0c-be37-181af3833298

Co-authored-by: iaretechnician <2749183+iaretechnician@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2026-05-04 11:40:45 +00:00 committed by GitHub
parent 2aaf058c45
commit c737f0caa7
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") . "' data-upload_failure='". get_lang("check_dev_console") .
"' >put the log file here</div>\n"; "' >put the log file here</div>\n";
*/ */
echo "<div>Put the log file here</div>";
//include("log.php"); //include("log.php");
?> ?>

View file

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

View file

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