diff --git a/includes/utilities.php b/includes/utilities.php index 92e71a0a..43eaef19 100644 --- a/includes/utilities.php +++ b/includes/utilities.php @@ -1526,7 +1526,7 @@ class Util public static function alphaMapCheck($areaId, array &$coords) { - $file = 'cache\\alphaMaps\\'.$areaId.'.png'; + $file = 'cache/alphaMaps/'.$areaId.'.png'; if (!file_exists($file)) { self::addNote(U_GROUP_STAFF, 'Util::alphaMapCheck no suitable alphaMap found for area '.$areaId.'. Positional check omitted!'); diff --git a/setup/tools/dataset/enchants.php b/setup/tools/dataset/enchants.php index e52c5a9b..da82dbdc 100755 --- a/setup/tools/dataset/enchants.php +++ b/setup/tools/dataset/enchants.php @@ -60,8 +60,8 @@ if (!defined('AOWOW_REVISION')) // check directory-structure foreach (Util::$localeStrings as $dir) - if (!is_dir('datasets\\'.$dir)) - mkdir('datasets\\'.$dir, 0755, true); + if (!is_dir('datasets/'.$dir)) + mkdir('datasets/'.$dir, 0755, true); $enchIds = []; foreach ($enchantSpells->iterate() as $__) @@ -212,7 +212,7 @@ if (!defined('AOWOW_REVISION')) $toFile = "var g_enchants = "; $toFile .= json_encode($enchantsOut, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_NUMERIC_CHECK); $toFile .= ";"; - $file = 'datasets\\'.User::$localeString.'\\enchants'; + $file = 'datasets/'.User::$localeString.'/enchants'; $handle = fOpen($file, "w"); fWrite($handle, $toFile); diff --git a/setup/tools/dataset/gems.php b/setup/tools/dataset/gems.php index afaf3872..5c1a51e5 100644 --- a/setup/tools/dataset/gems.php +++ b/setup/tools/dataset/gems.php @@ -54,8 +54,8 @@ if (!defined('AOWOW_REVISION')) // check directory-structure foreach (Util::$localeStrings as $dir) - if (!is_dir('datasets\\'.$dir)) - mkdir('datasets\\'.$dir, 0755, true); + if (!is_dir('datasets/'.$dir)) + mkdir('datasets/'.$dir, 0755, true); $enchIds = []; foreach ($gems as $pop) @@ -88,7 +88,7 @@ if (!defined('AOWOW_REVISION')) $toFile = "var g_gems = "; $toFile .= json_encode($gemsOut, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_NUMERIC_CHECK); $toFile .= ";"; - $file = 'datasets\\'.User::$localeString.'\\gems'; + $file = 'datasets/'.User::$localeString.'/gems'; $handle = fOpen($file, "w"); fWrite($handle, $toFile); diff --git a/setup/tools/dataset/glyphs.php b/setup/tools/dataset/glyphs.php index 5c46b653..1601b471 100755 --- a/setup/tools/dataset/glyphs.php +++ b/setup/tools/dataset/glyphs.php @@ -50,8 +50,8 @@ if (!defined('AOWOW_REVISION')) // check directory-structure foreach (Util::$localeStrings as $dir) - if (!is_dir('datasets\\'.$dir)) - mkdir('datasets\\'.$dir, 0755, true); + if (!is_dir('datasets/'.$dir)) + mkdir('datasets/'.$dir, 0755, true); echo "script set up in ".Util::execTime()."
\n"; @@ -87,7 +87,7 @@ if (!defined('AOWOW_REVISION')) $toFile = "var g_glyphs = "; $toFile .= json_encode($glyphsOut, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_NUMERIC_CHECK); $toFile .= ";"; - $file = 'datasets\\'.User::$localeString.'\\glyphs'; + $file = 'datasets/'.User::$localeString.'/glyphs'; $handle = fOpen($file, "w"); fWrite($handle, $toFile); diff --git a/setup/tools/dataset/itemsets.php b/setup/tools/dataset/itemsets.php index 680bdff6..982bb3ff 100644 --- a/setup/tools/dataset/itemsets.php +++ b/setup/tools/dataset/itemsets.php @@ -35,8 +35,8 @@ if (!defined('AOWOW_REVISION')) // check directory-structure foreach (Util::$localeStrings as $dir) - if (!is_dir('datasets\\'.$dir)) - mkdir('datasets\\'.$dir, 0755, true); + if (!is_dir('datasets/'.$dir)) + mkdir('datasets/'.$dir, 0755, true); echo "script set up in ".Util::execTime()."
\n"; @@ -123,7 +123,7 @@ if (!defined('AOWOW_REVISION')) $toFile = "var g_itemsets = "; $toFile .= json_encode($itemsetOut, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_NUMERIC_CHECK); $toFile .= ";"; - $file = 'datasets\\'.User::$localeString.'\\itemsets'; + $file = 'datasets/'.User::$localeString.'/itemsets'; $handle = fOpen($file, "w"); fWrite($handle, $toFile); diff --git a/setup/tools/dataset/pets.php b/setup/tools/dataset/pets.php index f8c9ddfb..272ccf93 100755 --- a/setup/tools/dataset/pets.php +++ b/setup/tools/dataset/pets.php @@ -99,8 +99,8 @@ if (!defined('AOWOW_REVISION')) // check directory-structure foreach (Util::$localeStrings as $dir) - if (!is_dir('datasets\\'.$dir)) - mkdir('datasets\\'.$dir, 0755, true); + if (!is_dir('datasets/'.$dir)) + mkdir('datasets/'.$dir, 0755, true); echo "script set up in ".Util::execTime()."
\n"; @@ -143,7 +143,7 @@ if (!defined('AOWOW_REVISION')) $toFile = "var g_pets = "; $toFile .= json_encode($petsOut, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_NUMERIC_CHECK); $toFile .= ";"; - $file = 'datasets\\'.User::$localeString.'\\pets'; + $file = 'datasets/'.User::$localeString.'/pets'; $handle = fOpen($file, "w"); fWrite($handle, $toFile); diff --git a/setup/tools/dataset/profiler.php b/setup/tools/dataset/profiler.php index d866a6db..c2ac7d78 100644 --- a/setup/tools/dataset/profiler.php +++ b/setup/tools/dataset/profiler.php @@ -12,8 +12,8 @@ if (!defined('AOWOW_REVISION')) // check directory-structure foreach (Util::$localeStrings as $dir) - if (!is_dir('datasets\\'.$dir)) - mkdir('datasets\\'.$dir, 0755, true); + if (!is_dir('datasets/'.$dir)) + mkdir('datasets/'.$dir, 0755, true); echo "script set up in ".Util::execTime()."

\n\n"; @@ -44,7 +44,7 @@ if (!defined('AOWOW_REVISION')) User::useLocale($l); Lang::load(Util::$localeStrings[$l]); - $handle = fOpen('datasets\\'.User::$localeString.'\\p-quests', "w"); + $handle = fOpen('datasets/'.User::$localeString.'/p-quests', "w"); if (!$handle) die('could not create quests file '.$l); @@ -83,7 +83,7 @@ if (!defined('AOWOW_REVISION')) { User::useLocale($l); Lang::load(Util::$localeStrings[$l]); - $handle = fOpen('datasets\\'.User::$localeString.'\\p-achievements', "w"); + $handle = fOpen('datasets/'.User::$localeString.'/p-achievements', "w"); if (!$handle) die('could not create achievements file '.$l); @@ -126,7 +126,7 @@ if (!defined('AOWOW_REVISION')) { User::useLocale($l); Lang::load(Util::$localeStrings[$l]); - $handle = fOpen('datasets\\'.User::$localeString.'\\p-titles-'.$g, "w"); + $handle = fOpen('datasets/'.User::$localeString.'/p-titles-'.$g, "w"); if (!$handle) die('could not create titles file '.$l.' '.$g); @@ -163,7 +163,7 @@ if (!defined('AOWOW_REVISION')) { User::useLocale($l); Lang::load(Util::$localeStrings[$l]); - $handle = fOpen('datasets\\'.User::$localeString.'\\p-mounts', "w"); + $handle = fOpen('datasets/'.User::$localeString.'/p-mounts', "w"); if (!$handle) die('could not create mounts file '.$l); @@ -200,7 +200,7 @@ if (!defined('AOWOW_REVISION')) { User::useLocale($l); Lang::load(Util::$localeStrings[$l]); - $handle = fOpen('datasets\\'.User::$localeString.'\\p-companions', "w"); + $handle = fOpen('datasets/'.User::$localeString.'/p-companions', "w"); if (!$handle) die('could not create companions file '.$l); @@ -237,7 +237,7 @@ if (!defined('AOWOW_REVISION')) { User::useLocale($l); Lang::load(Util::$localeStrings[$l]); - $handle = fOpen('datasets\\'.User::$localeString.'\\p-factions', "w"); + $handle = fOpen('datasets/'.User::$localeString.'/p-factions', "w"); if (!$handle) die('could not create factions file '.$l); @@ -300,7 +300,7 @@ if (!defined('AOWOW_REVISION')) continue; } - $handle = fOpen('datasets\\'.User::$localeString.'\\p-recipes-'.$file, "w"); + $handle = fOpen('datasets/'.User::$localeString.'/p-recipes-'.$file, "w"); if (!$handle) die('could not create '.$file.' file '.$l); diff --git a/setup/tools/dataset/realms.php b/setup/tools/dataset/realms.php index 7364b9e7..f9c4401f 100644 --- a/setup/tools/dataset/realms.php +++ b/setup/tools/dataset/realms.php @@ -70,7 +70,7 @@ if (!defined('AOWOW_REVISION')) return preg_replace('/[^\d\w\-]/', '', strtr(strToLower($str), $pairs)); } - if (!file_exists('config\\profile_all.js.in')) + if (!file_exists('config/profile_all.js.in')) die('profile_all source file is missing; cannot create realm file'); $menu = [ @@ -85,7 +85,7 @@ if (!defined('AOWOW_REVISION')) $rows = 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', CFG_BATTLEGROUP); $str = 'var g_realms = '.json_encode($rows, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE).';'; - $handle = fOpen('datasets\\realms', "w"); + $handle = fOpen('datasets/realms', "w"); fWrite($handle, $str); fClose($handle); @@ -110,8 +110,8 @@ if (!defined('AOWOW_REVISION')) if (!($set & 0x2)) array_shift($menu); - $file = file_get_contents('config\\profile_all.js.in'); - $dest = fOpen('template\\js\\profile_all.js', "w"); + $file = file_get_contents('config/profile_all.js.in'); + $dest = fOpen('template/js/profile_all.js', "w"); fWrite($dest, str_replace('[/*setup:realms*/]', json_encode($menu, JSON_UNESCAPED_UNICODE), $file)); fClose($dest); diff --git a/setup/tools/dataset/statistics.php b/setup/tools/dataset/statistics.php index a034b973..6bc056e2 100755 --- a/setup/tools/dataset/statistics.php +++ b/setup/tools/dataset/statistics.php @@ -132,7 +132,7 @@ if (!defined('AOWOW_REVISION')) $json = json_encode($out, JSON_NUMERIC_CHECK | JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE); $json = preg_replace('/"\$([^$"]+)"/', '\1', $json); - $handle = fOpen('datasets\\statistics', "w"); + $handle = fOpen('datasets/statistics', "w"); fWrite($handle, 'g_statistics = '.$json.';'); fClose($handle); diff --git a/setup/tools/dataset/talents.php b/setup/tools/dataset/talents.php index 4e6c7d8a..67bf4239 100644 --- a/setup/tools/dataset/talents.php +++ b/setup/tools/dataset/talents.php @@ -180,8 +180,8 @@ if (!defined('AOWOW_REVISION')) // check directory-structure foreach (Util::$localeStrings as $dir) - if (!is_dir('datasets\\'.$dir)) - mkdir('datasets\\'.$dir, 0755, true); + if (!is_dir('datasets/'.$dir)) + mkdir('datasets/'.$dir, 0755, true); $tSpellIds = DB::Aowow()->selectCol('SELECT rank1 FROM dbc.talent UNION SELECT rank2 FROM dbc.talent UNION SELECT rank3 FROM dbc.talent UNION SELECT rank4 FROM dbc.talent UNION SELECT rank5 FROM dbc.talent'); $tSpells = new SpellList(array(['s.id', $tSpellIds], CFG_SQL_LIMIT_NONE)); @@ -199,7 +199,7 @@ if (!defined('AOWOW_REVISION')) set_time_limit(20); $cId = log($cMask, 2) + 1; - $file = 'datasets\\'.User::$localeString.'\\talents-'.$cId; + $file = 'datasets/'.User::$localeString.'/talents-'.$cId; $toFile = '$WowheadTalentCalculator.registerClass('.$cId.', '.json_encode($buildTree($cId), JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_NUMERIC_CHECK).')'; $handle = fOpen($file, "w"); @@ -218,7 +218,7 @@ if (!defined('AOWOW_REVISION')) $toFile = "var g_pet_icons = ".$petIcons."\n\n"; $toFile .= 'var g_pet_talents = '.json_encode($buildTree(0), JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_NUMERIC_CHECK); - $file = 'datasets\\'.User::$localeString.'\\pet-talents'; + $file = 'datasets/'.User::$localeString.'/pet-talents'; $handle = fOpen($file, "w"); fWrite($handle, $toFile);