Replace deprecated Twig 'filter' with 'apply'

Deprecated in Twig 2.9
This commit is contained in:
discomrade 2022-02-27 10:24:34 -01:00 committed by -
parent 419829f8aa
commit d69b30d83f
16 changed files with 34 additions and 34 deletions

View File

@ -1,4 +1,4 @@
{% filter remove_whitespace %}
{% apply remove_whitespace %}
{# Automatically removes unnecessary whitespace #}
<div class="ban">
{% if ban.expires and time() >= ban.expires %}
@ -141,4 +141,4 @@
{% endif %}
{% endif %}
</div>
{% endfilter %}
{% endapply %}

View File

@ -1,6 +1,6 @@
{% filter remove_whitespace %}
{% apply remove_whitespace %}
<div class="ban">
<h2>You are not banned!</h2>
<p class="reason">Well done on not being terrible!</p>
</div>
{% endfilter %}
{% endapply %}

View File

@ -1,4 +1,4 @@
{% filter remove_whitespace %}
{% apply remove_whitespace %}
{# tabs and new lines will be ignored #}
<div class="post reply {% if post.shadow %}shadow-post{% endif %}" id="reply_{{ post.id }}">
<p class="intro">
@ -18,7 +18,7 @@
{% include 'post/fileinfo.html' %}
{% include 'post/post_controls.html' %}
<div class="body" {% if post.files|length > 1 %}style="clear:both"{% endif %}>
{% endfilter %}{% if index %}{{ post.body|truncate_body(post.link) }}{% else %}{{ post.body }}{% endif %}{% filter remove_whitespace %}
{% endapply %}{% if index %}{{ post.body|truncate_body(post.link) }}{% else %}{{ post.body }}{% endif %}{% apply remove_whitespace %}
{% if post.modifiers['warning message'] %}
{{ config.mod.warning_message|sprintf(post.modifiers['warning message']) }}
{% endif %}
@ -28,4 +28,4 @@
</div>
</div>
<br/>
{% endfilter %}
{% endapply %}

View File

@ -1,4 +1,4 @@
{% filter remove_whitespace %}
{% apply remove_whitespace %}
{# tabs and new lines will be ignored #}
<div class="thread {% if post.shadow %}shadow-thread{% endif %}" id="thread_{{ post.id }}" data-board="{{ board.uri }}">
@ -61,7 +61,7 @@
{% include 'post/post_controls.html' %}
</p>
<div class="body">
{% endfilter %}{% if index %}{{ post.body|truncate_body(post.link) }}{% else %}{{ post.body }}{% endif %}{% filter remove_whitespace %}
{% endapply %}{% if index %}{{ post.body|truncate_body(post.link) }}{% else %}{{ post.body }}{% endif %}{% apply remove_whitespace %}
{% if post.modifiers['warning message'] %}
{{ config.mod.warning_message|sprintf(post.modifiers['warning message']) }}
{% endif %}
@ -92,7 +92,7 @@
{% endif %}
{% if not index %}
{% endif %}
</div>{% endfilter %}
</div>{% endapply %}
{% set iparray = [post.ip] %}
{% set hr = post.hr %}
{% for post in post.posts %}

View File

@ -1,4 +1,4 @@
{% filter remove_whitespace %}
{% apply remove_whitespace %}
{# tabs and new lines will be ignored #}
{# we are intentionally breaking the thread_ID convention: the jses need to handle this case differently #}
@ -39,4 +39,4 @@
<a href="{{ post.root }}{{ board.dir }}{{ config.dir.res }}{{ link_for(post) }}">[{% trans %}Reply{% endtrans %}]</a>
</tr>
{% endfilter %}
{% endapply %}

View File

@ -1,4 +1,4 @@
{% filter remove_whitespace %}
{% apply remove_whitespace %}
<!doctype html>
<html>
<head>
@ -40,4 +40,4 @@
{% include 'footer.html' %}
</body>
</html>
{% endfilter %}
{% endapply %}

View File

@ -1,4 +1,4 @@
{% filter remove_whitespace %}
{% apply remove_whitespace %}
<!doctype html>
<html>
<head>
@ -129,4 +129,4 @@
{% endverbatim %}</script>
</body>
</html>
{% endfilter %}
{% endapply %}

View File

@ -1,4 +1,4 @@
{% filter remove_whitespace %}
{% apply remove_whitespace %}
<!doctype html>
<html>
<head>
@ -34,4 +34,4 @@
{% include 'footer.html' %}
</body>
</html>
{% endfilter %}
{% endapply %}

View File

@ -1,4 +1,4 @@
{% filter remove_whitespace %}
{% apply remove_whitespace %}
<!doctype html>
<html>
<head>
@ -51,4 +51,4 @@
{% endfor %}
</body>
</html>
{% endfilter %}
{% endapply %}

View File

@ -1,4 +1,4 @@
{% filter remove_whitespace %}
{% apply remove_whitespace %}
<!doctype html>
<html>
<head>
@ -33,4 +33,4 @@
{% include 'footer.html' %}
</body>
</html>
{% endfilter %}
{% endapply %}

View File

@ -1,4 +1,4 @@
{% filter remove_whitespace %}
{% apply remove_whitespace %}
<!doctype html>
<html>
<head>
@ -38,4 +38,4 @@
</fieldset>
</body>
</html>
{% endfilter %}
{% endapply %}

View File

@ -1,4 +1,4 @@
{% filter remove_whitespace %}
{% apply remove_whitespace %}
<!doctype html>
<html>
<head>
@ -101,4 +101,4 @@
{% include 'footer.html' %}
</body>
</html>
{% endfilter %}
{% endapply %}

View File

@ -1,4 +1,4 @@
{% filter remove_whitespace %}
{% apply remove_whitespace %}
<!doctype html>
<html>
<head>
@ -58,4 +58,4 @@
{% include 'footer.html' %}
</body>
</html>
{% endfilter %}
{% endapply %}

View File

@ -1,4 +1,4 @@
{% filter remove_whitespace %}
{% apply remove_whitespace %}
<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/"
version="2.0">
@ -25,4 +25,4 @@
{% endfor %}
</channel>
</rss>
{% endfilter %}
{% endapply %}

View File

@ -1,4 +1,4 @@
{% filter remove_whitespace %}
{% apply remove_whitespace %}
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
{% for board in boards %}
@ -16,4 +16,4 @@
{% endfor %}
{% endfor %}
</urlset>
{% endfilter %}
{% endapply %}

View File

@ -1,4 +1,4 @@
{% filter remove_whitespace %}
{% apply remove_whitespace %}
{# Automatically removes unnecessary whitespace #}
<div class="ban">
<h2>{% trans %}You were issued an warning!{% endtrans %}</h2>
@ -35,4 +35,4 @@
{% endif %}
</div>
{% endfilter %}
{% endapply %}