diff options
author | Lukas Winkler <git@lw1.at> | 2020-06-04 14:47:54 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-04 14:47:54 +0300 |
commit | a35070be5146539999fdd02d5323f466d314192b (patch) | |
tree | a7f280e0f371f5b5370547b67ae63d142e341126 /plugins/CorePluginsAdmin | |
parent | 2851045e2ffd0f71fa1a56b2b6cab35cc7b1b4ab (diff) |
Twig 3 upgrade (#15573)
* proof of concept of Twig 3 upgrade
* some for if template fixes
* potentially fix RenderTokenParser
* comment out RenderTokenParser
* clearCompiledTemplates() using unlinkRecursive()
* macro imported in block and used in subblock is not valid
twigphp/Twig#3090
* more template fixes
* remove non existing clearTemplateCache()
* add missing parameter to unlinkRecursive
* Use custom MethodCallExpression to fix RenderTokenParser
* increase minimum php version to 7.2.5
* submodule update
* fix twig loop filter
* updates expected UI files
* fix twig loop filter
* fix twig loop filter
* fix neutral evolution check
* fix macro usage
* convert some conditions to filters
* fix macro include
* remove debug code as default logging is good enough
* submodule updates
Co-authored-by: sgiehl <stefan@matomo.org>
Diffstat (limited to 'plugins/CorePluginsAdmin')
-rw-r--r-- | plugins/CorePluginsAdmin/templates/macros.twig | 6 | ||||
-rw-r--r-- | plugins/CorePluginsAdmin/templates/safemode.twig | 10 |
2 files changed, 8 insertions, 8 deletions
diff --git a/plugins/CorePluginsAdmin/templates/macros.twig b/plugins/CorePluginsAdmin/templates/macros.twig index db19df33df..eb126d5c2a 100644 --- a/plugins/CorePluginsAdmin/templates/macros.twig +++ b/plugins/CorePluginsAdmin/templates/macros.twig @@ -239,8 +239,8 @@ <div class="plugin-author"> By {% if plugin.info.authors is defined -%} - {% spaceless %} - {% for author in plugin.info.authors if author.name %} + {% apply spaceless %} + {% for author in plugin.info.authors|filter(author => author.name) %} {% if author.homepage is defined %} <a title="{{ 'CorePluginsAdmin_AuthorHomepage'|translate }}" href="{{ author.homepage }}" rel="noreferrer noopener" target="_blank">{{ author.name }}</a> {% else %} @@ -250,7 +250,7 @@ , {% endif %} {% endfor %} - {% endspaceless %} + {% endapply %} {%- endif %}. </div> {% endif %} diff --git a/plugins/CorePluginsAdmin/templates/safemode.twig b/plugins/CorePluginsAdmin/templates/safemode.twig index 48f3cc11ee..87853af664 100644 --- a/plugins/CorePluginsAdmin/templates/safemode.twig +++ b/plugins/CorePluginsAdmin/templates/safemode.twig @@ -78,8 +78,8 @@ {% endif %} </p> <table> - {% for pluginName, plugin in plugins if plugin.uninstallable and plugin.activated %} - <tr {% if loop.index is divisibleby(2) %}style="background-color: #eeeeee"{% endif %}> + {% for pluginName, plugin in plugins|filter(plugin => plugin.uninstallable and plugin.activated) %} + <tr {% if loop.index is divisible by(2) %}style="background-color: #eeeeee"{% endif %}> <td style="min-width:200px;"> {{ pluginName }} </td> @@ -95,7 +95,7 @@ </table> {% set uninstalledPluginsFound = false %} - {% for pluginName, plugin in plugins if plugin.uninstallable and not plugin.activated %} + {% for pluginName, plugin in plugins|filter(plugin => plugin.uninstallable and not plugin.activated) %} {% set uninstalledPluginsFound = true %} {% endfor %} @@ -107,8 +107,8 @@ </p> <table> - {% for pluginName, plugin in plugins if plugin.uninstallable and not plugin.activated %} - <tr {% if loop.index is divisibleby(2) %}style="background-color: #eeeeee"{% endif %}> + {% for pluginName, plugin in plugins|filter(plugin => plugin.uninstallable and not plugin.activated) %} + <tr {% if loop.index is divisible by(2) %}style="background-color: #eeeeee"{% endif %}> <td style="min-width:200px;"> {{ pluginName }} </td> |