diff --git a/pages/emotes.php b/pages/emotes.php index 84c897af..68a3bcfe 100644 --- a/pages/emotes.php +++ b/pages/emotes.php @@ -25,16 +25,11 @@ class EmotesPage extends GenericPage protected function generateContent() { - $emotes = new EmoteList(); - if (!$emotes->error) - { - - $this->lvTabs[] = array( - 'file' => 'emote', - 'data' => $emotes->getListviewData(), - 'params' => [] - ); - }; + $this->lvTabs[] = array( + 'file' => 'emote', + 'data' => (new EmoteList())->getListviewData(), + 'params' => [] + ); } protected function generateTitle() diff --git a/setup/tools/clisetup/build.func.php b/setup/tools/clisetup/build.func.php index 2160d590..0921c1eb 100644 --- a/setup/tools/clisetup/build.func.php +++ b/setup/tools/clisetup/build.func.php @@ -15,7 +15,7 @@ function build($syncMe = null) { require_once 'setup/tools/fileGen.class.php'; - FileGen::init($syncMe !== null ? FileGen::MODE_UPDATE : FileGen::MODE_NORMAL, $syncMe); + FileGen::init($syncMe !== null ? FileGen::MODE_UPDATE : FileGen::MODE_NORMAL, $syncMe ?: []); $done = []; if (FileGen::$subScripts) diff --git a/setup/tools/clisetup/firstrun.func.php b/setup/tools/clisetup/firstrun.func.php index 41c74e4c..821cbe08 100644 --- a/setup/tools/clisetup/firstrun.func.php +++ b/setup/tools/clisetup/firstrun.func.php @@ -53,6 +53,7 @@ function firstrun($resume) ['SqlGen::generate', 'races', null, null, null], ['SqlGen::generate', 'shapeshiftforms', null, null, null], ['SqlGen::generate', 'skillline', null, null, null], + ['SqlGen::generate', 'emotes', null, null, null], ['SqlGen::generate', 'achievement', null, null, null], ['SqlGen::generate', 'creature', null, null, null], ['SqlGen::generate', 'currencies', null, null, null], diff --git a/setup/tools/clisetup/sql.func.php b/setup/tools/clisetup/sql.func.php index 7fc254d6..a190baa9 100644 --- a/setup/tools/clisetup/sql.func.php +++ b/setup/tools/clisetup/sql.func.php @@ -15,7 +15,7 @@ function sql($syncMe = null) { require_once 'setup/tools/sqlGen.class.php'; - SqlGen::init($syncMe !== null ? SqlGen::MODE_UPDATE : SqlGen::MODE_NORMAL, $syncMe); + SqlGen::init($syncMe !== null ? SqlGen::MODE_UPDATE : SqlGen::MODE_NORMAL, $syncMe ?: []); $done = []; if (SqlGen::$subScripts) diff --git a/setup/tools/filegen/realmMenu.func.php b/setup/tools/filegen/realmMenu.func.php index 4b3ccc55..38d5ee8b 100644 --- a/setup/tools/filegen/realmMenu.func.php +++ b/setup/tools/filegen/realmMenu.func.php @@ -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) { diff --git a/setup/tools/filegen/realms.func.php b/setup/tools/filegen/realms.func.php index 8f85dc2c..8d189758 100644 --- a/setup/tools/filegen/realms.func.php +++ b/setup/tools/filegen/realms.func.php @@ -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);