diff --git a/includes/types/item.class.php b/includes/types/item.class.php index 08c241e7..97f81409 100644 --- a/includes/types/item.class.php +++ b/includes/types/item.class.php @@ -542,7 +542,8 @@ class ItemList extends BaseType // containerType (slotCount) if ($this->curTpl['slots'] > 0) { - $fam = log($this->curTpl['bagFamily'], 2) + 1; + $fam = $this->curTpl['bagFamily'] ? log($this->curTpl['bagFamily'], 2) + 1 : 0; + // word order differs <_< if (in_array(User::$localeId, [LOCALE_FR, LOCALE_ES, LOCALE_RU])) $x .= '
'.sprintf(Lang::$item['bagSlotString'], Lang::$item['bagFamily'][$fam], $this->curTpl['slots']); @@ -2068,9 +2069,23 @@ class ItemListFilter extends Filter if (is_int($_)) // specific return ['src.src'.$_, null, '!']; else if ($_) // any - return ['OR', ['src.src1', null, '!'], ['src.src2', null, '!'], ['src.src3', null, '!'], ['src.src4', null, '!'], ['src.src5', null, '!'], ['src.src8', null, '!']]; + { + $foo = ['OR']; + foreach ($this->enums[$cr[0]] as $bar) + if (is_int($bar)) + $foo[] = ['src.src'.$bar, null, '!']; + + return $foo; + } else if (!$_) // none - return ['AND', ['src.src1', null], ['src.src2', null], ['src.src3', null], ['src.src4', null], ['src.src5', null], ['src.src8', null]]; + { + $foo = ['AND']; + foreach ($this->enums[$cr[0]] as $bar) + if (is_int($bar)) + $foo[] = ['src.src'.$bar, null]; + + return $foo; + } } break; } diff --git a/includes/types/skill.class.php b/includes/types/skill.class.php index 4564030f..805b17d2 100644 --- a/includes/types/skill.class.php +++ b/includes/types/skill.class.php @@ -61,7 +61,7 @@ class SkillList extends BaseType 'name' => Util::jsEscape($this->getField('name', true)), 'profession' => $this->curTpl['professionMask'], 'recipeSubclass' => $this->curTpl['recipeSubClass'], - 'specializations' => json_encode($this->curTpl['specializations'], JSON_NUMERIC_CHECK), + 'specializations' => Util::toJSON($this->curTpl['specializations']), 'icon' => Util::jsEscape($this->curTpl['iconString']) ); } diff --git a/pages/utility.php b/pages/utility.php index 8eface21..ea18981c 100644 --- a/pages/utility.php +++ b/pages/utility.php @@ -152,9 +152,9 @@ class UtilityPage extends GenericPage foreach ($this->lvTabs[0]['data'] as $row) { $xml .= "\n". - "<![CDATA[".$row['subject']."]]>\n". + "<![CDATA[".htmlentities($row['subject'])."]]>\n". "".HOST_URL.'?go-to-comment&id='.$row['id']."\n". - "\n". // todo (low): preview should be html-formated + "\n". // todo (low): preview should be html-formated "".date(DATE_RSS, time() - $row['elapsed'])."\n". "".HOST_URL.'?go-to-comment&id='.$row['id']."\n". "\n". diff --git a/template/pages/achievement.tpl.php b/template/pages/achievement.tpl.php index 5672451b..360a132d 100644 --- a/template/pages/achievement.tpl.php +++ b/template/pages/achievement.tpl.php @@ -44,7 +44,7 @@ foreach ($this->criteria['data'] as $i => $cr): endif; if (!empty($l['count']) && $l['count'] > 1): - echo ' ('.$l['count'].')'; + echo ' ('.$l['count'].')'; endif; if (isset($cr['extraText'])): diff --git a/template/pages/home.tpl.php b/template/pages/home.tpl.php index 3c932bfe..e0a1fe13 100644 --- a/template/pages/home.tpl.php +++ b/template/pages/home.tpl.php @@ -13,7 +13,7 @@ brick('announcement'); ?> diff --git a/template/pages/npc.tpl.php b/template/pages/npc.tpl.php index 32653958..44ab106a 100644 --- a/template/pages/npc.tpl.php +++ b/template/pages/npc.tpl.php @@ -47,7 +47,7 @@ endif; if ($this->quotes[0]): ?> -

quotes[1]; ?>)

+

quotes[1]; ?>)

'; + ' '.$itr['name'].''.($itr['cap'] && $itr['qty'] > 0 ? ' ('.sprintf(Lang::$npc['stopsAt'], $itr['cap']).')' : null).''; endforeach; echo ''; diff --git a/template/pages/spell.tpl.php b/template/pages/spell.tpl.php index f8413e6c..f24bff65 100644 --- a/template/pages/spell.tpl.php +++ b/template/pages/spell.tpl.php @@ -21,7 +21,7 @@ brick('tooltip'); -if ($this->reagents[0]): +if ($this->reagents[1]): if ($this->tools): echo "
\n"; endif; @@ -30,9 +30,7 @@ if ($this->reagents[0]): if ($this->tools): echo "
\n"; - endif; - if ($this->tools): if ($this->reagents[0]): echo "
\n"; endif; @@ -132,7 +130,8 @@ if !empty($transfer)} gcd; ?> scaling) != [-1, -1, 0, 0]): // not default values +// not default values +if (!in_array(array_values($this->scaling), [[-1, -1, 0, 0], [0, 0, 0, 0]])): ?> @@ -190,7 +189,10 @@ foreach ($this->effects as $i => $e): endif; if ($e['procData'][1]): - echo sprintf(Lang::$spell['cooldown'], $e['procData'][1]); + if ($e['procData'][0] < 100.0): + echo '
'; + endif; + echo sprintf(Lang::$game['cooldown'], $e['procData'][1]); endif; endif;