Index: kernel/db/dbitem.php =================================================================== --- kernel/db/dbitem.php (revision 13127) +++ kernel/db/dbitem.php (working copy) @@ -1299,10 +1299,16 @@ * Don't affect current record index * * @param string $field + * @param bool $formatted + * @param string $format * @return Array */ - function GetCol($field) + function GetCol($field, $formatted = false, $format = null) { + if ($formatted) { + return Array (0 => $this->GetField($field, $format)); + } + return Array (0 => $this->GetDBField($field)); } Index: kernel/db/dblist.php =================================================================== --- kernel/db/dblist.php (revision 13127) +++ kernel/db/dblist.php (working copy) @@ -951,16 +951,30 @@ * Don't affect current record index * * @param string $field + * @param bool $formatted + * @param string $format * @return Array */ - function GetCol($field) + function GetCol($field, $formatted = false, $format = null) { $i = 0; $ret = Array (); - while ($i < $this->SelectedCount) { - $ret[] = $this->Records[$i][$field]; - $i++; + + if ($formatted && array_key_exists('formatter', $this->Fields[$field])) { + $formatter =& $this->Application->recallObject($this->Fields[$field]['formatter']); + /* @var $formatter kFormatter */ + + while ($i < $this->SelectedCount) { + $ret[] = $formatter->Format($this->Records[$i][$field], $field, $this, $format); + $i++; + } } + else { + while ($i < $this->SelectedCount) { + $ret[] = $this->Records[$i][$field]; + $i++; + } + } return $ret; }