Lang/cleanup

* fixed break and trim functions not handling text shorter than break length
 * add option to output raw text besides html, markup format
 * decalare return types and parameter types
 * cleanup
This commit is contained in:
Sarjuuk
2023-04-29 03:01:13 +02:00
parent 78f7f6b9cf
commit 8bf7b3ee06
15 changed files with 136 additions and 91 deletions

View File

@@ -936,7 +936,7 @@ class ItemList extends BaseType
$x .= sprintf(Lang::game('requires'), '<a class="q1" href="?faction='.$reqFac.'">'.FactionList::getName($reqFac).'</a> - '.Lang::game('rep', $this->curTpl['requiredFactionRank'])).'<br />';
// locked or openable
if ($locks = Lang::getLocks($this->curTpl['lockId'], $arr, true, true))
if ($locks = Lang::getLocks($this->curTpl['lockId'], $arr, true))
$x .= '<span class="q0">'.Lang::item('locked').'<br />'.implode('<br />', array_map(function($x) { return sprintf(Lang::game('requires'), $x); }, $locks)).'</span><br />';
else if ($this->curTpl['flags'] & ITEM_FLAG_OPENABLE)
$x .= '<span class="q2">'.Lang::item('openClick').'</span><br />';