Disregard last email. I made one slight change: Code for :
- if setColumnsName called => display only named columns - else display all columns with default name (from SQL query) ../inc/plugin_reports.autoreport.class.php 194-199 < < for ($i = 0; $i < $nbcols; $i++) { < $colname = $DB->field_name($res, $i); < $coltitle = (isset ($this->columns[$colname]) ? $this->columns[$colname] : $colname); < echo displaySearchHeaderItem($output_type, $coltitle, $num); < $colsname[] = $colname; --- C194-216 > // If setColumnsNames was set, show only user specified > columns > // else display all default column titles > if (!empty($this->columns)) { > for ($i = 0; $i < $nbcols; $i++) { > $colname = $DB->field_name($res, $i); > if (isset ($this->columns[$colname])) { > $coltitle = > $this->columns[$colname]; > echo > displaySearchHeaderItem($output_type, $coltitle, $num); > $colsname[] = $colname; > } > else { > // do not display column > } > } > } > // display all columns with default name > else { > for ($i = 0; $i < $nbcols; $i++) { > $colname = $DB->field_name($res, $i); > echo > displaySearchHeaderItem($output_type, $colname, $num); > $colsname[] = $colname; > } > } -----Original Message----- From: Roque, Dan Sent: Monday, June 01, 2009 4:00 PM To: 'Liste de diffusion des developpeurs GLPI' Subject: RE: [Glpi-dev] Patch for Reports Plugin to fix columns Code for : - if setColumnsName called => display only named columns - else display all columns with default name (from SQL query) ../inc/plugin_reports.autoreport.class.php 41 < private $columns = array (); --- c41 > private $columns; 194-199 < < for ($i = 0; $i < $nbcols; $i++) { < $colname = $DB->field_name($res, $i); < $coltitle = (isset ($this->columns[$colname]) ? $this->columns[$colname] : $colname); < echo displaySearchHeaderItem($output_type, $coltitle, $num); < $colsname[] = $colname; --- C194-216 > // If setColumnsNames was set, show only user specified > columns > // else display all default column titles > if (isset ($this->columns)) { > for ($i = 0; $i < $nbcols; $i++) { > $colname = $DB->field_name($res, $i); > if (isset ($this->columns[$colname])) { > $coltitle = > $this->columns[$colname]; > echo > displaySearchHeaderItem($output_type, $coltitle, $num); > $colsname[] = $colname; > } > else { > // do not display column > } > } > } > // display all columns with default name > else { > for ($i = 0; $i < $nbcols; $i++) { > $colname = $DB->field_name($res, $i); > echo > displaySearchHeaderItem($output_type, $colname, $num); > $colsname[] = $colname; > } > } -----Original Message----- From: glpi-dev-boun...@gna.org [mailto:glpi-dev-boun...@gna.org] On Behalf Of Remi Collet Sent: Monday, June 01, 2009 1:37 PM To: Liste de diffusion des developpeurs GLPI Subject: Re: [Glpi-dev] Patch for Reports Plugin to fix columns Le 01/06/2009 18:50, Roque, Dan a écrit : > Patch for ../inc/plugin_reports.autoreport.class.php Thank's for this. In fact we've choose to have all columns displayed, even if no title set. Fixed https://dev.indepnet.net/plugins/changeset/10647 Another feature (allowing to hide column) could be - if setColumnsName called => display only named columns - else display all columns with default name (from SQL query) Walid ? What do you think of this ? Remi. _______________________________________________ Glpi-dev mailing list Glpi-dev@gna.org https://mail.gna.org/listinfo/glpi-dev _______________________________________________ Glpi-dev mailing list Glpi-dev@gna.org https://mail.gna.org/listinfo/glpi-dev