From 1f2f56538e8ef366b9e3fbbafe476bc1abf1300c Mon Sep 17 00:00:00 2001 From: azett Date: Sun, 20 Feb 2022 14:26:16 +0100 Subject: [PATCH] Fixed some template errors --- fp-plugins/commentcenter/tpls/deletecomm.tpl | 2 +- fp-plugins/commentcenter/tpls/editpol.tpl | 3 ++- fp-plugins/commentcenter/tpls/listpolicies.tpl | 6 +++--- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/fp-plugins/commentcenter/tpls/deletecomm.tpl b/fp-plugins/commentcenter/tpls/deletecomm.tpl index 229c57c..3b4ad44 100644 --- a/fp-plugins/commentcenter/tpls/deletecomm.tpl +++ b/fp-plugins/commentcenter/tpls/deletecomm.tpl @@ -7,7 +7,7 @@ {include file=plugin:commentcenter/listcomments}

{$plang.sure}

-{if $is_managing} +{if isset($is_managing) && $is_managing} {assign var="button_suff" value="_2"} {else} diff --git a/fp-plugins/commentcenter/tpls/editpol.tpl b/fp-plugins/commentcenter/tpls/editpol.tpl index be4ff38..1515224 100644 --- a/fp-plugins/commentcenter/tpls/editpol.tpl +++ b/fp-plugins/commentcenter/tpls/editpol.tpl @@ -1,5 +1,6 @@ {include file=plugin:commentcenter/header} {html_form} +{if !isset($polnew)}{assign var="polnew" value=false}{/if}

{if $polnew}{$plang.newpol}{else}{$plang.editpol}{/if}

{$plang.apply_to}
@@ -8,7 +9,7 @@

- +
diff --git a/fp-plugins/commentcenter/tpls/listpolicies.tpl b/fp-plugins/commentcenter/tpls/listpolicies.tpl index 6424066..7235312 100644 --- a/fp-plugins/commentcenter/tpls/listpolicies.tpl +++ b/fp-plugins/commentcenter/tpls/listpolicies.tpl @@ -14,9 +14,9 @@ {if isset($delete)} {/if} -{if $policy.is_all} +{if isset($policy.is_all) && $policy.is_all} {$plang.all_entries} -{elseif is_array($policy.entry) && count($policy.entry)>0} +{elseif isset($policy.entry) && is_array($policy.entry) && count($policy.entry)>0} {$plang.fol_entries}
    {foreach from=$policy.entry item=entry} @@ -29,7 +29,7 @@
  • {$policy.entry|idToSubject}
{else} - {if count($policy.categories)>0} + {if isset($policy.categories) && count($policy.categories)>0}

{$plang.fol_cats} {$policy.categories|@filed}

{/if}