From ed67493bb8a73793f2dbc140518fb8bc52999a08 Mon Sep 17 00:00:00 2001 From: Sarjuuk Date: Sun, 5 Jul 2015 19:13:11 +0200 Subject: [PATCH] Items/Filter fixed error, when appending empty upg= to query NPC/Text handled rare case of uppercase string-placeholders --- pages/items.php | 4 ++-- pages/npc.php | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/pages/items.php b/pages/items.php index 3317bece..00340df4 100644 --- a/pages/items.php +++ b/pages/items.php @@ -232,7 +232,7 @@ class ItemsPage extends GenericPage if (isset($this->filter['sl'])) // skip lookups for unselected slots $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']); if ($groups) @@ -416,7 +416,7 @@ class ItemsPage extends GenericPage } // reformat for use in template - if (isset($this->filter['upg'])) + if (!empty($this->filter['upg'])) $this->filter['upg'] = implode(':', array_keys($this->filter['upg'])); // whoops, we have no data? create emergency content diff --git a/pages/npc.php b/pages/npc.php index f6692b59..6489b5de 100644 --- a/pages/npc.php +++ b/pages/npc.php @@ -957,6 +957,9 @@ class NpcPage extends GenericPage if (in_array($t['type'], [2, 16]) && strpos($msg, '%s') === false) $msg = '%s '.$msg; + // fixup: bad case-insensivity + $msg = str_replace('%S', '%s', $msg); + $line = array( 'range' => $t['range'], 'type' => 2, // [type: 0, 12] say: yellow-ish