Index: branches/5.2.x/core/kernel/db/db_tag_processor.php =================================================================== diff -u -N -r14244 -r14585 --- branches/5.2.x/core/kernel/db/db_tag_processor.php (.../db_tag_processor.php) (revision 14244) +++ branches/5.2.x/core/kernel/db/db_tag_processor.php (.../db_tag_processor.php) (revision 14585) @@ -1,6 +1,6 @@ SelectParam($params, 'allowed_tags')); - if (mb_strlen($stripped_value) > $first_chars) { - $value = mb_substr($stripped_value, 0, $first_chars) . ' ...'; + if ( mb_strlen($stripped_value) > $first_chars ) { + $value = preg_replace('/\s+?(\S+)?$/', '', mb_substr($stripped_value, 0, $first_chars + 1)) . ' ...'; } } @@ -879,6 +879,20 @@ return $value; } + function FieldHintLabel($params) + { + if ( isset($params['direct_label']) && $params['direct_label'] ) { + $label = $params['direct_label']; + $hint = $this->Application->Phrase($label, false); + } + else { + $label = $params['title_label']; + $hint = $this->Application->Phrase('hint:' . $label, false); + } + + return $hint; // $hint != strtoupper('!' . $label . '!') ? $hint : ''; + } + /** * Returns formatted date + time on current language * @@ -2082,6 +2096,20 @@ $ret = $ret[ $params['type'] ]; } + if (array_key_exists('formatted', $params) && $params['formatted']) { + $object =& $this->GetList($params); + $field_options = $object->GetFieldOptions($field); + + if (array_key_exists('formatter', $field_options)) { + $formatter_class = $field_options['formatter']; + + $formatter =& $this->Application->recallObject($formatter_class); + /* @var $formatter kFormatter */ + + $ret = $formatter->Format($ret, $field, $object); + } + } + if (!array_key_exists('no_special', $params) || !$params['no_special']) { $ret = htmlspecialchars($ret); }