mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
Items/Filter
fixed error, when appending empty upg= to query NPC/Text handled rare case of uppercase string-placeholders
This commit is contained in:
@@ -232,7 +232,7 @@ class ItemsPage extends GenericPage
|
|||||||
if (isset($this->filter['sl'])) // skip lookups for unselected slots
|
if (isset($this->filter['sl'])) // skip lookups for unselected slots
|
||||||
$groups = array_intersect($groups, (array)$this->filter['sl']);
|
$groups = array_intersect($groups, (array)$this->filter['sl']);
|
||||||
|
|
||||||
if (isset($this->filter['upg'])) // skip lookups for slots we dont have items to upgrade for
|
if (!empty($this->filter['upg'])) // skip lookups for slots we dont have items to upgrade for
|
||||||
$groups = array_intersect($groups, (array)$this->filter['upg']);
|
$groups = array_intersect($groups, (array)$this->filter['upg']);
|
||||||
|
|
||||||
if ($groups)
|
if ($groups)
|
||||||
@@ -416,7 +416,7 @@ class ItemsPage extends GenericPage
|
|||||||
}
|
}
|
||||||
|
|
||||||
// reformat for use in template
|
// reformat for use in template
|
||||||
if (isset($this->filter['upg']))
|
if (!empty($this->filter['upg']))
|
||||||
$this->filter['upg'] = implode(':', array_keys($this->filter['upg']));
|
$this->filter['upg'] = implode(':', array_keys($this->filter['upg']));
|
||||||
|
|
||||||
// whoops, we have no data? create emergency content
|
// whoops, we have no data? create emergency content
|
||||||
|
|||||||
@@ -957,6 +957,9 @@ class NpcPage extends GenericPage
|
|||||||
if (in_array($t['type'], [2, 16]) && strpos($msg, '%s') === false)
|
if (in_array($t['type'], [2, 16]) && strpos($msg, '%s') === false)
|
||||||
$msg = '%s '.$msg;
|
$msg = '%s '.$msg;
|
||||||
|
|
||||||
|
// fixup: bad case-insensivity
|
||||||
|
$msg = str_replace('%S', '%s', $msg);
|
||||||
|
|
||||||
$line = array(
|
$line = array(
|
||||||
'range' => $t['range'],
|
'range' => $t['range'],
|
||||||
'type' => 2, // [type: 0, 12] say: yellow-ish
|
'type' => 2, // [type: 0, 12] say: yellow-ish
|
||||||
|
|||||||
Reference in New Issue
Block a user