From 48dde6468ac922cf38837b3214f886f08bfc9d85 Mon Sep 17 00:00:00 2001 From: Christian Boltz Date: Sun, 14 Feb 2016 00:46:14 +0000 Subject: [PATCH] list.tpl: - getting the key from $RAW_item.$id_field turned out to be broken in corner cases, leading to empty output. The better (and simpler) fix is to just let the foreach loop set 'itemkey'. - the example for special handling of a specific table and field contained a superfluous git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1826 a1433add-5e2c-0410-b055-b7f2511e0802 --- templates/list.tpl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/templates/list.tpl b/templates/list.tpl index f5f50f22..b355bc14 100644 --- a/templates/list.tpl +++ b/templates/list.tpl @@ -51,8 +51,8 @@   -{foreach from=$RAW_items item=RAW_item} - {assign "item" $items.{$RAW_item.$id_field|escape:"html"}} {* array keys in $items are html-escaped *} +{foreach key=itemkey from=$RAW_items item=RAW_item} + {assign "item" $items.${itemkey|escape:"html"}} {* array keys in $items are html-escaped *} {#tr_hilightoff#} {foreach key=key item=field from=$struct} @@ -66,7 +66,7 @@ {/if} {if $table == 'foo' && $key == 'bar'} - Special handling (complete table row) for {$table} / {$key} + Special handling (complete table row) for {$table} / {$key} {else} {if $table == 'foo' && $key == 'bar'}