fix: address code review comments (spelling, add comment to renewable_statuses)

Agent-Logs-Url: https://github.com/GameServerPanel/GSP/sessions/c56f04bb-ecce-4f1b-9bbd-c5f83107da1d

Co-authored-by: iaretechnician <2749183+iaretechnician@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2026-05-05 15:56:26 +00:00 committed by GitHub
parent 2f62bd32c9
commit cb9c54b858
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 5 additions and 2 deletions

View file

@ -217,7 +217,7 @@ function exec_ogp_module()
echo "<p style='color:#666;'>Billing orders that reference a <code>home_id</code> which no longer exists in <code>gsp_server_homes</code>. "; echo "<p style='color:#666;'>Billing orders that reference a <code>home_id</code> which no longer exists in <code>gsp_server_homes</code>. ";
echo "These orders will not show an expiration date on the game monitor. "; echo "These orders will not show an expiration date on the game monitor. ";
echo "Reset <code>home_id</code> to <code>0</code> or re-provision these orders to fix them. "; echo "Reset <code>home_id</code> to <code>0</code> or re-provision these orders to fix them. ";
echo "Run <code>normalize_billing_order_status.sql</code> to standardise any legacy status values.</p>"; echo "Run <code>normalize_billing_order_status.sql</code> to standardize any legacy status values.</p>";
if (empty($orphans)) { if (empty($orphans)) {
echo "<p style='color:green;'>&#10003; No orphaned billing orders found.</p>"; echo "<p style='color:green;'>&#10003; No orphaned billing orders found.</p>";

View file

@ -338,6 +338,9 @@ $status_config = [
<div class="server-actions"> <div class="server-actions">
<?php <?php
// Show Renew action for servers that can be renewed // Show Renew action for servers that can be renewed
// Status comparison is case-insensitive (strtolower). Canonical
// values are 'Active' and 'Invoiced'; legacy values are included
// as a fallback until normalize_billing_order_status.sql has run.
$renewable_statuses = array('active','invoiced','paid','installed','suspended'); $renewable_statuses = array('active','invoiced','paid','installed','suspended');
if (!empty($server['status']) && in_array(strtolower($server['status']), $renewable_statuses)): ?> if (!empty($server['status']) && in_array(strtolower($server['status']), $renewable_statuses)): ?>
<a href="renew_server.php?order_id=<?php echo intval($server['order_id']); ?>" class="gsw-btn renew-btn">Renew</a> <a href="renew_server.php?order_id=<?php echo intval($server['order_id']); ?>" class="gsw-btn renew-btn">Renew</a>

View file

@ -1,6 +1,6 @@
-- normalize_billing_order_status.sql -- normalize_billing_order_status.sql
-- --
-- One-time migration: standardise gsp_billing_orders.status to the canonical -- One-time migration: standardize gsp_billing_orders.status to the canonical
-- three-value set used by cron-shop.php, create_servers.php, and the game -- three-value set used by cron-shop.php, create_servers.php, and the game
-- monitor expiration lookup: -- monitor expiration lookup:
-- --