Merge pull request #78 from GameServerPanel/copilot/fix-deprecated-properties-and-db-error
This commit is contained in:
commit
19fb2da54b
2 changed files with 3 additions and 13 deletions
|
|
@ -60,11 +60,7 @@
|
||||||
|
|
||||||
class FormTable {
|
class FormTable {
|
||||||
|
|
||||||
|
public $i = 0;
|
||||||
public function __construct()
|
|
||||||
{
|
|
||||||
$this->i = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function start_form($action, $method = "post", $extra = "")
|
public function start_form($action, $method = "post", $extra = "")
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
* Shared helper for recording admin-created game servers in the billing tables,
|
* Shared helper for recording admin-created game servers in the billing tables,
|
||||||
* so they are treated identically to FREE website orders:
|
* so they are treated identically to FREE website orders:
|
||||||
* billing_invoices (status='paid', amount=0)
|
* billing_invoices (status='paid', amount=0)
|
||||||
* billing_orders (status='installed', price=0, created_by_admin=1)
|
* billing_orders (status='installed', price=0, created_by_admin=1, set in INSERT)
|
||||||
*
|
*
|
||||||
* This does NOT re-provision the server — the caller (add_home.php) already
|
* This does NOT re-provision the server — the caller (add_home.php) already
|
||||||
* created the server via the panel DB layer. We only write the billing ledger
|
* created the server via the panel DB layer. We only write the billing ledger
|
||||||
|
|
@ -134,6 +134,7 @@ if (!function_exists('admin_register_server_in_billing')) {
|
||||||
'payment_txid' => 'admin-created',
|
'payment_txid' => 'admin-created',
|
||||||
'paid_ts' => $now,
|
'paid_ts' => $now,
|
||||||
'coupon_id' => 0,
|
'coupon_id' => 0,
|
||||||
|
'created_by_admin' => 1,
|
||||||
);
|
);
|
||||||
|
|
||||||
$order_id = $db->resultInsertId('billing_orders', $order_fields);
|
$order_id = $db->resultInsertId('billing_orders', $order_fields);
|
||||||
|
|
@ -141,13 +142,6 @@ if (!function_exists('admin_register_server_in_billing')) {
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Optionally mark as admin-created (column added by admin_billing_migration.sql)
|
|
||||||
$db->query(
|
|
||||||
"UPDATE OGP_DB_PREFIXbilling_orders
|
|
||||||
SET created_by_admin = 1
|
|
||||||
WHERE order_id = " . intval($order_id)
|
|
||||||
);
|
|
||||||
|
|
||||||
// ------------------------------------------------------------------ //
|
// ------------------------------------------------------------------ //
|
||||||
// 5. Link the invoice back to the new order. //
|
// 5. Link the invoice back to the new order. //
|
||||||
// ------------------------------------------------------------------ //
|
// ------------------------------------------------------------------ //
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue