Use apply tag instead of filter and fix for loop
https://twig.symfony.com/doc/1.x/tags/apply.html https://twig.symfony.com/doc/2.x/deprecated.html#tags "The filter tag is deprecated in Twig 2.9. Use the apply tag instead (the Twig\TokenParser\FilterTokenParser classes is also deprecated)." and "Adding an if condition on a for tag is deprecated in Twig 2.10. Use a filter filter or an "if" condition inside the "for" body instead (if your condition depends on a variable updated inside the loop)" Signed-off-by: William Desportes <williamdes@wdes.fr>
This commit is contained in:
parent
6f034732c3
commit
b475cfdd6c
@ -15,11 +15,11 @@
|
||||
<div class="group">
|
||||
<h2>{% trans 'phpMyAdmin Demo Server' %}</h2>
|
||||
<p class="cfg_dbg_demo">
|
||||
{% filter format('<a href="url.php?url=https://demo.phpmyadmin.net/" target="_blank" rel="noopener noreferrer">demo.phpmyadmin.net</a>')|raw %}
|
||||
{% apply format('<a href="url.php?url=https://demo.phpmyadmin.net/" target="_blank" rel="noopener noreferrer">demo.phpmyadmin.net</a>')|raw %}
|
||||
{% trans %}
|
||||
You are using the demo server. You can do anything here, but please do not change root, debian-sys-maint and pma users. More information is available at %s.
|
||||
{% endtrans %}
|
||||
{% endfilter %}
|
||||
{% endapply %}
|
||||
</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
@ -13,8 +13,10 @@ AJAX.scriptHandler
|
||||
{% endfor %}
|
||||
;
|
||||
$(function() {
|
||||
{% for file in files if file.has_onload %}
|
||||
{% for file in files %}
|
||||
{% if file.has_onload %}
|
||||
AJAX.fireOnload('{{ file.filename|escape_js_string }}');
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
});
|
||||
{% endif %}
|
||||
|
||||
@ -12,11 +12,11 @@
|
||||
{% elseif master_configure is null and clear_screen is null %}
|
||||
<fieldset>
|
||||
<legend>{% trans 'Master replication' %}</legend>
|
||||
{% filter format('<a href="server_replication.php" data-post="' ~ get_common(url_params|merge({'mr_configure': true}), '') ~ '">', '</a>')|raw %}
|
||||
{% apply format('<a href="server_replication.php" data-post="' ~ get_common(url_params|merge({'mr_configure': true}), '') ~ '">', '</a>')|raw %}
|
||||
{% trans %}
|
||||
This server is not configured as master in a replication process. Would you like to %sconfigure%s it?
|
||||
{% endtrans %}
|
||||
{% endfilter %}
|
||||
{% endapply %}
|
||||
</fieldset>
|
||||
{% endif %}
|
||||
|
||||
|
||||
@ -99,11 +99,11 @@
|
||||
</ul>
|
||||
</div>
|
||||
{% elseif not has_slave_configure %}
|
||||
{% filter format('<a href="server_replication.php" data-post="' ~ get_common(url_params|merge({
|
||||
{% apply format('<a href="server_replication.php" data-post="' ~ get_common(url_params|merge({
|
||||
'sl_configure': true,
|
||||
'repl_clear_scr': true
|
||||
})) ~ '">', '</a>')|raw %}
|
||||
{% trans 'This server is not configured as slave in a replication process. Would you like to %sconfigure%s it?' %}
|
||||
{% endfilter %}
|
||||
{% endapply %}
|
||||
{% endif %}
|
||||
</fieldset>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user