Index: trunk/core/kernel/db/db_tag_processor.php =================================================================== diff -u -r8374 -r8388 --- trunk/core/kernel/db/db_tag_processor.php (.../db_tag_processor.php) (revision 8374) +++ trunk/core/kernel/db/db_tag_processor.php (.../db_tag_processor.php) (revision 8388) @@ -208,29 +208,8 @@ */ function PrintList($params) { - $list =& $this->GetList($params); - $id_field = $this->Application->getUnitOption($this->Prefix,'IDField'); - - $list->Query(); - $o = ''; - $list->GoFirst(); - - $block_params=$this->prepareTagParams($params); - $block_params['name'] = $this->SelectParam($params, 'render_as,block'); - $block_params['pass_params'] = 'true'; - - $i = 0; - while (!$list->EOL()) - { - $this->Application->SetVar( $this->getPrefixSpecial().'_id', $list->GetDBField($id_field) ); // for edit/delete links using GET - $block_params['is_last'] = ($i == $list->SelectedCount-1); - $o.= $this->Application->ParseBlock($block_params, 1); - $list->GoNext(); - $i++; - } - - $this->Application->SetVar( $this->getPrefixSpecial().'_id', ''); - return $o; + $params['no_table'] = 1; + return $this->PrintList2($params); } function InitList($params) @@ -408,6 +387,8 @@ $block_params['last_col'] = $column_number == $columns ? 1 : 0; $block_params['column_number'] = $column_number; + + $this->PrepareListElementParams($list, $block_params); // new, no need to rewrite PrintList $o.= $this->Application->ParseBlock($block_params, 1); array_push($displayed, $list->GetDBField($id_field)); @@ -457,6 +438,19 @@ return $o; } + /** + * Allows to modify block params & current list record before PrintList parses record + * + * @param kDBList $object + * @param Array $block_params + */ + function PrepareListElementParams(&$object, &$block_params) + { +// $fields_hash =& $object->Records[$this->CurrentIndex]; +// +// $object->Records[$this->CurrentIndex] =& $fields_hash; + } + function MoreLink($params) { $per_page = $this->SelectParam($params, 'per_page,max_items');