Browse Source

Update twig to 1.14.5 (add php 8 support)

dockerize
Zankaria 3 months ago
committed by Zankaria
parent
commit
ed8224e4e0
  1. 5
      composer.json
  2. 172
      composer.lock
  3. 4
      templates/generic_page.html
  4. 4
      templates/header.html
  5. 4
      templates/index.html
  6. 52
      templates/main.js
  7. 4
      templates/page.html
  8. 4
      templates/post_form.html
  9. 4
      templates/themes/basic/index.html
  10. 4
      templates/themes/calendar/calendar.html
  11. 4
      templates/themes/catalog/catalog.html
  12. 4
      templates/themes/donate/donate.html
  13. 4
      templates/themes/faq/index.html
  14. 4
      templates/themes/irc/irc.html
  15. 4
      templates/themes/radio/radio.html
  16. 4
      templates/themes/rules/rules.html
  17. 4
      templates/themes/staffapplication/staffapplication.html
  18. 4
      templates/themes/stream/stream.html
  19. 4
      templates/thread.html
  20. 4
      templates/thread2_old.html

5
composer.json

@ -3,10 +3,11 @@
"description": "leftypol imageboard",
"type": "project",
"require": {
"twig/twig": "^2.9",
"twig/twig": "^2.14.5",
"lifo/ip": "^1.0",
"gettext/gettext": "^1.0",
"mrclay/minify": "^2.1.6"
"mrclay/minify": "^2.1.6",
"phpmyadmin/twig-i18n-extension": "^4.1"
},
"autoload": {
"classmap": ["inc/"],

172
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": "b3695c356f94b9226e689a31f8dc1463",
"content-hash": "9390756f1db53a7bb4475fe5b68c9f9d",
"packages": [
{
"name": "gettext/gettext",
@ -157,6 +157,62 @@
},
"time": "2017-11-03T21:04:01+00:00"
},
{
"name": "phpmyadmin/twig-i18n-extension",
"version": "4.1.0",
"source": {
"type": "git",
"url": "https://github.com/phpmyadmin/twig-i18n-extension.git",
"reference": "a514a2afd29717a2a68c298582cc2739e8edeed0"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpmyadmin/twig-i18n-extension/zipball/a514a2afd29717a2a68c298582cc2739e8edeed0",
"reference": "a514a2afd29717a2a68c298582cc2739e8edeed0",
"shasum": ""
},
"require": {
"php": "^7.2 || ^8.0",
"twig/twig": "^1.42.3|^2.0|^3.0"
},
"require-dev": {
"phpmyadmin/coding-standard": "^3.0.0",
"phpmyadmin/motranslator": "^5.2",
"phpstan/phpstan": "^1.9.4",
"phpunit/phpunit": "^7 || ^8 || ^9"
},
"type": "library",
"autoload": {
"psr-4": {
"PhpMyAdmin\\Twig\\Extensions\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
"email": "[email protected]"
},
{
"name": "The phpMyAdmin Team",
"email": "[email protected]",
"homepage": "https://www.phpmyadmin.net/team/"
}
],
"description": "Internationalization support for Twig via the gettext library",
"keywords": [
"gettext",
"i18n"
],
"support": {
"issues": "https://github.com/phpmyadmin/twig-i18n-extension/issues",
"source": "https://github.com/phpmyadmin/twig-i18n-extension"
},
"time": "2023-09-12T18:31:42+00:00"
},
{
"name": "symfony/polyfill-ctype",
"version": "v1.24.0",
@ -319,34 +375,107 @@
],
"time": "2024-01-29T20:11:03+00:00"
},
{
"name": "symfony/polyfill-php72",
"version": "v1.29.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php72.git",
"reference": "861391a8da9a04cbad2d232ddd9e4893220d6e25"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/861391a8da9a04cbad2d232ddd9e4893220d6e25",
"reference": "861391a8da9a04cbad2d232ddd9e4893220d6e25",
"shasum": ""
},
"require": {
"php": ">=7.1"
},
"type": "library",
"extra": {
"thanks": {
"name": "symfony/polyfill",
"url": "https://github.com/symfony/polyfill"
}
},
"autoload": {
"files": [
"bootstrap.php"
],
"psr-4": {
"Symfony\\Polyfill\\Php72\\": ""
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Nicolas Grekas",
"email": "[email protected]"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions",
"homepage": "https://symfony.com",
"keywords": [
"compatibility",
"polyfill",
"portable",
"shim"
],
"support": {
"source": "https://github.com/symfony/polyfill-php72/tree/v1.29.0"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2024-01-29T20:11:03+00:00"
},
{
"name": "twig/twig",
"version": "v2.9.0",
"version": "v2.15.4",
"source": {
"type": "git",
"url": "https://github.com/twigphp/Twig.git",
"reference": "82a1c055c8ed4c4705023bfd0405f3c74db6e3ae"
"reference": "3e059001d6d597dd50ea7c74dd2464b4adea48d3"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/twigphp/Twig/zipball/82a1c055c8ed4c4705023bfd0405f3c74db6e3ae",
"reference": "82a1c055c8ed4c4705023bfd0405f3c74db6e3ae",
"url": "https://api.github.com/repos/twigphp/Twig/zipball/3e059001d6d597dd50ea7c74dd2464b4adea48d3",
"reference": "3e059001d6d597dd50ea7c74dd2464b4adea48d3",
"shasum": ""
},
"require": {
"php": "^7.0",
"php": ">=7.1.3",
"symfony/polyfill-ctype": "^1.8",
"symfony/polyfill-mbstring": "^1.3"
"symfony/polyfill-mbstring": "^1.3",
"symfony/polyfill-php72": "^1.8"
},
"require-dev": {
"psr/container": "^1.0",
"symfony/debug": "^2.7",
"symfony/phpunit-bridge": "^3.4.19|^4.1.8"
"symfony/phpunit-bridge": "^4.4.9|^5.0.9|^6.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.9-dev"
"dev-master": "2.15-dev"
}
},
"autoload": {
@ -368,15 +497,14 @@
"homepage": "http://fabien.potencier.org",
"role": "Lead Developer"
},
{
"name": "Twig Team",
"role": "Contributors"
},
{
"name": "Armin Ronacher",
"email": "[email protected]",
"role": "Project Founder"
},
{
"name": "Twig Team",
"homepage": "https://twig.symfony.com/contributors",
"role": "Contributors"
}
],
"description": "Twig, the flexible, fast, and secure template language for PHP",
@ -386,9 +514,19 @@
],
"support": {
"issues": "https://github.com/twigphp/Twig/issues",
"source": "https://github.com/twigphp/Twig/tree/v2.9.0"
"source": "https://github.com/twigphp/Twig/tree/v2.15.4"
},
"time": "2019-04-28T06:57:38+00:00"
"funding": [
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/twig/twig",
"type": "tidelift"
}
],
"time": "2022-12-27T12:26:20+00:00"
}
],
"packages-dev": [],

