Fixes regarding csrf + refactor some parts of AAC (guilds + forum)

Replace $account_logged->getPlayers() with getPlayersList()
$_REQUEST['todo'] -> $_REQUEST['post']
$guild_errors -> $errors
This commit is contained in:
slawkens
2025-05-24 11:42:42 +02:00
parent e776bd52be
commit 84d502bf10
42 changed files with 301 additions and 272 deletions

View File

@@ -0,0 +1,12 @@
<form action="{{ getLink('forum') }}" method="post" style="display: inline"
{% if post.first_post != post.id %}
onclick="return confirm('Are you sure you want remove post of {{ post.player.getName() }}?')"
{% else %}
onclick="return confirm('Are you sure you want remove thread > {{ post.post_topic}} <?')"
{% endif %}
>
{{ csrf() }}
<input type="hidden" name="action" value="remove_post" />
<input type="hidden" name="id" value="{{ post.id }}" />
<input type="image" src="/images/del.png" border="0" alt="Delete" title="{% if post.first_post != post.id %}Remove Post{% else %}Remove Thread{% endif %}" />
</form>