From fa9d518980c30a9458d0353f3eb7936652f1eb8f Mon Sep 17 00:00:00 2001 From: Sarjuuk Date: Sun, 9 Apr 2017 22:04:40 +0200 Subject: [PATCH] Setup/DB * table prefix for aowow is now fixed to 'aowow_' * no more input required --- setup/tools/clisetup/dbconfig.func.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/setup/tools/clisetup/dbconfig.func.php b/setup/tools/clisetup/dbconfig.func.php index 57444a0e..52e74512 100644 --- a/setup/tools/clisetup/dbconfig.func.php +++ b/setup/tools/clisetup/dbconfig.func.php @@ -83,13 +83,16 @@ function dbconfig() { if ($inp['idx'] >= 0 && $inp['idx'] <= (3 + $nCharDBs)) { - $curFields = $dbFields; + $curFields = $inp['idx'] ? $dbFields : array_splice($dbFields, 0, 4); if ($inp['idx'] == 3 + $nCharDBs) // add new realmDB $curFields['realmId'] = ['Realm Id', false, '/[1-9][0-9]*/']; if (CLISetup::readInput($curFields)) { + if ($inp['idx'] == 0 && $curFields) + $curFields['prefix'] = 'aowow_'; + // auth, world or aowow if ($inp['idx'] < 3) $AoWoWconf[$databases[$inp['idx']]] = $curFields ?: array_combine(array_keys($dbFields), ['', '', '', '', '']);