Index: branches/5.3.x/core/kernel/db/db_tag_processor.php =================================================================== diff -u -N -r16395 -r16503 --- branches/5.3.x/core/kernel/db/db_tag_processor.php (.../db_tag_processor.php) (revision 16395) +++ branches/5.3.x/core/kernel/db/db_tag_processor.php (.../db_tag_processor.php) (revision 16503) @@ -1,6 +1,6 @@ SelectParam($params, 'list_name,name'); + $list_name = array_key_exists('list_name', $params) ? $params['list_name'] : ''; + if ( !$list_name ) { $list_name = $this->Application->Parser->GetParam('list_name'); } @@ -2105,6 +2106,9 @@ case 'total': return $object->GetRecordsCount(false); + case 'selected': + return $object->GetSelectedCount(); + case 'from': return $object->GetRecordsCount() ? $object->GetOffset() + 1 : 0; //0-based @@ -2295,6 +2299,20 @@ } /** + * Returns selected records count. + * + * @param array $params Tag params. + * + * @return string + */ + protected function SelectedRecords(array $params) + { + $list =& $this->GetList($params); + + return $list->GetSelectedCount(); + } + + /** * Range filter field name * * @param Array $params @@ -2656,7 +2674,7 @@ } $icon_url = $this->Application->BaseURL() . 'core/admin_templates/img/top_frame/icons/' . $button_icon; - $button_onclick = '$form_name = ' . json_encode($form_name) . '; std_edit_item(' . json_encode($item_prefix) . ', ' . json_encode($template) . ');'; + $button_onclick = '$form_name = ' . json_encode($form_name) . '; std_edit_item(' . json_encode($item_prefix) . ', ' . json_encode($template) . '); return false;'; $button_code = '