* fixed displaying reagents without components
 * prevent display of default scaling
Item:
 * fixed displaying bagType of regular bags
Utility:
 * htmlencode strings in the RSS-feed
- quicksearching should always point to self not parent
- fixed some wonky formating in templates
This commit is contained in:
Sarjuuk
2015-01-18 18:36:10 +01:00
parent 2d09ea9bec
commit 4dd6ba47a7
7 changed files with 32 additions and 15 deletions

View File

@@ -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 .= '<br />'.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;
}

View File

@@ -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'])
);
}

View File

@@ -152,9 +152,9 @@ class UtilityPage extends GenericPage
foreach ($this->lvTabs[0]['data'] as $row)
{
$xml .= "<item>\n".
"<title><![CDATA[".$row['subject']."]]></title>\n".
"<title><![CDATA[".htmlentities($row['subject'])."]]></title>\n".
"<link>".HOST_URL.'?go-to-comment&amp;id='.$row['id']."</link>\n".
"<description><![CDATA[".$row['preview']." ".sprintf(Lang::$timeUnits['ago'], Util::formatTime($row['elapsed'] * 100, true))."]]></description>\n". // todo (low): preview should be html-formated
"<description><![CDATA[".htmlentities($row['preview'])." ".sprintf(Lang::$timeUnits['ago'], Util::formatTime($row['elapsed'] * 100, true))."]]></description>\n". // todo (low): preview should be html-formated
"<pubDate>".date(DATE_RSS, time() - $row['elapsed'])."</pubDate>\n".
"<guid>".HOST_URL.'?go-to-comment&amp;id='.$row['id']."</guid>\n".
"<domain />\n".

View File

@@ -44,7 +44,7 @@ foreach ($this->criteria['data'] as $i => $cr):
endif;
if (!empty($l['count']) && $l['count'] > 1):
echo ' ('.$l['count'].')';
echo '&nbsp;('.$l['count'].')';
endif;
if (isset($cr['extraText'])):

View File

@@ -13,7 +13,7 @@
<?php $this->brick('announcement'); ?>
<div class="home-search" id="home-search">
<form method="get" action="/">
<form method="get" action="">
<input type="text" name="search" />
</form>
</div>

View File

@@ -47,7 +47,7 @@ endif;
if ($this->quotes[0]):
?>
<h3><a class="disclosure-off" onclick="return g_disclose($WH.ge('quotes-generic'), this)"><?php echo Lang::$npc['quotes'].' ('.$this->quotes[1]; ?>)</a></h3>
<h3><a class="disclosure-off" onclick="return g_disclose($WH.ge('quotes-generic'), this)"><?php echo Lang::$npc['quotes'].'&nbsp;('.$this->quotes[1]; ?>)</a></h3>
<div id="quotes-generic" style="display: none"><ul>
<?php
foreach ($this->quotes[0] as $group):
@@ -92,7 +92,7 @@ if ($this->reputation):
foreach ($set[1] as $itr):
echo '<li><div'.($itr['qty'] < 0 ? ' class="reputation-negative-amount"' : null).'><span>'.$itr['qty'].'</span> '.Lang::$npc['repWith'] .
' <a href="?faction='.$itr['id'].'">'.$itr['name'].'</a>'.($itr['cap'] && $itr['qty'] > 0 ? ' ('.sprintf(Lang::$npc['stopsAt'], $itr['cap']).')' : null).'</div></li>';
' <a href="?faction='.$itr['id'].'">'.$itr['name'].'</a>'.($itr['cap'] && $itr['qty'] > 0 ? '&nbsp;('.sprintf(Lang::$npc['stopsAt'], $itr['cap']).')' : null).'</div></li>';
endforeach;
echo '</ul>';

View File

@@ -21,7 +21,7 @@
<?php
$this->brick('tooltip');
if ($this->reagents[0]):
if ($this->reagents[1]):
if ($this->tools):
echo " <div style=\"float: left; margin-right: 75px\">\n";
endif;
@@ -30,9 +30,7 @@ if ($this->reagents[0]):
if ($this->tools):
echo " </div>\n";
endif;
if ($this->tools):
if ($this->reagents[0]):
echo " <div style=\"float: left\">\n";
endif;
@@ -132,7 +130,8 @@ if !empty($transfer)}
<td><?php echo $this->gcd; ?></td>
</tr>
<?php
if (array_values($this->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]])):
?>
<tr>
<th><?php echo Lang::$spell['_scaling']; ?></th>
@@ -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 '<br>';
endif;
echo sprintf(Lang::$game['cooldown'], $e['procData'][1]);
endif;
endif;