chore: polish docs url constants and provisioning log clarity

Agent-Logs-Url: https://github.com/GameServerPanel/GSP/sessions/020b5f73-a6ca-4a45-a4cb-eeef59cb26a8

Co-authored-by: iaretechnician <2749183+iaretechnician@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2026-05-09 00:53:29 +00:00 committed by GitHub
parent 05d7bfba78
commit a945b613ed
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 18 additions and 7 deletions

View file

@ -191,7 +191,8 @@ if (!function_exists('billing_write_provision_log')) {
if (!is_dir($logDir)) {
mkdir($logDir, 0755, true);
}
$line = '[' . date('Y-m-d H:i:s') . '] ' . json_encode($context, JSON_UNESCAPED_SLASHES) . PHP_EOL;
$status = strtoupper((string)($context['install_result'] ?? 'INFO'));
$line = '[' . date('Y-m-d H:i:s') . '] [' . $status . '] ' . json_encode($context, JSON_UNESCAPED_SLASHES) . PHP_EOL;
$result = file_put_contents($logDir . '/provisioning.log', $line, FILE_APPEND | LOCK_EX);
if ($result === false) {
error_log('billing_write_provision_log: failed to append provisioning.log');
@ -333,6 +334,7 @@ function exec_ogp_module()
if (empty($home_info)) {
$order_failed = true;
$order_failure_reason = "Order #{$order_id} references home_id {$home_id} but server_homes row is missing.";
$db->logger('BILLING PROVISION DATA INTEGRITY ERROR: ' . $order_failure_reason);
}
$existingIpPort = billing_get_home_ip_port($db, $db_prefix, intval($home_id));
if (!empty($existingIpPort['ok'])) {

View file

@ -36,6 +36,7 @@ function billing_payment_success_provision_state(array $order): array
if ($homeId <= 0) {
return ['label' => 'PENDING', 'message' => 'Server record is queued for provisioning.', 'class' => 'status-badge status-pending'];
}
// home_id exists but server_homes row does not: orphaned consistency failure.
if (!$hasHome) {
return ['label' => 'FAILED', 'message' => 'Provisioning error: billing order references a missing server home.', 'class' => 'status-badge status-failed'];
}