From a691bcbf15790361c035cf3d51135000ee6660e1 Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Fri, 28 Mar 2025 12:08:24 +0100 Subject: [PATCH] Rename function with the same name as Driver::select --- adminer/call.inc.php | 4 ++-- adminer/drivers/mysql.inc.php | 2 +- adminer/include/editing.inc.php | 2 +- adminer/sql.inc.php | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/adminer/call.inc.php b/adminer/call.inc.php index be3a7571..36c9e333 100644 --- a/adminer/call.inc.php +++ b/adminer/call.inc.php @@ -49,7 +49,7 @@ if (!$error && $_POST) { do { $result = $connection->store_result(); if (is_object($result)) { - select($result, $connection2); + print_select_result($result, $connection2); } else { echo "

" . lang('Routine has been called, %d row(s) affected.', $affected) . " " . @date("H:i:s") . "\n" // @ - time zone may be not set @@ -58,7 +58,7 @@ if (!$error && $_POST) { } while ($connection->next_result()); if ($out) { - select($connection->query("SELECT " . implode(", ", $out))); + print_select_result($connection->query("SELECT " . implode(", ", $out))); } } } diff --git a/adminer/drivers/mysql.inc.php b/adminer/drivers/mysql.inc.php index a55bab44..b0c8ca5a 100644 --- a/adminer/drivers/mysql.inc.php +++ b/adminer/drivers/mysql.inc.php @@ -315,7 +315,7 @@ if (!defined('Adminer\DRIVER')) { $result = $this->conn->query("SHOW WARNINGS"); if ($result && $result->num_rows) { ob_start(); - select($result); // select() usually needs to print a big table progressively + print_select_result($result); // print_select_result() usually needs to print a big table progressively return ob_get_clean(); } } diff --git a/adminer/include/editing.inc.php b/adminer/include/editing.inc.php index 59338d2b..626174c7 100644 --- a/adminer/include/editing.inc.php +++ b/adminer/include/editing.inc.php @@ -10,7 +10,7 @@ namespace Adminer; * @param int|numeric-string $limit * @return string[] $orgtables */ -function select($result, Db $connection2 = null, array $orgtables = array(), $limit = 0): array { +function print_select_result($result, Db $connection2 = null, array $orgtables = array(), $limit = 0): array { $links = array(); // colno => orgtable - create links from these columns $indexes = array(); // orgtable => array(column => colno) - primary keys $columns = array(); // orgtable => array(column => ) - not selected columns in primary key diff --git a/adminer/sql.inc.php b/adminer/sql.inc.php index fe034a32..25dd0ce4 100644 --- a/adminer/sql.inc.php +++ b/adminer/sql.inc.php @@ -156,7 +156,7 @@ if (!$error && $_POST) { $explain_id = "explain-$commands"; if (is_object($result)) { $limit = $_POST["limit"]; - $orgtables = select($result, $connection2, array(), $limit); + $orgtables = print_select_result($result, $connection2, array(), $limit); if (!$_POST["only_errors"]) { echo "

\n"; $num_rows = $result->num_rows; @@ -188,7 +188,7 @@ if (!$error && $_POST) { echo ($warnings ? "\n" : ""); if ($explain) { echo "\n"; } }