fix: address code review nits - table name escaping, prefix fallback, gamemanager default, admin.php site vars
Agent-Logs-Url: https://github.com/GameServerPanel/GSP/sessions/35af6b7c-2518-4105-b4d2-ba1f3fe754cd Co-authored-by: iaretechnician <2749183+iaretechnician@users.noreply.github.com>
This commit is contained in:
parent
d8972fee16
commit
ffece9ba57
5 changed files with 24 additions and 7 deletions
|
|
@ -77,8 +77,7 @@ function sync_billing_services(mysqli $db, string $prefix): array
|
|||
|
||||
foreach ($autoRepairCols as $col => $alterFragment) {
|
||||
if (!col_exists($db, $tableName, $col)) {
|
||||
$t = $db->real_escape_string($tableName);
|
||||
if ($db->query("ALTER TABLE `{$t}` {$alterFragment}")) {
|
||||
if ($db->query("ALTER TABLE `{$tableName}` {$alterFragment}")) {
|
||||
$messages[] = "✔ Auto-repaired: added column '{$col}' to {$tableName}.";
|
||||
} else {
|
||||
$messages[] = "✖ Could not add column '{$col}' to {$tableName}: " . $db->error;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue