From 3c3238e7ca5ebb62b84f7a50560d886031cd3a18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= <come.chilliet@fusiondirectory.org> Date: Wed, 1 Jul 2020 14:34:54 +0200 Subject: [PATCH] :ambulance: fix(core) Avoid problems with sectionIcon in templates issue #6071 --- ihtml/themes/breezy/simpleplugin_section.tpl | 2 +- plugins/addons/dashboard/groups_stats.tpl | 2 +- plugins/addons/dashboard/pwd_stats.tpl | 2 +- plugins/addons/dashboard/users_accounts.tpl | 2 +- plugins/addons/dashboard/users_stats.tpl | 2 +- plugins/generic/references/contents.tpl | 2 +- setup/setup_checks.tpl | 2 +- setup/setup_migrate.tpl | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/ihtml/themes/breezy/simpleplugin_section.tpl b/ihtml/themes/breezy/simpleplugin_section.tpl index ce065e76a..e295bb5df 100644 --- a/ihtml/themes/breezy/simpleplugin_section.tpl +++ b/ihtml/themes/breezy/simpleplugin_section.tpl @@ -1,5 +1,5 @@ <fieldset id="{$sectionId}" class="plugin-section{$sectionClasses}"> - <legend><span>{if $sectionIcon}<img src="{$sectionIcon|escape}" alt=""/>{/if}{$section|escape}</span></legend> + <legend><span>{if !empty($sectionIcon)}<img src="{$sectionIcon|escape}" alt=""/>{/if}{$section|escape}</span></legend> <div> <table> {foreach from=$attributes item=attribute key=id} diff --git a/plugins/addons/dashboard/groups_stats.tpl b/plugins/addons/dashboard/groups_stats.tpl index f3150102a..56452aae5 100644 --- a/plugins/addons/dashboard/groups_stats.tpl +++ b/plugins/addons/dashboard/groups_stats.tpl @@ -1,6 +1,6 @@ <div id="{$sectionId}" class="plugin-section"> <span class="legend"> - {if $sectionIcon}<img src="{$sectionIcon|escape}" alt=""/>{/if}{$section|escape} + {if !empty($sectionIcon)}<img src="{$sectionIcon|escape}" alt=""/>{/if}{$section|escape} </span> <div> <img src="{$attributes.groups_stats.img|escape}" alt="group icon"/> diff --git a/plugins/addons/dashboard/pwd_stats.tpl b/plugins/addons/dashboard/pwd_stats.tpl index 2beb83ec3..add05c170 100644 --- a/plugins/addons/dashboard/pwd_stats.tpl +++ b/plugins/addons/dashboard/pwd_stats.tpl @@ -1,6 +1,6 @@ <div id="{$sectionId}" class="plugin-section"> <span class="legend"> - {if $sectionIcon}<img src="{$sectionIcon|escape}" alt=""/>{/if}{$section|escape} + {if !empty($sectionIcon)}<img src="{$sectionIcon|escape}" alt=""/>{/if}{$section|escape} </span> <div> <img src="{$attributes.pwds_stats.img|escape}" alt="user icon"/> diff --git a/plugins/addons/dashboard/users_accounts.tpl b/plugins/addons/dashboard/users_accounts.tpl index 8be66f49e..ac9b6dfb0 100644 --- a/plugins/addons/dashboard/users_accounts.tpl +++ b/plugins/addons/dashboard/users_accounts.tpl @@ -1,6 +1,6 @@ <div id="{$sectionId}" class="plugin-section fullwidth"> <span class="legend"> - {if $sectionIcon}<img src="{$sectionIcon|escape}" alt=""/>{/if}{$section|escape} + {if !empty($sectionIcon)}<img src="{$sectionIcon|escape}" alt=""/>{/if}{$section|escape} </span> <div> <h1> diff --git a/plugins/addons/dashboard/users_stats.tpl b/plugins/addons/dashboard/users_stats.tpl index c6797eef6..f49ba653d 100644 --- a/plugins/addons/dashboard/users_stats.tpl +++ b/plugins/addons/dashboard/users_stats.tpl @@ -1,6 +1,6 @@ <div id="{$sectionId}" class="plugin-section"> <span class="legend"> - {if $sectionIcon}<img src="{$sectionIcon|escape}" alt=""/>{/if}{$section|escape} + {if !empty($sectionIcon)}<img src="{$sectionIcon|escape}" alt=""/>{/if}{$section|escape} </span> <div> <img src="{$attributes.users_stats.img|escape}" alt="user icon"/> diff --git a/plugins/generic/references/contents.tpl b/plugins/generic/references/contents.tpl index eaf31cc3b..6af7a3f63 100644 --- a/plugins/generic/references/contents.tpl +++ b/plugins/generic/references/contents.tpl @@ -1,6 +1,6 @@ <div id="{$sectionId}" class="plugin-section{$sectionClasses}"> <span class="legend"> - {if $sectionIcon}<img src="{$sectionIcon|escape}" alt=""/>{/if}{$section|escape} + {if !empty($sectionIcon)}<img src="{$sectionIcon|escape}" alt=""/>{/if}{$section|escape} </span> <div> {if $attributes.refs} diff --git a/setup/setup_checks.tpl b/setup/setup_checks.tpl index 8dccadf0c..39fc1ec57 100644 --- a/setup/setup_checks.tpl +++ b/setup/setup_checks.tpl @@ -1,6 +1,6 @@ <div id="{$sectionId}" class="plugin-section"> <span class="legend"> - {if $sectionIcon}<img src="{$sectionIcon|escape}" alt=""/>{/if}{$section|escape} + {if !empty($sectionIcon)}<img src="{$sectionIcon|escape}" alt=""/>{/if}{$section|escape} </span> <div> {foreach from=$attributes item=infos} diff --git a/setup/setup_migrate.tpl b/setup/setup_migrate.tpl index 8072f33bb..a165e2e90 100644 --- a/setup/setup_migrate.tpl +++ b/setup/setup_migrate.tpl @@ -1,6 +1,6 @@ <div id="{$sectionId}" class="plugin-section{$sectionClasses}"> <span class="legend"> - {if $sectionIcon}<img src="{$sectionIcon|escape}" alt=""/>{/if}{$section|escape} + {if !empty($sectionIcon)}<img src="{$sectionIcon|escape}" alt=""/>{/if}{$section|escape} </span> <div> {foreach from=$attributes item=checks} -- GitLab