1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-13 01:54:00 +02:00

Use connection() instead of $connection

This commit is contained in:
Jakub Vrana
2025-03-29 21:16:28 +01:00
parent 168ea5ae6d
commit 712d96b22c
36 changed files with 130 additions and 196 deletions

View File

@@ -127,7 +127,7 @@ if ($_POST && !$error) {
: driver()->update($TABLE, $set, $where_check)
)
);
$affected = $connection->affected_rows;
$affected = connection()->affected_rows;
if (is_object($result)) { // PostgreSQL with RETURNING fills num_rows
$affected += $result->num_rows;
}
@@ -145,7 +145,7 @@ if ($_POST && !$error) {
if (!$result) {
break;
}
$affected += $connection->affected_rows;
$affected += connection()->affected_rows;
}
}
}
@@ -186,7 +186,7 @@ if ($_POST && !$error) {
if (!$result) {
break;
}
$affected += $connection->affected_rows;
$affected += connection()->affected_rows;
}
queries_redirect(remove_from_uri(), lang('%d item(s) have been affected.', $affected), $result);
}