2121
2222 @package reports
2323 @authors Nelly Mahu-Lasson, Remi Collet, Alexandre Delaunay
24- @copyright Copyright (c) 2009-2019 Reports plugin team
24+ @copyright Copyright (c) 2009-2020 Reports plugin team
2525 @license AGPL License 3.0 or (at your option) any later version
2626 http://www.gnu.org/licenses/agpl-3.0-standalone.html
2727 @link https://forge.glpi-project.org/projects/reports
@@ -312,7 +312,7 @@ function execute($options=[]) {
312312 }
313313 }
314314
315- $ nbcols = $ DB ->num_fields ($ res );
315+ $ nbcols = $ DB ->numFields ($ res );
316316 $ nbrows = $ DB ->numrows ($ res );
317317
318318 echo Search::showHeader ($ output_type , $ nbrows , $ nbcols , true );
@@ -322,7 +322,7 @@ function execute($options=[]) {
322322 // fill $sqlcols with default sql query fields so we can validate $columns
323323 $ sqlcols = [];
324324 for ($ i = 0 ; $ i < $ nbcols ; $ i ++) {
325- $ colname = $ DB ->field_name ($ res , $ i );
325+ $ colname = $ DB ->fieldName ($ res , $ i );
326326 $ sqlcols [] = $ colname ;
327327 }
328328 $ colsname = [];
@@ -346,7 +346,7 @@ function execute($options=[]) {
346346 echo Search::showEndLine ($ output_type );
347347
348348 $ prev = "" ;
349- for ($ row_num = 2 ; $ row = $ DB ->fetch_assoc ($ res ); $ row_num ++) {
349+ for ($ row_num = 2 ; $ row = $ DB ->fetchAssoc ($ res ); $ row_num ++) {
350350 $ crt = "" ;
351351 foreach ($ this ->group_by as $ colname ) {
352352 if (isset ($ row [$ colname ])) {
0 commit comments