* fixed when ban expires is unlimited

* moved Banished code to twig
This commit is contained in:
slawkens
2017-10-19 10:41:39 +02:00
parent cde42ec3fa
commit 23c1df72aa
2 changed files with 13 additions and 7 deletions

View File

@@ -329,7 +329,13 @@
{% set rows = rows + 1 %}
<tr bgcolor="{{ getStyle(rows) }}">
<td width="20%">Created:</td>
<td>{{ account.getCustomField("created")|date("j F Y, g:i a") ~ bannedUntil|raw }}</td>
<td>{{ account.getCustomField("created")|date("j F Y, g:i a") }}
{% if bannedUntil matches '/^\\d+$/' or bannedUntil == '-1' %}
<font color="red">[Banished {% if bannedUntil == '-1' %}forever{% else %}until {{ bannedUntil|date('d F Y, h:s') }}{% endif %}]</font>
{% else %}
{{ bannedUntil|raw }}
{% endif %}
</td>
</tr>
</table>
{{ hook(constant('HOOK_CHARACTERS_AFTER_ACCOUNT')) }}