diff --git a/composer.json b/composer.json index da521855..ebbe92fa 100644 --- a/composer.json +++ b/composer.json @@ -9,7 +9,7 @@ }, "require": { "gettext/gettext": "^4.4", - "twig/twig": "^2.4", + "twig/twig": "^2.9", "twig/extensions": "^1.5", "geoip/geoip": "^1.16", "mrclay/minify": "^3.0", diff --git a/composer.lock b/composer.lock index 518078a8..a661a191 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "024e398738753e998a1e2b62235843a3", + "content-hash": "cd1eb38aad1ab9b78eddde4761daa8b6", "packages": [ { "name": "awsumchan/ip", diff --git a/inc/config.php b/inc/config.php index 69c22186..8f902c44 100644 --- a/inc/config.php +++ b/inc/config.php @@ -875,7 +875,7 @@ // Timezone to use for displaying dates/tiems. $config['timezone'] = 'America/Los_Angeles'; // The format string passed to strftime() for displaying dates. - // http://www.php.net/manual/en/function.strftime.php + // https://www.php.net/manual/en/function.strftime.php $config['post_date'] = '%m/%d/%y (%a) %H:%M:%S'; // Same as above, but used for "you are banned' pages. $config['ban_date'] = '%A %e %B, %Y'; diff --git a/inc/template.php b/inc/template.php index a46660f0..047888e3 100644 --- a/inc/template.php +++ b/inc/template.php @@ -1,7 +1,7 @@ $length) { if ($preserve) { diff --git a/templates/banned.html b/templates/banned.html index 0444d1f1..e507e676 100644 --- a/templates/banned.html +++ b/templates/banned.html @@ -1,4 +1,4 @@ -{% filter remove_whitespace %} +{% apply spaceless %} {# Automatically removes unnecessary whitespace #}
{% if ban.expires and time() >= ban.expires %} @@ -13,7 +13,7 @@ {% trans %}You have been banned from{% endtrans %} {% endif %} {% if ban.board %} - {{ config.board_abbreviation|sprintf(ban.board) }} + {{ config.board_abbreviation|format(ban.board) }} {% else %} {% trans %}all boards{% endtrans %} {% endif %} @@ -30,7 +30,7 @@ {% endif %}

{% trans %}Your ban was filed on{% endtrans %} - {{ ban.created|date(config.ban_date) }} + {{ ban.created|strftime(config.ban_date) }} {% if config.show_modname %} {% if ban.username %} {% trans %}by{% endtrans %} {{ ban.username }} @@ -44,7 +44,7 @@ {% elseif ban.expires %} {% trans %}expires{% endtrans %} {{ ban.expires|until }} {% trans %}from now, which is on{% endtrans %} - {{ ban.expires|date(config.ban_date) }} + {{ ban.expires|strftime(config.ban_date) }} {% endverbatim %} -{% endfilter %} +{% endapply %} diff --git a/templates/themes/categories/news.html b/templates/themes/categories/news.html index 32c6c6c9..6a05fb56 100644 --- a/templates/themes/categories/news.html +++ b/templates/themes/categories/news.html @@ -1,4 +1,4 @@ -{% filter remove_whitespace %} +{% apply spaceless %} @@ -24,7 +24,7 @@ {% else %} {% trans %}no subject{% endtrans %} {% endif %} - — {% trans %}by{% endtrans %} {{ entry.name }} {% trans %}at{% endtrans %} {{ entry.time|date(config.post_date) }} + — {% trans %}by{% endtrans %} {{ entry.name }} {% trans %}at{% endtrans %} {{ entry.time|strftime(config.post_date) }}

{{ entry.body }}

{% endfor %} @@ -33,9 +33,9 @@ -{% endfilter %} +{% endapply %} diff --git a/templates/themes/categories/sidebar.html b/templates/themes/categories/sidebar.html index e386c948..1a35667e 100644 --- a/templates/themes/categories/sidebar.html +++ b/templates/themes/categories/sidebar.html @@ -1,4 +1,4 @@ -{% filter remove_whitespace %} +{% apply spaceless %} @@ -51,4 +51,4 @@ {% endfor %} -{% endfilter %} +{% endapply %} diff --git a/templates/themes/frameset/news.html b/templates/themes/frameset/news.html index 68178aa5..a3d07f5d 100644 --- a/templates/themes/frameset/news.html +++ b/templates/themes/frameset/news.html @@ -1,4 +1,4 @@ -{% filter remove_whitespace %} +{% apply spaceless %} @@ -23,7 +23,7 @@ {% else %} no subject {% endif %} - — by {{ entry.name }} at {{ entry.time|date(config.post_date) }} + — by {{ entry.name }} at {{ entry.time|strftime(config.post_date) }}

{{ entry.body }}

{% endfor %} @@ -32,9 +32,9 @@ -{% endfilter %} +{% endapply %} diff --git a/templates/themes/frameset/sidebar.html b/templates/themes/frameset/sidebar.html index 40e2d719..1bb81330 100644 --- a/templates/themes/frameset/sidebar.html +++ b/templates/themes/frameset/sidebar.html @@ -1,4 +1,4 @@ -{% filter remove_whitespace %} +{% apply spaceless %} @@ -29,7 +29,7 @@