Index: branches/unlabeled/unlabeled-1.68.4/core/kernel/db/db_tag_processor.php =================================================================== diff -u -r7018 -r7027 --- branches/unlabeled/unlabeled-1.68.4/core/kernel/db/db_tag_processor.php (.../db_tag_processor.php) (revision 7018) +++ branches/unlabeled/unlabeled-1.68.4/core/kernel/db/db_tag_processor.php (.../db_tag_processor.php) (revision 7027) @@ -145,12 +145,12 @@ $block_params['field'] = $field; $block_params['sort_field'] = isset($options['sort_field']) ? $options['sort_field'] : $field; $block_params['filter_field'] = isset($options['filter_field']) ? $options['filter_field'] : $field; - + $field_options = $this->Application->getUnitOption($this->Prefix.'.'.$field, 'Fields'); if (isset($field_options['use_phrases'])) { $block_params['use_phrases'] = $field_options['use_phrases']; } - + $block_params['is_last'] = ($i == count($grid_config)); $block_params = array_merge($std_params, $block_params, $options); $o.= $this->Application->ParseBlock($block_params, 1); @@ -1214,7 +1214,7 @@ unset($params[$tp_name]); } } - + $tag_params = Array(); foreach($prefixes as $prefix_special) { @@ -1291,6 +1291,22 @@ } } + function GridInfo($params) { + $object =& $this->getObject($params); + /* @var $object kDBList */ + switch ($params['type']) + { + case 'filtered': + return $object->RecordsCount; + case 'total': + return $object->NoFilterCount; + case 'from': + return $object->Offset+1; //0-based + case 'to': + return min($object->Offset + $object->PerPage, $object->RecordsCount); + } + } + /** * Parses block depending on its element type. * For radio and select elements values are taken from 'value_list_field' in key1=value1,key2=value2