@@ -41,14 +41,14 @@ static function getTypeName($nb=0) {
4141 return _n ('Dataflow ' , 'Dataflows ' , $ nb , 'dataflows ' );
4242 }
4343
44- public static function canCreate () {
44+ /* public static function canCreate(): bool {
4545 return Session::haveRight(static::$rightname, UPDATE);
4646 }
4747
48- public static function canView () {
48+ public static function canView(): bool {
4949 return Session::haveRight(static::$rightname, READ);
5050 }
51-
51+ */
5252 function getTabNameForItem (CommonGLPI $ item , $ withtemplate =0 ) {
5353
5454 if ($ item ->getType ()=='Supplier ' ) {
@@ -107,7 +107,7 @@ function rawSearchOptions() {
107107
108108 $ linktable = [];
109109 $ tablequery = "SELECT * FROM `glpi_plugin_dataflows_configdflinks` " ;
110- $ tableresult = $ DB ->query ($ tablequery );
110+ $ tableresult = $ DB ->doQuery ($ tablequery );
111111 while ($ tabledata = $ DB ->fetchAssoc ($ tableresult )) {
112112 $ linktable [$ tabledata ['id ' ]]['name ' ] = $ tabledata ['name ' ];
113113 $ linktable [$ tabledata ['id ' ]]['has_dropdown ' ] = $ tabledata ['has_dropdown ' ];
@@ -116,7 +116,7 @@ function rawSearchOptions() {
116116
117117 $ datatypetable = [];
118118 $ datatypequery = "SELECT * FROM `glpi_plugin_dataflows_configdfdatatypes` " ;
119- $ datatyperesult = $ DB ->query ($ datatypequery );
119+ $ datatyperesult = $ DB ->doQuery ($ datatypequery );
120120 while ($ datatypedata = $ DB ->fetchAssoc ($ datatyperesult )) {
121121 $ datatypetable [$ datatypedata ['id ' ]]['name ' ] = $ datatypedata ['name ' ];
122122 }
@@ -125,7 +125,7 @@ function rawSearchOptions() {
125125 FROM `glpi_plugin_dataflows_configdfs`
126126 WHERE `is_deleted` = 0
127127 ORDER BY `id` " ;
128- $ fieldresult = $ DB ->query ($ fieldquery );
128+ $ fieldresult = $ DB ->doQuery ($ fieldquery );
129129 $ rowcount = $ DB ->numrows ($ fieldresult );
130130 $ tabid = 1 ; // tabid 1 is used for name
131131 $ tabtable = $ this ->getTable ();
@@ -304,7 +304,7 @@ function showForm ($ID, $options=[]) {
304304 $ columnquery = "SELECT *
305305 FROM `glpi_plugin_dataflows_configdfs`
306306 WHERE `is_deleted` = 0 AND `plugin_dataflows_configdfhaligns_id` in (3,4,5) " ;
307- $ columnresult = $ DB ->query ($ columnquery );
307+ $ columnresult = $ DB ->doQuery ($ columnquery );
308308 $ rowcount = $ DB ->numrows ($ columnresult );
309309 if ($ rowcount == 0 ) {
310310 $ columncount = 4 ;
@@ -333,7 +333,7 @@ function showForm ($ID, $options=[]) {
333333
334334 $ linktable = [];
335335 $ tablequery = "SELECT * FROM `glpi_plugin_dataflows_configdflinks` " ;
336- $ tableresult = $ DB ->query ($ tablequery );
336+ $ tableresult = $ DB ->doQuery ($ tablequery );
337337 while ($ tabledata = $ DB ->fetchAssoc ($ tableresult )) {
338338 $ linktable [$ tabledata ['id ' ]]['name ' ] = $ tabledata ['name ' ];
339339 $ linktable [$ tabledata ['id ' ]]['has_dropdown ' ] = $ tabledata ['has_dropdown ' ];
@@ -344,7 +344,7 @@ function showForm ($ID, $options=[]) {
344344 FROM `glpi_plugin_dataflows_configdfs`
345345 WHERE `is_deleted` = 0 AND `plugin_dataflows_configdffieldgroups_id` = 0
346346 ORDER BY `row`, `plugin_dataflows_configdfhaligns_id` " ;
347- $ fieldresult = $ DB ->query ($ fieldquery );
347+ $ fieldresult = $ DB ->doQuery ($ fieldquery );
348348 $ rowcount = $ DB ->numrows ($ fieldresult );
349349 if ($ rowcount > 0 ) {
350350 $ fgroupname = '' ;
@@ -453,7 +453,7 @@ function showForm ($ID, $options=[]) {
453453 $ fgroupquery = "SELECT *
454454 FROM `glpi_plugin_dataflows_configdffieldgroups`
455455 ORDER BY `sortorder` " ;
456- $ fgroupresult = $ DB ->query ($ fgroupquery );
456+ $ fgroupresult = $ DB ->doQuery ($ fgroupquery );
457457
458458 while ($ fgroupdata = $ DB ->fetchAssoc ($ fgroupresult )) {
459459 $ fgroupid = $ fgroupdata ['id ' ];
@@ -465,7 +465,7 @@ function showForm ($ID, $options=[]) {
465465 FROM `glpi_plugin_dataflows_configdfs`
466466 WHERE `is_deleted` = 0 AND `plugin_dataflows_configdffieldgroups_id` = $ fgroupid
467467 ORDER BY `row`, `plugin_dataflows_configdfhaligns_id` " ;
468- $ fieldresult = $ DB ->query ($ fieldquery );
468+ $ fieldresult = $ DB ->doQuery ($ fieldquery );
469469 $ rowcount = $ DB ->numrows ($ fieldresult );
470470 if ($ rowcount > 0 ) {
471471 // Accordion separator
@@ -700,7 +700,7 @@ static function dropdownDataflow($options=[]) {
700700 FROM `glpi_plugin_dataflows_dataflows`
701701 $ where)
702702 ORDER BY `name` " ;
703- $ result = $ DB ->query ($ query );
703+ $ result = $ DB ->doQuery ($ query );
704704
705705 $ values = [0 => Dropdown::EMPTY_VALUE ];
706706
@@ -793,7 +793,7 @@ function showPluginFromSupplier($ID,$withtemplate='') {
793793 . getEntitiesRestrictRequest (" AND " ,"glpi_plugin_dataflows_dataflows " ,'' ,'' ,$ this ->maybeRecursive ());
794794 $ query .= " ORDER BY `glpi_plugin_dataflows_dataflows`.`name` " ;
795795
796- $ result = $ DB ->query ($ query );
796+ $ result = $ DB ->doQuery ($ query );
797797 $ number = $ DB ->numrows ($ result );
798798
799799 if (Session::isMultiEntitiesMode ()) {
0 commit comments