summaryrefslogtreecommitdiff
path: root/framework/Web/UI/WebControls/TRepeater.php
diff options
context:
space:
mode:
authorxue <>2006-06-15 18:18:47 +0000
committerxue <>2006-06-15 18:18:47 +0000
commit6c0154fb4e292ad22667e618f598a37cc5f9d524 (patch)
tree925b51622b8f054d203050cd673eb48a24035c3c /framework/Web/UI/WebControls/TRepeater.php
parentc8919fa9fc845ab7f3c6701b6de08c8cd042ec30 (diff)
Merge from 3.0 branch till 1166.
Diffstat (limited to 'framework/Web/UI/WebControls/TRepeater.php')
-rw-r--r--framework/Web/UI/WebControls/TRepeater.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/framework/Web/UI/WebControls/TRepeater.php b/framework/Web/UI/WebControls/TRepeater.php
index 2070cb1a..9c1cc4ac 100644
--- a/framework/Web/UI/WebControls/TRepeater.php
+++ b/framework/Web/UI/WebControls/TRepeater.php
@@ -443,10 +443,12 @@ class TRepeater extends TDataBoundControl implements INamingContainer
$items=$this->getItems();
$itemIndex=0;
$hasSeparator=$this->_separatorTemplate!==null;
- foreach($data as $dataItem)
+ foreach($data as $key=>$dataItem)
{
if($keyField!=='')
$keys->add($this->getDataFieldValue($dataItem,$keyField));
+ else
+ $keys->add($key);
if($itemIndex===0 && $this->_headerTemplate!==null)
$this->_header=$this->createItemInternal(-1,self::IT_HEADER,true,null);
if($hasSeparator && $itemIndex>0)