Index: trunk/core/kernel/db/dblist.php =================================================================== diff -u -N -r8402 -r8428 --- trunk/core/kernel/db/dblist.php (.../dblist.php) (revision 8402) +++ trunk/core/kernel/db/dblist.php (.../dblist.php) (revision 8428) @@ -220,7 +220,7 @@ $filter =& $filter[$filter_scope]; return $filter->getFilter($name); } - + /** * Removes specified filter from filters list * @@ -350,14 +350,14 @@ $sql = $q.' '.$this->Conn->getLimitClause($this->Offset,$limit); $this->Records = $this->Conn->Query($sql); - + if (!$this->Records && ($this->Page > 1)) { // no records & page > 1, try to reset to 1st page (works only when list in not counted before) $this->Application->StoreVar($this->getPrefixSpecial().'_Page', 1); $this->SetPage(1); $this->Query($force); } - + $this->SelectedCount = count($this->Records); if (!$this->Counted) $this->RecordsCount = $this->SelectedCount; if (!$this->Counted && $this->SelectedCount > $this->PerPage && $this->PerPage != -1) $this->SelectedCount--; @@ -875,7 +875,7 @@ $this->addFilter('parent_filter', '`'.$this->TableName.'`.`'.$foreign_key_field.'` = '.$parent_id); // only for list in this case } } - + /** * Returns true if list was queried (same name as for kDBItem for easy usage) * @@ -885,6 +885,25 @@ { return $this->Queried; } + + /** + * Returns specified field value from all selected rows. + * Don't affect current record index + * + * @param string $field + * @return Array + */ + function GetCol($field) + { + $i = 0; + $ret = Array (); + while ($i < $this->SelectedCount) { + $ret[] = $this->Records[$i][$field]; + $i++; + } + + return $ret; + } } ?> \ No newline at end of file