Setup/Misc

* fix some outdated array indizes during setup
 * fix indexing when connecting to DB for first time
 * add initial loading of config strings during setup
This commit is contained in:
Sarjuuk
2021-10-24 17:12:05 +02:00
parent 56e70e22bb
commit 6b49aa6069
7 changed files with 71 additions and 56 deletions

View File

@@ -104,15 +104,15 @@ class CLISetup
self::$opts[$alias[$o] ?? $o] = (self::$optDefs[$alias[$o] ?? $o][2] & self::ARGV_ARRAY) ? ($v ? explode(',', $v) : []) : ($v ?: true);
// optional logging
if (self::$opts['log'])
if (isset(self::$opts['log']))
CLI::initLogFile(trim(self::$opts['log']));
// alternative data source (no quotes, use forward slash)
if (self::$opts['mpqDataDir'])
if (isset(self::$opts['mpqDataDir']))
self::$srcDir = CLI::nicePath($self::$opts['mpqDataDir']);
// optional limit handled locales
if (self::$opts['locales'])
if (isset(self::$opts['locales']))
{
// engb and enus are identical for all intents and purposes
$from = ['engb', 'esmx', 'encn'];