4
templates/generic_page.html

@ -49,8 +49,8 @@
{% for footer in config.footer %}<p class="unimportant" style="text-align:center;">{{ footer }}</p>{% endfor %}
</footer>
</div>
<script type="text/javascript">{% raw %}
<script type="text/javascript">{% verbatim %}
ready();
{% endraw %}</script>
{% endverbatim %}</script>
</body>
</html>

4
templates/header.html

@ -30,7 +30,7 @@
{% endif %}
{% if config.recaptcha %}
<script src="//www.google.com/recaptcha/api.js"></script>
<style type="text/css">{% raw %}
<style type="text/css">{% verbatim %}
#recaptcha_area {
float: none !important;
padding: 0 !important;
@ -58,4 +58,4 @@
.recaptchatable, #recaptcha_area tr, #recaptcha_area td, #recaptcha_area th {
padding: 0 !important;
}
{% endraw %}</style>{% endif %}
{% endverbatim %}</style>{% endif %}

4
templates/index.html

@ -132,9 +132,9 @@
</div>
<script type="text/javascript">{% raw %}
<script type="text/javascript">{% verbatim %}
ready();
{% endraw %}</script>
{% endverbatim %}</script>
</body>
</html>

52
templates/main.js

@ -1,4 +1,4 @@
{% raw %}
{% verbatim %}
/* gettext-compatible _ function, example of usage:
*
@ -109,16 +109,16 @@ function alert(a, do_confirm, confirm_ok_action, confirm_cancel_action) {
var saved = {};
var selectedstyle = '{% endraw %}{{ config.default_stylesheet.0|addslashes }}{% raw %}';
var selectedstyle = '{% endverbatim %}{{ config.default_stylesheet.0|addslashes }}{% verbatim %}';
var styles = {
{% endraw %}
{% for stylesheet in stylesheets %}{% raw %}'{% endraw %}{{ stylesheet.name|addslashes }}{% raw %}' : '{% endraw %}{{ stylesheet.uri|addslashes }}{% raw %}',
{% endraw %}{% endfor %}{% raw %}
{% endverbatim %}
{% for stylesheet in stylesheets %}{% verbatim %}'{% endverbatim %}{{ stylesheet.name|addslashes }}{% verbatim %}' : '{% endverbatim %}{{ stylesheet.uri|addslashes }}{% verbatim %}',
{% endverbatim %}{% endfor %}{% verbatim %}
};
var codestyles = {
{% endraw %}
{% for stylesheet in code_stylesheets %}{% raw %}'{% endraw %}{{ stylesheet.name|addslashes }}{% raw %}' : '{% endraw %}{{ stylesheet.uri|addslashes }}{% raw %}',
{% endraw %}{% endfor %}{% raw %}
{% endverbatim %}
{% for stylesheet in code_stylesheets %}{% verbatim %}'{% endverbatim %}{{ stylesheet.name|addslashes }}{% verbatim %}' : '{% endverbatim %}{{ stylesheet.uri|addslashes }}{% verbatim %}',
{% endverbatim %}{% endfor %}{% verbatim %}
};
if (typeof board_name === 'undefined') {
@ -126,16 +126,16 @@ if (typeof board_name === 'undefined') {
}
function changeStyle(styleName, link) {
{% endraw %}
{% if config.stylesheets_board %}{% raw %}
{% endverbatim %}
{% if config.stylesheets_board %}{% verbatim %}
if (board_name) {
stylesheet_choices[board_name] = styleName;
localStorage.board_stylesheets = JSON.stringify(stylesheet_choices);
}
{% endraw %}{% else %}
{% endverbatim %}{% else %}
localStorage.stylesheet = styleName;
{% endif %}
{% raw %}
{% verbatim %}
// Main stylesheet
if (!document.getElementById('stylesheet')) {
@ -178,9 +178,9 @@ function changeStyle(styleName, link) {
}
{% endraw %}
{% endverbatim %}
{% if config.stylesheets_board %}
{% raw %}
{% verbatim %}
if (!localStorage.board_stylesheets) {
localStorage.board_stylesheets = '{}';
@ -197,7 +197,7 @@ function changeStyle(styleName, link) {
}
{% endraw%}
{% else %}
{% raw %}
{% verbatim %}
if (localStorage.stylesheet) {
for (var styleName in styles) {
if (styleName == localStorage.stylesheet) {
@ -206,9 +206,9 @@ function changeStyle(styleName, link) {
}
}
}
{% endraw %}
{% endverbatim %}
{% endif %}
{% raw %}
{% verbatim %}
function init_stylechooser() {
var newElement = document.createElement('div');
@ -261,7 +261,7 @@ function highlightReply(id) {
function generatePassword() {
var pass = '';
var chars = '{% endraw %}{{ config.genpassword_chars }}{% raw %}';
var chars = '{% endverbatim %}{{ config.genpassword_chars }}{% verbatim %}';
for (var i = 0; i < 8; i++) {
var rnd = Math.floor(Math.random() * chars.length);
pass += chars.substring(rnd, rnd + 1);
@ -355,15 +355,15 @@ function rememberStuff() {
if (sessionStorage.body) {
var saved = JSON.parse(sessionStorage.body);
if (get_cookie('{% endraw %}{{ config.cookies.js }}{% raw %}')) {
if (get_cookie('{% endverbatim %}{{ config.cookies.js }}{% verbatim %}')) {
// Remove successful posts
var successful = JSON.parse(get_cookie('{% endraw %}{{ config.cookies.js }}{% raw %}'));
var successful = JSON.parse(get_cookie('{% endverbatim %}{{ config.cookies.js }}{% verbatim %}'));
for (var url in successful) {
saved[url] = null;
}
sessionStorage.body = JSON.stringify(saved);
document.cookie = '{% endraw %}{{ config.cookies.js }}{% raw %}={};expires=0;path=/;';
document.cookie = '{% endverbatim %}{{ config.cookies.js }}{% verbatim %}={};expires=0;path=/;';
}
if (saved[document.location]) {
document.forms.post.body.value = saved[document.location];
@ -391,13 +391,13 @@ var script_settings = function(script_name) {
function init() {
init_stylechooser();
{% endraw %}
{% endverbatim %}
{% if config.allow_delete %}
if (document.forms.postcontrols) {
document.forms.postcontrols.password.value = localStorage.password;
}
{% endif %}
{% raw %}
{% verbatim %}
if (window.location.hash.indexOf('q') != 1 && window.location.hash.substring(1))
highlightReply(window.location.hash.substring(1));
@ -418,16 +418,16 @@ function ready() {
}
}
{% endraw %}
{% endverbatim %}
var post_date = "{{ config.post_date }}";
var max_images = {{ config.max_images }};
onready(init);
{% if config.google_analytics %}{% raw %}
{% if config.google_analytics %}{% verbatim %}
var _gaq = _gaq || [];_gaq.push(['_setAccount', '{% endraw %}{{ config.google_analytics }}{% raw %}']);{% endraw %}{% if config.google_analytics_domain %}{% raw %}_gaq.push(['_setDomainName', '{% endraw %}{{ config.google_analytics_domain }}{% raw %}']){% endraw %}{% endif %}{% if not config.google_analytics_domain %}{% raw %}_gaq.push(['_setDomainName', 'none']){% endraw %}{% endif %}{% raw %};_gaq.push(['_trackPageview']);(function() {var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;ga.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'stats.g.doubleclick.net/dc.js';var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);})();{% endraw %}{% endif %}
var _gaq = _gaq || [];_gaq.push(['_setAccount', '{% endverbatim %}{{ config.google_analytics }}{% verbatim %}']);{% endverbatim %}{% if config.google_analytics_domain %}{% verbatim %}_gaq.push(['_setDomainName', '{% endverbatim %}{{ config.google_analytics_domain }}{% verbatim %}']){% endverbatim %}{% endif %}{% if not config.google_analytics_domain %}{% verbatim %}_gaq.push(['_setDomainName', 'none']){% endverbatim %}{% endif %}{% verbatim %};_gaq.push(['_trackPageview']);(function() {var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;ga.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'stats.g.doubleclick.net/dc.js';var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);})();{% endverbatim %}{% endif %}
{% if config.statcounter_project and config.statcounter_security %}
var sc = document.createElement('script');

4
templates/page.html

@ -35,8 +35,8 @@
</footer>
<div class="pages"></div>
<script type="text/javascript">{% raw %}
<script type="text/javascript">{% verbatim %}
ready();
{% endraw %}</script>
{% endverbatim %}</script>
</body>
</html>

4
templates/post_form.html

@ -220,6 +220,6 @@
{% if 'js/upload-selection.js' in config.additional_javascript %}
<script type="text/javascript">if (typeof init_upload_selection !== 'undefined') init_upload_selection();</script>
{% endif %}
<script type="text/javascript">{% raw %}
<script type="text/javascript">{% verbatim %}
rememberStuff();
{% endraw %}</script>
{% endverbatim %}</script>

4
templates/themes/basic/index.html

@ -49,9 +49,9 @@
<br><a href="https://engine.vichan.net/">vichan</a> Copyright &copy; 2012-2016 vichan-devel</p>
</footer>
<div class="pages"></div>
<script type="text/javascript">{% raw %}
<script type="text/javascript">{% verbatim %}
ready();
{% endraw %}</script>
{% endverbatim %}</script>
</body>
</html>
{% endapply %}

4
templates/themes/calendar/calendar.html

@ -185,8 +185,8 @@
});
</script>
<script type="text/javascript">{% raw %}
<script type="text/javascript">{% verbatim %}
ready();
{% endraw %}</script>
{% endverbatim %}</script>
</body>
</html>

4
templates/themes/catalog/catalog.html

@ -107,9 +107,9 @@
</footer>
<div class="pages"></div>
<script type="text/javascript">{% raw %}
<script type="text/javascript">{% verbatim %}
ready();
{% endraw %}</script>
{% endverbatim %}</script>
</body>
</html>
{% endapply %}

4
templates/themes/donate/donate.html

@ -52,9 +52,9 @@
</div>
<div class="pages"></div>
<script type="text/javascript">{% raw %}
<script type="text/javascript">{% verbatim %}
ready();
{% endraw %}</script>
{% endverbatim %}</script>
</body>
</html>

4
templates/themes/faq/index.html

@ -139,9 +139,9 @@
<br>vichan Copyright &copy; 2012-2016 vichan-devel</p>
</footer>
<div class="pages"></div>
<script type="text/javascript">{% raw %}
<script type="text/javascript">{% verbatim %}
ready();
{% endraw %}</script>
{% endverbatim %}</script>
</body>
</html>
{% endfilter %}

4
templates/themes/irc/irc.html

@ -27,9 +27,9 @@
<iframe src="https://kiwiirc.com/nextclient/#irc://{{ settings.server }}:+{{ settings.port }}/#{{ settings.channel }}" width="800px" height="100%" scrolling="no"></iframe>
</div>
<div class="pages"></div>
<script type="text/javascript">{% raw %}
<script type="text/javascript">{% verbatim %}
ready();
{% endraw %}</script>
{% endverbatim %}</script>
</body>
</html>
{% endfilter %}

4
templates/themes/radio/radio.html

@ -127,8 +127,8 @@ $(document).ready(function(){
<p style="text-align:center;"> To upload a voice-over / bump to radio click <a href="{{ settings.httpprefix ~ 'bump.html'}}" >here </a> </p>
</div>
<div class="pages"></div>
<script type="text/javascript">{% raw %}
<script type="text/javascript">{% verbatim %}
ready();
{% endraw %}</script>
{% endverbatim %}</script>
</body>
</html>

4
templates/themes/rules/rules.html

@ -26,9 +26,9 @@
{% include 'rules.html' %}
<div class="pages"></div>
<script type="text/javascript">{% raw %}
<script type="text/javascript">{% verbatim %}
ready();
{% endraw %}</script>
{% endverbatim %}</script>
</body>
</html>
{% endfilter %}

4
templates/themes/staffapplication/staffapplication.html

@ -72,9 +72,9 @@
<br><a href="https://github.com/lainchan/lainchan">lainchan</a> Copyright &copy; 2014-2017 lainchan Administration</p>
</footer>
<div class="pages"></div>
<script type="text/javascript">{% raw %}
<script type="text/javascript">{% verbatim %}
ready();
{% endraw %}</script>
{% endverbatim %}</script>
</body>
</html>
{% endfilter %}

4
templates/themes/stream/stream.html

@ -174,8 +174,8 @@ function change_format(e) {
<br><a href="https://github.com/lainchan/lainchan">lainchan</a> Copyright &copy; 2014-2017 lainchan Administration</p>
</footer>
<div class="pages"></div>
<script type="text/javascript">{% raw %}
<script type="text/javascript">{% verbatim %}
ready();
{% endraw %}</script>
{% endverbatim %}</script>
</body>
</html>

4
templates/thread.html

@ -113,9 +113,9 @@
</div>
<div class=pages></div>
</div>
<script type="text/javascript">{% raw %}
<script type="text/javascript">{% verbatim %}
ready();
{% endraw %}</script>
{% endverbatim %}</script>
<a href="#" id="bottom"></a>
</body>
</html>

4
templates/thread2_old.html

@ -111,9 +111,9 @@
</div>
<div class=pages></div>
</div>
<script type="text/javascript">{% raw %}
<script type="text/javascript">{% verbatim %}
ready();
{% endraw %}</script>
{% endverbatim %}</script>
<a href="#" id="bottom"></a>
</body>
</html>

Loading…
Cancel
Save