From c620b2cafbf85ef7c1bd0f1bb8076898be2dbaaa Mon Sep 17 00:00:00 2001 From: Johan Cwiklinski Date: Fri, 27 Oct 2023 11:09:51 +0200 Subject: [PATCH] Remaining direct query calls --- install/update.php | 6 +++--- report/not_queried_recently.php | 2 +- report/ports_date_connections.php | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/install/update.php b/install/update.php index b5abc70c97..8a3a4ef4ac 100644 --- a/install/update.php +++ b/install/update.php @@ -2078,7 +2078,7 @@ function do_profile_migration($migration) GROUP BY `type`,`plugins_id`,`profiles_id` HAVING cnt >1 ORDER BY cnt"; - $result = $DB->query($query); + $result = $DB->doQuery($query); while ($data = $DB->fetchArray($result)) { //DB::delete() not yet supports limit nor order $queryd = "DELETE FROM `glpi_plugin_glpiinventory_profiles` @@ -2087,7 +2087,7 @@ function do_profile_migration($migration) AND `profiles_id`='" . $data['profiles_id'] . "' ORDER BY `id` DESC LIMIT " . ($data['cnt'] - 1) . " "; - $DB->query($queryd); + $DB->doQuery($queryd); } $a_table = []; @@ -7404,7 +7404,7 @@ function changeDisplayPreference($olditemtype, $newitemtype) WHERE (`itemtype` = '" . $newitemtype . "' OR `itemtype` = '" . $olditemtype . "') group by `users_id`, `num`"; - $result = $DB->query($query); + $result = $DB->doQuery($query); while ($data = $DB->fetchArray($result)) { if ($data['cnt'] > 1) { $ids = explode(' ', $data['id']); diff --git a/report/not_queried_recently.php b/report/not_queried_recently.php index 0390d5eac9..0be5445092 100644 --- a/report/not_queried_recently.php +++ b/report/not_queried_recently.php @@ -142,7 +142,7 @@ echo "" . __('Status') . ""; echo ""; -if ($result = $DB->query($query)) { +if ($result = $DB->doQuery($query)) { while ($data = $DB->fetchArray($result)) { echo ""; echo ""; diff --git a/report/ports_date_connections.php b/report/ports_date_connections.php index ee8b88e7d7..f25ad33c58 100644 --- a/report/ports_date_connections.php +++ b/report/ports_date_connections.php @@ -74,7 +74,7 @@ . " WHERE a.id IS NOT NULL AND `glpi_networkports`.`itemtype`='NetworkEquipment'" . " AND a.date_mod" . $date_search . " ORDER BY `glpi_networkports`.`items_id`"; - $result = $DB->query($query); + $result = $DB->doQuery($query); echo ""; echo ""; echo "
";