mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
- moved shared setup functions from FileGen to new CLISetup
- removed web-setup - new CLI parameters --account : create initial account(s) --siteconfig : edit php/aowow config values --dbconfig : set up db connection --sql : create db content from world/dbc-tables --firstrun : [NYI] step by step initial setup - some fixes by the wayside * display required arena bracket for extendedCost * achievement chains are searchable again * category trees for factions should now be correct * trainer tab on spell detail page reapeared * userMenu item 'Settings' no longer breaks the page * display abilities of shapeshift in tab on spell detail page * corrected reading ?_sourcestrings for titles * fixed error on race detail page * added simple descriptions to skill detail page * fixed tab "reward from" (achievement) on title detail page * fixed alphabetical order of some filter-dropdowns * fixed skill colors for spells * fixed power display for rune-based spells, that also cost mana * added more information to zones * also check mail_loot_template for achivements * fixed bug, where loot_template-ids would be reused for multiple templates * display sourcemore for pvp-sources
This commit is contained in:
@@ -3,6 +3,9 @@
|
||||
if (!defined('AOWOW_REVISION'))
|
||||
die('illegal access');
|
||||
|
||||
if (!CLI)
|
||||
die('not in cli mode');
|
||||
|
||||
|
||||
// Create 'profile_all.js'-file in static/js;
|
||||
// this script requires all realms in use to be defined in auth.realmlist
|
||||
@@ -37,27 +40,32 @@ if (!defined('AOWOW_REVISION'))
|
||||
{
|
||||
$subEU = [];
|
||||
$subUS = [];
|
||||
$set = 0x0;
|
||||
$menu = [
|
||||
['us', 'US & Oceanic', null,[[Util::urlize(CFG_BATTLEGROUP), CFG_BATTLEGROUP, null, &$subEU]]],
|
||||
['eu', 'Europe', null,[[Util::urlize(CFG_BATTLEGROUP), CFG_BATTLEGROUP, null, &$subUS]]]
|
||||
];
|
||||
|
||||
$rows = DB::Auth()->select('SELECT name, IF(timezone IN (8, 9, 10, 11, 12), "eu", "us") AS region FROM realmlist WHERE allowedSecurityLevel = 0');
|
||||
$set = 0x0;
|
||||
|
||||
foreach ($rows as $row)
|
||||
if (DB::isConnectable(DB_AUTH))
|
||||
{
|
||||
if ($row['region'] == 'eu')
|
||||
$rows = DB::Auth()->select('SELECT name, IF(timezone IN (8, 9, 10, 11, 12), "eu", "us") AS region FROM realmlist WHERE allowedSecurityLevel = 0');
|
||||
|
||||
foreach ($rows as $row)
|
||||
{
|
||||
$set |= 0x1;
|
||||
$subEU[] = [Util::urlize($row['name']), $row['name']];
|
||||
}
|
||||
else if ($row['region'] == 'us')
|
||||
{
|
||||
$set |= 0x2;
|
||||
$subUS[] = [Util::urlize($row['name']), $row['name']];
|
||||
if ($row['region'] == 'eu')
|
||||
{
|
||||
$set |= 0x1;
|
||||
$subEU[] = [Util::urlize($row['name']), $row['name']];
|
||||
}
|
||||
else if ($row['region'] == 'us')
|
||||
{
|
||||
$set |= 0x2;
|
||||
$subUS[] = [Util::urlize($row['name']), $row['name']];
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
CLISetup::log(' - realmMenu: Auth-DB not set up .. menu will be empty', CLISetup::LOG_WARN);
|
||||
|
||||
if (!($set & 0x1))
|
||||
array_shift($menu);
|
||||
|
||||
Reference in New Issue
Block a user