Skip to content

Commit

Permalink
Remaining direct query calls
Browse files Browse the repository at this point in the history
  • Loading branch information
trasher committed Oct 27, 2023
1 parent 3b02169 commit c620b2c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions install/update.php
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand All @@ -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 = [];
Expand Down Expand Up @@ -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']);
Expand Down
2 changes: 1 addition & 1 deletion report/not_queried_recently.php
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@
echo "<th>" . __('Status') . "</th>";
echo "</tr>";

if ($result = $DB->query($query)) {
if ($result = $DB->doQuery($query)) {
while ($data = $DB->fetchArray($result)) {
echo "<tr class='tab_bg_1'>";
echo "<td>";
Expand Down
2 changes: 1 addition & 1 deletion report/ports_date_connections.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 "<table width='950' class='tab_cadre_fixe'>";
echo "<tr class='tab_bg_1'>";
echo "<th>";
Expand Down

0 comments on commit c620b2c

Please sign in to comment.