X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=includes%2Fdb_pager.inc;h=c407675dedfb1f97142afe389a8c50cbd51b3740;hb=cb667e6d69ccd818ca1a10cff8a21a41dc3b4af5;hp=474fed7a1327d4726702f613cc5843caddbc4ff8;hpb=9df58442c6ce1d77040dbf778a031cf97cf45d3e;p=fa-stable.git diff --git a/includes/db_pager.inc b/includes/db_pager.inc index 474fed7a..c407675d 100644 --- a/includes/db_pager.inc +++ b/includes/db_pager.inc @@ -145,7 +145,7 @@ class db_pager { // add result field names to column defs for // col value retrieve and sort purposes for ($c = $i = 0; $c < count($this->columns); $c++) { - if ($this->columns[$c]['type'] != 'insert') + if (!(isset($this->columns[$c]['insert']) && $this->columns[$c]['insert'])) $this->columns[$c]['name']= mysql_field_name($result, $i++); } @@ -330,16 +330,15 @@ class db_pager { // $sql - base sql for data inquiry. Order of fields implies // pager columns order. // $coldef - array of column definitions. Example definitions -// Text column with title 'User name': +// Column with title 'User name' and default text format: // 'User name' // Skipped field from sql query. Data for the field is not displayed: // 'dummy' => 'skip' -// Column without title, formated with function func(). Field value -// is passed as parameter: -// array('type'=>'spec', 'fun'=>'func') -// Inserted column with title 'Some', formated with function rowfun(). Row -// values are passed as parameter array: -// 'Some' => array('type'=>'insert', 'fun'=>'rowfun') +// Column without title, data retrieved form row data with function func(): +// array('fun'=>'func') +// Inserted column with title 'Some', formated with function rowfun(). +// formated as date: +// 'Some' => array('type'=>'date, 'insert'=>true, 'fun'=>'rowfun') // Column with name 'Another', formatted as date, // sortable with ascending start order (available orders: asc,desc, ''). // 'Another' => array('type'=>'date', 'ord'=>'asc')