mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
- wrap json_encode in Util::toJson to always encode with the same flags
- implemented secondary tooltips with spawnPoints - merged Mapper.js back into global.js * fixed wrong id for Nexus Instance * the ToC Dungeon no longer has a second layer - fixed displaying waypoints as spawns - images in pageText are now PNG instead of JPG to accomodate for transparency
This commit is contained in:
@@ -37,7 +37,6 @@ Mapper.multiLevelZones = {
|
||||
4494: ['4494-1', '4494-2'],
|
||||
4714: ['4714-1', '4714_1', '4714_2', '4714_3'],
|
||||
4722: ['4722-1', '4722-2'],
|
||||
4723: ['4723-1', '4723-2'],
|
||||
4812: ['4812-1', '4812-2', '4812-3', '4812-4', '4812-5', '4812-6', '4812-7', '4812-8'],
|
||||
};
|
||||
|
||||
|
||||
@@ -517,18 +517,28 @@ trait spawnHelper
|
||||
);
|
||||
|
||||
/*
|
||||
todo (med): implement this alpha-map-check-virtual-map-transform-wahey!
|
||||
note: map in tooltips is activated by either '#map' as anchor (will automatic open mapviewer, when clicking link) in the href or as parameterless rel-parameter e.g. rel="map" in the anchor
|
||||
todo (med): map in tooltips is activated by either '#map' as anchor (will automatic open mapviewer, when hovering link) in the href or as parameterless rel-parameter e.g. rel="map" in the anchor
|
||||
*/
|
||||
|
||||
private function createShortSpawns() // [zoneId, [[x1, y1], [x2, y2], ..]] as tooltip2 if enabled by <a rel="map" ...> (one area, one floor, one craeture, no survivor)
|
||||
private function createShortSpawns() // [zoneId, floor, [[x1, y1], [x2, y2], ..]] as tooltip2 if enabled by <a rel="map" ...> (one area, one floor, one creature, no survivor)
|
||||
{
|
||||
$this->spawnResult[SPAWNINFO_SHORT] = null; // NYI
|
||||
// first get zone/floor with the most spawns
|
||||
if ($res = DB::Aowow()->selectRow('SELECT areaId, floor FROM ?_spawns WHERE type = ?d && typeId = ?d GROUP BY areaId, floor ORDER BY count(1) DESC LIMIT 1', self::$type, $this->id))
|
||||
{
|
||||
// get relevant spawn points
|
||||
$points = DB::Aowow()->select('SELECT posX, posY FROM ?_spawns WHERE type = ?d && typeId = ?d && areaId = ?d && floor = ?d', self::$type, $this->id, $res['areaId'], $res['floor']);
|
||||
$spawns = [];
|
||||
foreach ($points as $p)
|
||||
$spawns[] = [$p['posX'], $p['posY']];
|
||||
|
||||
$this->spawnResult[SPAWNINFO_SHORT] = [$res['areaId'], $res['floor'], $spawns];
|
||||
}
|
||||
}
|
||||
|
||||
private function createFullSpawns() // for display on map (objsct/npc detail page)
|
||||
{
|
||||
$data = [];
|
||||
$wpSum = [];
|
||||
$wpIdx = 0;
|
||||
$spawns = DB::Aowow()->select("SELECT * FROM ?_spawns WHERE type = ?d AND typeId = ?d", self::$type, $this->id);
|
||||
if (!$spawns)
|
||||
@@ -556,6 +566,7 @@ trait spawnHelper
|
||||
$set['lines'] = [[$wPoints[$i - 1]['posX'], $wPoints[$i - 1]['posY']]];
|
||||
|
||||
$data[$s['areaId']][$s['floor']]['coords'][] = [$p['posX'], $p['posY'], $set];
|
||||
@$wpSum[$s['areaId']][$s['floor']]++;
|
||||
}
|
||||
$wpIdx++;
|
||||
}
|
||||
@@ -589,6 +600,9 @@ trait spawnHelper
|
||||
|
||||
$data[$s['areaId']] [$s['floor']] ['coords'] [] = [$s['posX'], $s['posY'], ['label' => '$<br><span class="q0">'.implode('<br>', $label).'</span>']];
|
||||
}
|
||||
foreach ($data as $a => &$areas)
|
||||
foreach ($areas as $f => &$floor)
|
||||
$floor['count'] = count($floor['coords']) - (!empty($wpSum[$a][$f]) ? $wpSum[$a][$f] : 0);
|
||||
|
||||
$this->spawnResult[SPAWNINFO_FULL] = $data;
|
||||
}
|
||||
@@ -609,7 +623,7 @@ trait spawnHelper
|
||||
public function getSpawns($mode)
|
||||
{
|
||||
// ony Creatures and GOs can be spawned
|
||||
if (!self::$type && self::$type != TYPE_NPC && self::$type != TYPE_OBJECT)
|
||||
if (!self::$type || (self::$type != TYPE_NPC && self::$type != TYPE_OBJECT))
|
||||
return [];
|
||||
|
||||
switch ($mode)
|
||||
@@ -833,15 +847,15 @@ abstract class Filter
|
||||
{
|
||||
case 'setCriteria':
|
||||
if ($data || $raw)
|
||||
$form[$name] = $raw ? $data : 'fi_setCriteria('.json_encode($data['cr'], JSON_NUMERIC_CHECK).', '.json_encode($data['crs'], JSON_NUMERIC_CHECK).', '.json_encode($data['crv'], JSON_NUMERIC_CHECK).');';
|
||||
$form[$name] = $raw ? $data : 'fi_setCriteria('.Util::toJSON($data['cr']).', '.Util::toJSON($data['crs']).', '.Util::toJSON($data['crv']).');';
|
||||
else
|
||||
$form[$name] = 'fi_setCriteria([], [], []);';
|
||||
break;
|
||||
case 'extraCols':
|
||||
$form[$name] = $raw ? $data : 'fi_extraCols = '.json_encode(array_unique($data), JSON_NUMERIC_CHECK).';';
|
||||
$form[$name] = $raw ? $data : 'fi_extraCols = '.Util::toJSON(array_unique($data)).';';
|
||||
break;
|
||||
case 'setWeights':
|
||||
$form[$name] = $raw ? $data : 'fi_setWeights('.json_encode($data, JSON_NUMERIC_CHECK).', 0, 1, 1);';
|
||||
$form[$name] = $raw ? $data : 'fi_setWeights('.Util::toJSON($data).', 0, 1, 1);';
|
||||
break;
|
||||
case 'form':
|
||||
if ($key == $name) // only if explicitely specified
|
||||
|
||||
@@ -927,8 +927,12 @@ class Util
|
||||
'<BR></BR>' => '<br />'
|
||||
);
|
||||
|
||||
// html may contain 'Pictures'
|
||||
$text = preg_replace('/"Interface\\\Pictures\\\([\w_\-]+)"/i', '"images/wow/interface/Pictures/\1.jpg"', strtr($text, $pairs));
|
||||
// html may contain 'Pictures' and FlavorImages and "stuff"
|
||||
$text = preg_replace_callback(
|
||||
'/src="([^"]+)"/i',
|
||||
function ($m) { return 'src="'.STATIC_URL.'/images/wow/'.strtr($m[1], ['\\' => '/']).'.png"'; },
|
||||
strtr($text, $pairs)
|
||||
);
|
||||
}
|
||||
else
|
||||
$text = strtr($text, ["\n" => '<br />', "\r" => '']);
|
||||
@@ -1724,6 +1728,19 @@ class Util
|
||||
header('Cache-Control: post-check=0, pre-check=0', false);
|
||||
header('Pragma: no-cache');
|
||||
}
|
||||
|
||||
public static function toJSON($data)
|
||||
{
|
||||
$flags = JSON_NUMERIC_CHECK | JSON_UNESCAPED_UNICODE;
|
||||
|
||||
if (CFG_DEBUG)
|
||||
$flags |= JSON_PRETTY_PRINT;
|
||||
|
||||
// just a thought: .. about prefixing variables with $ to mark them as function code and retroactively stripping escapes from them
|
||||
// like it's done already in with listviews for example
|
||||
|
||||
return json_encode($data, $flags);
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@@ -90,7 +90,7 @@ class CurrencyPage extends GenericPage
|
||||
'id' => $tab[3],
|
||||
'extraCols' => $tab[4] ? '$['.implode(', ', array_unique($tab[4])).']' : null,
|
||||
'hiddenCols' => $tab[5] ? '$['.implode(', ', array_unique($tab[5])).']' : null,
|
||||
'visibleCols' => $tab[6] ? '$'. json_encode( array_unique($tab[6])) : null
|
||||
'visibleCols' => $tab[6] ? '$'. Util::toJSON( array_unique($tab[6])) : null
|
||||
]
|
||||
);
|
||||
}
|
||||
@@ -173,7 +173,7 @@ class CurrencyPage extends GenericPage
|
||||
'params' => [
|
||||
'name' => '$LANG.tab_createdby',
|
||||
'id' => 'created-by',
|
||||
'visibleCols' => isset($visCols) ? '$'.json_encode($visCols) : null
|
||||
'visibleCols' => isset($visCols) ? '$'.Util::toJSON($visCols) : null
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
@@ -450,7 +450,7 @@ class GenericPage
|
||||
}
|
||||
}
|
||||
|
||||
$buff .= ' _['.(is_numeric($key) ? $key : "'".$key."'")."]=".json_encode($data, JSON_NUMERIC_CHECK).';';
|
||||
$buff .= ' _['.(is_numeric($key) ? $key : "'".$key."'")."]=".Util::toJSON($data).';';
|
||||
}
|
||||
|
||||
$buff .= "\n";
|
||||
@@ -461,13 +461,13 @@ class GenericPage
|
||||
|
||||
// spell
|
||||
if (!empty($x['tooltip'])) // spell + item
|
||||
$buff .= "\n _[".$x['id'].'].tooltip_'.User::$localeString.' = '.json_encode($x['tooltip']).";\n";
|
||||
$buff .= "\n _[".$x['id'].'].tooltip_'.User::$localeString.' = '.Util::toJSON($x['tooltip']).";\n";
|
||||
if (!empty($x['buff'])) // spell
|
||||
$buff .= " _[".$x['id'].'].buff_'.User::$localeString.' = '.json_encode($x['buff']).";\n";
|
||||
$buff .= " _[".$x['id'].'].buff_'.User::$localeString.' = '.Util::toJSON($x['buff']).";\n";
|
||||
if (!empty($x['spells'])) // spell + item
|
||||
$buff .= " _[".$x['id'].'].spells_'.User::$localeString.' = '.json_encode($x['spells'], JSON_NUMERIC_CHECK).";\n";
|
||||
$buff .= " _[".$x['id'].'].spells_'.User::$localeString.' = '.Util::toJSON($x['spells']).";\n";
|
||||
if (!empty($x['buffspells'])) // spell
|
||||
$buff .= " _[".$x['id'].'].buffspells_'.User::$localeString.' = '.json_encode($x['buffspells'], JSON_NUMERIC_CHECK).";\n";
|
||||
$buff .= " _[".$x['id'].'].buffspells_'.User::$localeString.' = '.Util::toJSON($x['buffspells']).";\n";
|
||||
|
||||
$buff .= "\n";
|
||||
}
|
||||
|
||||
@@ -419,7 +419,7 @@ class ItemPage extends genericPage
|
||||
'id' => $tab[3],
|
||||
'extraCols' => $tab[4] ? '$['.implode(', ', array_unique($tab[4])).']' : null,
|
||||
'hiddenCols' => $tab[5] ? '$['.implode(', ', array_unique($tab[5])).']' : null,
|
||||
'visibleCols' => $tab[6] ? '$'. json_encode( array_unique($tab[6])) : null
|
||||
'visibleCols' => $tab[6] ? '$'. Util::toJSON( array_unique($tab[6])) : null
|
||||
]
|
||||
);
|
||||
}
|
||||
@@ -478,8 +478,8 @@ class ItemPage extends genericPage
|
||||
'name' => $sf[2],
|
||||
'id' => $sf[3],
|
||||
'extraCols' => $sf[4] ? "$[".implode(', ', array_unique($sf[4]))."]" : null,
|
||||
'hiddenCols' => $sf[5] ? "$".json_encode($sf[5]) : null,
|
||||
'visibleCols' => $sf[6] ? '$'.json_encode($sf[6]) : null
|
||||
'hiddenCols' => $sf[5] ? "$".Util::toJSON($sf[5]) : null,
|
||||
'visibleCols' => $sf[6] ? '$'.Util::toJSON($sf[6]) : null
|
||||
]
|
||||
);
|
||||
}
|
||||
@@ -527,7 +527,7 @@ class ItemPage extends genericPage
|
||||
'params' => [
|
||||
'name' => '$LANG.tab_cancontain',
|
||||
'id' => 'can-contain',
|
||||
'hiddenCols' => '$'.json_encode($hCols)
|
||||
'hiddenCols' => '$'.Util::toJSON($hCols)
|
||||
]
|
||||
);
|
||||
}
|
||||
@@ -575,7 +575,7 @@ class ItemPage extends genericPage
|
||||
'name' => '$LANG.tab_criteriaof',
|
||||
'id' => 'criteria-of',
|
||||
'visibleCols' => "$['category']",
|
||||
'hiddenCols' => '$'.json_encode($hCols)
|
||||
'hiddenCols' => '$'.Util::toJSON($hCols)
|
||||
]
|
||||
);
|
||||
}
|
||||
@@ -909,7 +909,7 @@ class ItemPage extends genericPage
|
||||
'params' => [
|
||||
'name' => '$LANG.tab_teaches',
|
||||
'id' => 'teaches',
|
||||
'visibleCols' => '$'.json_encode($visCols)
|
||||
'visibleCols' => '$'.Util::toJSON($visCols)
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
@@ -325,12 +325,12 @@ class ItemsPage extends GenericPage
|
||||
$tab['data'][$uId] = $upgItemData[$uId];
|
||||
|
||||
if ($upg)
|
||||
$tab['params']['_upgradeIds'] = '$'.json_encode($upg, JSON_NUMERIC_CHECK);
|
||||
$tab['params']['_upgradeIds'] = '$'.Util::toJSON($upg);
|
||||
}
|
||||
else if ($grouping)
|
||||
{
|
||||
$upg = array_keys($this->filter['upg']);
|
||||
$tab['params']['_upgradeIds'] = '$'.json_encode($upg, JSON_NUMERIC_CHECK);
|
||||
$tab['params']['_upgradeIds'] = '$'.Util::toJSON($upg);
|
||||
foreach ($upgItemData as $uId => $data) // using numeric keys => cant use array_merge
|
||||
$tab['data'][$uId] = $data;
|
||||
}
|
||||
@@ -400,10 +400,10 @@ class ItemsPage extends GenericPage
|
||||
}
|
||||
|
||||
if (!empty($tab['params']['hiddenCols']))
|
||||
$tab['params']['hiddenCols'] = '$'.json_encode($tab['params']['hiddenCols']);
|
||||
$tab['params']['hiddenCols'] = '$'.Util::toJSON($tab['params']['hiddenCols']);
|
||||
|
||||
if (!empty($tab['params']['visibleCols']))
|
||||
$tab['params']['visibleCols'] = '$'.json_encode($tab['params']['visibleCols']);
|
||||
$tab['params']['visibleCols'] = '$'.Util::toJSON($tab['params']['visibleCols']);
|
||||
|
||||
foreach ($tab['params'] as $k => $p)
|
||||
if (!$p)
|
||||
|
||||
@@ -72,7 +72,7 @@ class ItemsetPage extends GenericPage
|
||||
if ($h = $this->subject->getField('holidayId'))
|
||||
{
|
||||
$infobox[] = Lang::$game['eventShort'].Lang::$main['colon'].'[event='.$h.']';
|
||||
$this->extendGlobalIds(TYPE_GAMEVENT, $h);
|
||||
$this->extendGlobalIds(TYPE_WORLDEVENT, $h);
|
||||
}
|
||||
|
||||
// itemLevel
|
||||
|
||||
@@ -11,14 +11,8 @@ class MapsPage extends GenericPage
|
||||
protected $tabId = 1;
|
||||
protected $path = [1, 1];
|
||||
protected $mode = CACHE_TYPE_NONE;
|
||||
protected $js = array(
|
||||
'maps.js',
|
||||
'Mapper.js'
|
||||
);
|
||||
protected $css = array(
|
||||
['string' => 'zone-picker { margin-left: 4px }'],
|
||||
['path' => 'Mapper.css']
|
||||
);
|
||||
protected $js = ['maps.js'];
|
||||
protected $css = [['string' => 'zone-picker { margin-left: 4px }']];
|
||||
|
||||
public function __construct($pageCall, $__)
|
||||
{
|
||||
|
||||
@@ -16,13 +16,7 @@ class NpcPage extends GenericPage
|
||||
protected $path = [0, 4];
|
||||
protected $tabId = 0;
|
||||
protected $mode = CACHE_TYPE_PAGE;
|
||||
protected $js = array(
|
||||
'swfobject.js',
|
||||
'Mapper.js'
|
||||
);
|
||||
protected $css = array(
|
||||
['path' => 'Mapper.css']
|
||||
);
|
||||
protected $js = ['swfobject.js'];
|
||||
|
||||
public function __construct($pageCall, $id)
|
||||
{
|
||||
@@ -264,13 +258,8 @@ class NpcPage extends GenericPage
|
||||
if ($spawns = $this->subject->getSpawns(SPAWNINFO_FULL))
|
||||
{
|
||||
$map = ['data' => ['parent' => 'mapper-generic'], 'mapperData' => &$spawns];
|
||||
|
||||
foreach ($spawns as $areaId => &$areaData)
|
||||
{
|
||||
$map['extra'][$areaId] = ZoneList::getName($areaId);
|
||||
foreach ($areaData as &$floor)
|
||||
$floor['count'] = count($floor['coords']);
|
||||
}
|
||||
}
|
||||
|
||||
// consider pooled spawns
|
||||
@@ -585,8 +574,8 @@ class NpcPage extends GenericPage
|
||||
'name' => $sf[2],
|
||||
'id' => $sf[3],
|
||||
'extraCols' => $sf[4] ? "$[".implode(', ', array_unique($sf[4]))."]" : null,
|
||||
'hiddenCols' => $sf[5] ? "$".json_encode($sf[5]) : null,
|
||||
'visibleCols' => $sf[6] ? '$'.json_encode($sf[6]) : null,
|
||||
'hiddenCols' => $sf[5] ? "$".Util::toJSON($sf[5]) : null,
|
||||
'visibleCols' => $sf[6] ? '$'.Util::toJSON($sf[6]) : null,
|
||||
'sort' => "$['-percent', 'name']",
|
||||
)
|
||||
);
|
||||
@@ -741,12 +730,12 @@ class NpcPage extends GenericPage
|
||||
if ($asError)
|
||||
return '$WowheadPower.registerNpc('.$this->typeId.', '.User::$localeId.', {})';
|
||||
|
||||
$s = $this->subject->getSpawns(true);
|
||||
$s = $this->subject->getSpawns(SPAWNINFO_SHORT);
|
||||
|
||||
$x = '$WowheadPower.registerNpc('.$this->typeId.', '.User::$localeId.", {\n";
|
||||
$x .= "\tname_".User::$localeString.": '".Util::jsEscape($this->subject->getField('name', true))."',\n";
|
||||
$x .= "\ttooltip_".User::$localeString.": '".Util::jsEscape($this->subject->renderTooltip())."',\n";
|
||||
// $x .= "\tmap: ".($s ? '{zone: '.$s[0].', coords: {0:'.json_encode($s[1], JSON_NUMERIC_CHECK).'}}' : '{}')."\n";
|
||||
$x .= "\tmap: ".($s ? Util::toJSON(['zone' => $s[0], 'coords' => [$s[1] => $s[2]]]) : '{}')."\n";
|
||||
$x .= "});";
|
||||
|
||||
return $x;
|
||||
|
||||
@@ -16,13 +16,7 @@ class ObjectPage extends GenericPage
|
||||
protected $path = [0, 5];
|
||||
protected $tabId = 0;
|
||||
protected $mode = CACHE_TYPE_PAGE;
|
||||
protected $js = array(
|
||||
'swfobject.js',
|
||||
'Mapper.js'
|
||||
);
|
||||
protected $css = array(
|
||||
['path' => 'Mapper.css']
|
||||
);
|
||||
protected $js = ['swfobject.js'];
|
||||
|
||||
/* NOTE
|
||||
|
||||
@@ -226,13 +220,8 @@ class ObjectPage extends GenericPage
|
||||
if ($spawns = $this->subject->getSpawns(SPAWNINFO_FULL))
|
||||
{
|
||||
$map = ['data' => ['parent' => 'mapper-generic'], 'mapperData' => &$spawns];
|
||||
|
||||
foreach ($spawns as $areaId => &$areaData)
|
||||
{
|
||||
$map['extra'][$areaId] = ZoneList::getName($areaId);
|
||||
foreach ($areaData as &$floor)
|
||||
$floor['count'] = count($floor['coords']);
|
||||
}
|
||||
}
|
||||
|
||||
// consider pooled spawns
|
||||
@@ -415,7 +404,7 @@ class ObjectPage extends GenericPage
|
||||
'name' => '$LANG.tab_contains',
|
||||
'id' => 'contains',
|
||||
'extraCols' => "$[".implode(', ', array_unique($extraCols))."]",
|
||||
'hiddenCols' => $hiddenCols ? '$'.json_encode(array_values($hiddenCols)) : null
|
||||
'hiddenCols' => $hiddenCols ? '$'.Util::toJSON(array_values($hiddenCols)) : null
|
||||
)
|
||||
);
|
||||
}
|
||||
@@ -467,12 +456,12 @@ class ObjectPage extends GenericPage
|
||||
if ($asError)
|
||||
return '$WowheadPower.registerObject('.$this->typeId.', '.User::$localeId.', {});';
|
||||
|
||||
$s = $this->subject->getSpawns(true);
|
||||
$s = $this->subject->getSpawns(SPAWNINFO_SHORT);
|
||||
|
||||
$x = '$WowheadPower.registerObject('.$this->typeId.', '.User::$localeId.", {\n";
|
||||
$x .= "\tname_".User::$localeString.": '".Util::jsEscape($this->subject->getField('name', true))."',\n";
|
||||
$x .= "\ttooltip_".User::$localeString.": '".Util::jsEscape($this->subject->renderTooltip())."'\n";
|
||||
// $x .= "\tmap: ".($s ? '{zone: '.$s[0].', coords: {0:'.json_encode($s[1], JSON_NUMERIC_CHECK).'}' : '{}')."\n";
|
||||
$x .= "\tmap: ".($s ? Util::toJSON(['zone' => $s[0], 'coords' => [$s[1] => $s[2]]]) : '{}')."\n";
|
||||
$x .= "});";
|
||||
|
||||
return $x;
|
||||
|
||||
@@ -16,11 +16,7 @@ class QuestPage extends GenericPage
|
||||
protected $path = [0, 3];
|
||||
protected $tabId = 0;
|
||||
protected $mode = CACHE_TYPE_PAGE;
|
||||
protected $js = ['Mapper.js'];
|
||||
protected $css = array(
|
||||
['path' => 'Book.css'],
|
||||
['path' => 'Mapper.css']
|
||||
);
|
||||
protected $css = [['path' => 'Book.css']];
|
||||
|
||||
public function __construct($pageCall, $id)
|
||||
{
|
||||
@@ -525,7 +521,7 @@ class QuestPage extends GenericPage
|
||||
$this->map = null;
|
||||
// array(
|
||||
// 'data' => ['zone' => $this->typeId],
|
||||
// 'som' => json_encode($som, JSON_NUMERIC_CHECK)
|
||||
// 'som' => Util::toJSON($som)
|
||||
// );
|
||||
|
||||
/****************/
|
||||
@@ -622,7 +618,7 @@ class QuestPage extends GenericPage
|
||||
if ($cnd)
|
||||
{
|
||||
$tab = "<script type=\"text/javascript\">\n" .
|
||||
"var markup = ConditionList.createTab(".json_encode($cnd, JSON_NUMERIC_CHECK).");\n" .
|
||||
"var markup = ConditionList.createTab(".Util::toJSON($cnd).");\n" .
|
||||
"Markup.printHtml(markup, 'tab-conditions', { allow: Markup.CLASS_STAFF })" .
|
||||
"</script>";
|
||||
|
||||
|
||||
@@ -253,7 +253,7 @@ class SearchPage extends GenericPage
|
||||
{
|
||||
$items = [];
|
||||
foreach ($itemData as $k => $v)
|
||||
$items[] = json_encode($v, JSON_NUMERIC_CHECK);
|
||||
$items[] = Util::toJSON($v);
|
||||
|
||||
$outItems = "\t".implode(",\n\t", $items)."\n";
|
||||
}
|
||||
@@ -267,7 +267,7 @@ class SearchPage extends GenericPage
|
||||
if (!$v['heroic'])
|
||||
unset($v['heroic']);
|
||||
|
||||
$sets[] = json_encode($v, JSON_NUMERIC_CHECK);
|
||||
$sets[] = Util::toJSON($v);
|
||||
}
|
||||
|
||||
$outSets = "\t".implode(",\n\t", $sets)."\n";
|
||||
@@ -322,7 +322,7 @@ class SearchPage extends GenericPage
|
||||
break;
|
||||
}
|
||||
|
||||
return json_encode($result, JSON_NUMERIC_CHECK);
|
||||
return Util::toJSON($result);
|
||||
}
|
||||
|
||||
private function createLookup(array $fields = [])
|
||||
@@ -688,7 +688,7 @@ class SearchPage extends GenericPage
|
||||
'params' => [
|
||||
'id' => 'abilities',
|
||||
'name' => '$LANG.tab_abilities',
|
||||
'visibleCols' => '$'.json_encode($vis)
|
||||
'visibleCols' => '$'.Util::toJSON($vis)
|
||||
]
|
||||
);
|
||||
|
||||
@@ -743,7 +743,7 @@ class SearchPage extends GenericPage
|
||||
'params' => [
|
||||
'id' => 'talents',
|
||||
'name' => '$LANG.tab_talents',
|
||||
'visibleCols' => '$'.json_encode($vis)
|
||||
'visibleCols' => '$'.Util::toJSON($vis)
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
@@ -394,10 +394,10 @@ class SpellsPage extends GenericPage
|
||||
$visibleCols[] = 'trainingcost';
|
||||
|
||||
if ($visibleCols)
|
||||
$tab['params']['visibleCols'] = '$'.json_encode($visibleCols);
|
||||
$tab['params']['visibleCols'] = '$'.Util::toJSON($visibleCols);
|
||||
|
||||
if ($hiddenCols)
|
||||
$tab['params']['hiddenCols'] = '$'.json_encode($hiddenCols);
|
||||
$tab['params']['hiddenCols'] = '$'.Util::toJSON($hiddenCols);
|
||||
|
||||
$this->lvTabs[] = $tab;
|
||||
|
||||
|
||||
@@ -14,10 +14,7 @@ class ZonePage extends GenericPage
|
||||
protected $tabId = 0;
|
||||
protected $type = TYPE_ZONE;
|
||||
protected $tpl = 'detail-page-generic';
|
||||
protected $js = ['Mapper.js', 'ShowOnMap.js'];
|
||||
protected $css = array(
|
||||
['path' => 'Mapper.css']
|
||||
);
|
||||
protected $js = ['ShowOnMap.js'];
|
||||
|
||||
public function __construct($pageCall, $id)
|
||||
{
|
||||
|
||||
@@ -16,13 +16,7 @@ class ZonesPage extends GenericPage
|
||||
protected $tabId = 0;
|
||||
protected $mode = CACHE_TYPE_PAGE;
|
||||
protected $validCats = [true, true, [0, 1, 2], [0, 1, 2], true, true, true, true, true];
|
||||
protected $css = array(
|
||||
['path' => 'Mapper.css']
|
||||
);
|
||||
protected $js = array(
|
||||
'Mapper.js',
|
||||
'ShowOnMap.js'
|
||||
);
|
||||
protected $js = ['ShowOnMap.js'];
|
||||
|
||||
public function __construct($pageCall, $pageParam)
|
||||
{
|
||||
|
||||
1105
static/js/Mapper.js
1105
static/js/Mapper.js
File diff suppressed because it is too large
Load Diff
1112
static/js/global.js
1112
static/js/global.js
File diff suppressed because it is too large
Load Diff
@@ -2013,7 +2013,6 @@ var g_zone_areas = {
|
||||
4395: ['Dalaran', 'Die Schattenseite'],
|
||||
4494: ['Ahn\'kahet', '2. Stockwerk'],
|
||||
4722: ['Kolosseum der Kreuzfahrer', 'Die eisigen Tiefen'],
|
||||
4723: ['Kolosseum der Kreuzfahrer', 'Die eisigen Tiefen'],
|
||||
4812: ['Die untere Zitadelle', 'Das Schädelbollwerk', 'Dom des Todbringers', 'Hort der Frostkönigin', 'Der obere Bereich', 'Königliche Quartiere', 'Der Frostthron', 'Frostgram']
|
||||
};
|
||||
|
||||
|
||||
@@ -2059,7 +2059,6 @@ var g_zone_areas = {
|
||||
4395: ['Dalaran City', 'The Underbelly'],
|
||||
4494: ['Ahn\'Kahet', 'Level 2'],
|
||||
4722: ['Crusaders\' Coliseum', 'The Icy Depths'],
|
||||
4723: ['Crusaders\' Coliseum', 'The Icy Depths'],
|
||||
4812: ['The Lower Citadel', 'The Rampart of Skulls', 'Deathbringer\'s Rise', 'The Frost Queen\'s Lair', 'The Upper Reaches', 'Royal Quarters', 'The Frozen Throne', 'Frostmourne']
|
||||
};
|
||||
|
||||
|
||||
@@ -2015,7 +2015,6 @@ var g_zone_areas = {
|
||||
4395: ['Ciudad de Dalaran', 'Los Bajos Fondos'],
|
||||
4494: ['Ahn\'kahet', 'Nivel 2'],
|
||||
4722: ['El Coliseo Argenta', 'Las profundidades heladas'],
|
||||
4723: ['El Coliseo Argenta', 'Las profundidades heladas'],
|
||||
4812: ['La ciudadela inferior', 'La Muralla de las Calaveras', 'Ascenso del Libramorte', 'La guarida de la Reina de Escarcha', 'Los Confines superiores', 'Cuarteles Reales', 'El Trono Helado', 'Agonía de Escarcha']
|
||||
};
|
||||
|
||||
|
||||
@@ -2002,7 +2002,6 @@ var g_zone_areas = {
|
||||
4395: ['Dalaran', 'Les Entrailles'],
|
||||
4494: ['Ahn\'kahet', 'Plancher 2'],
|
||||
4722: ['L\'colisée d\'Argent', 'Les Profondeurs Glacées'],
|
||||
4723: ['L\'colisée d\'Argent', 'Les Profondeurs Glacées'],
|
||||
4812: ['La Citadelle Inférieure', 'Le Rempart des Cranes', 'Ascension de Porte-mort', 'Le repaire de la reine du Givre', 'Les étages supérieurs', 'Quartiers Royaux', 'Le Trône Gelé', 'Deuillegivre']
|
||||
};
|
||||
|
||||
|
||||
@@ -2002,7 +2002,6 @@ var g_zone_areas = {
|
||||
4395: ['Даларан', 'Клоака'],
|
||||
4494: ['Ан\'кахет', 'Уровень 2'],
|
||||
4722: ['Колизей Серебряного Авангарда', 'Ледяные глубины'],
|
||||
4723: ['Колизей Серебряного Авангарда', 'Ледяные глубины'],
|
||||
4812: ['Нижний ярус', 'Черепной вал', 'Подъем Смертоносного', 'Логово Королевы Льда', 'Верхний ярус', 'Королевские палаты', 'Ледяной Трон', 'Ледяная Скорбь']
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user