From 744964ac6084688773e9203e3e0dbbf30fdd14ee Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 2 May 2026 15:42:09 +0000 Subject: [PATCH] fix: address code review nits - simplify array_map lambda and clarify empty remote_server_id Agent-Logs-Url: https://github.com/GameServerPanel/GSP/sessions/e8bfe531-e1ff-4257-b49c-f8376b84e772 Co-authored-by: iaretechnician <2749183+iaretechnician@users.noreply.github.com> --- modules/billing/adminserverlist.php | 2 ++ modules/config_games/config_servers.php | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/billing/adminserverlist.php b/modules/billing/adminserverlist.php index f61cba53..299442b4 100644 --- a/modules/billing/adminserverlist.php +++ b/modules/billing/adminserverlist.php @@ -114,6 +114,8 @@ function sync_billing_services(mysqli $db, string $prefix): array } $svcName = $db->real_escape_string($gm['mod_name'] ?: $gm['game_name']); $homeCfgId = (int)$gm['home_cfg_id']; + // remote_server_id is intentionally empty: no servers are assigned until + // an admin reviews and enables the service on the adminserverlist page. $db->query( "INSERT INTO `{$prefix}billing_services` (home_cfg_id, mod_cfg_id, service_name, description, diff --git a/modules/config_games/config_servers.php b/modules/config_games/config_servers.php index 4a2ad9a2..251d88f2 100644 --- a/modules/config_games/config_servers.php +++ b/modules/config_games/config_servers.php @@ -55,7 +55,7 @@ function gsp_normalize_config_value($value): string } if ($isFlat) { return implode(',', array_map(function ($item) { - return $item instanceof SimpleXMLElement ? (string)$item : (string)$item; + return (string)$item; }, $value)); } return json_encode($value, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE);