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:
@@ -9,7 +9,6 @@ class Lang
|
||||
private static $game;
|
||||
|
||||
private static $achievement;
|
||||
private static $class;
|
||||
private static $currency;
|
||||
private static $event;
|
||||
private static $faction;
|
||||
@@ -20,6 +19,7 @@ class Lang
|
||||
private static $npc;
|
||||
private static $pet;
|
||||
private static $quest;
|
||||
private static $race;
|
||||
private static $skill;
|
||||
private static $spell;
|
||||
private static $title;
|
||||
@@ -41,20 +41,20 @@ class Lang
|
||||
}
|
||||
|
||||
// todo: make static props private and access through this
|
||||
public static function __callStatic($name, $args)
|
||||
public static function __callStatic($prop, $args)
|
||||
{
|
||||
if (!isset(self::$$name))
|
||||
if (!isset(self::$$prop))
|
||||
{
|
||||
Util::addNote(U_GROUP_STAFF, 'Lang: tried to use undefined property Lang::$'.$name);
|
||||
Util::addNote(U_GROUP_STAFF, 'Lang::__callStatic() - tried to use undefined property Lang::$'.$prop);
|
||||
return null;
|
||||
}
|
||||
|
||||
$var = self::$$name;
|
||||
$var = self::$$prop;
|
||||
foreach ($args as $key)
|
||||
{
|
||||
if (!isset($var[$key]))
|
||||
{
|
||||
Util::addNote(U_GROUP_STAFF, 'Lang: undefined key "'.$key.'" in property Lang::$'.$name.'. Full key chain: '.implode(', ', $args));
|
||||
Util::addNote(U_GROUP_STAFF, 'Lang::__callStatic() - undefined key "'.$key.'" in property Lang::$'.$prop.'[\''.implode('\'][\'', $args).'\']');
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -64,6 +64,25 @@ class Lang
|
||||
return $var;
|
||||
}
|
||||
|
||||
public static function sort($prop, $group, $method = SORT_NATURAL)
|
||||
{
|
||||
|
||||
if (!isset(self::$$prop))
|
||||
{
|
||||
Util::addNote(U_GROUP_STAFF, 'Lang::sort() - tried to use undefined property Lang::$'.$prop);
|
||||
return null;
|
||||
}
|
||||
|
||||
$var = &self::$$prop;
|
||||
if (!isset($var[$group]))
|
||||
{
|
||||
Util::addNote(U_GROUP_STAFF, 'Lang::sort() - tried to use undefined property Lang::$'.$prop.'[\''.$group.'\']');
|
||||
return null;
|
||||
}
|
||||
|
||||
asort($var[$group], $method);
|
||||
}
|
||||
|
||||
// todo: expand
|
||||
public static function getInfoBoxForFlags($flags)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user