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>
This commit is contained in:
parent
3024e41121
commit
744964ac60
2 changed files with 3 additions and 1 deletions
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue