* display empty listview if no data
Setup
 * do not pass null instead of expected type array
 * added setup step for emotes to --firstrun *d'oh!*
 * fixed a wrong constant
This commit is contained in:
Sarjuuk
2015-08-10 00:04:33 +02:00
parent 3c69284e15
commit bd2e0ccada
6 changed files with 10 additions and 14 deletions

View File

@@ -48,7 +48,7 @@ if (!CLI)
if (DB::isConnectable(DB_AUTH))
{
$rows = DB::Auth()->select('SELECT name, IF(timezone IN (8, 9, 10, 11, 12), "eu", "us") AS region FROM realmlist WHERE allowedSecurityLevel = 0 AND gamebuild = ?d', WOW_VERSION);
$rows = DB::Auth()->select('SELECT name, IF(timezone IN (8, 9, 10, 11, 12), "eu", "us") AS region FROM realmlist WHERE allowedSecurityLevel = 0 AND gamebuild = ?d', WOW_BUILD);
foreach ($rows as $row)
{

View File

@@ -30,7 +30,7 @@ if (!CLI)
{
$realms = [];
if (DB::isConnectable(DB_AUTH))
$realms = DB::Auth()->select('SELECT id AS ARRAY_KEY, name, ? AS battlegroup, IF(timezone IN (8, 9, 10, 11, 12), "eu", "us") AS region FROM realmlist WHERE allowedSecurityLevel = 0 AND gamebuild = ?d', CFG_BATTLEGROUP, WOW_VERSION);
$realms = DB::Auth()->select('SELECT id AS ARRAY_KEY, name, ? AS battlegroup, IF(timezone IN (8, 9, 10, 11, 12), "eu", "us") AS region FROM realmlist WHERE allowedSecurityLevel = 0 AND gamebuild = ?d', CFG_BATTLEGROUP, WOW_BUILD);
else
CLISetup::log(' - realms: Auth-DB not set up .. static data g_realms will be empty', CLISetup::LOG_WARN);