From 5a2c0646d4046f03b6d6d31e2513ad2f3cafdcb6 Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Fri, 10 Dec 2010 17:54:57 +0100 Subject: [PATCH] Link to EXPLAIN output --- adminer/include/editing.inc.php | 5 +++-- adminer/sql.inc.php | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/adminer/include/editing.inc.php b/adminer/include/editing.inc.php index d4a10e17..d51e5ed6 100644 --- a/adminer/include/editing.inc.php +++ b/adminer/include/editing.inc.php @@ -4,7 +4,7 @@ * @param Min_DB connection to examine indexes * @return null */ -function select($result, $connection2 = null) { +function select($result, $connection2 = null, $href = "") { $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 @@ -41,7 +41,8 @@ function select($result, $connection2 = null) { $blobs[$j] = true; } $types[$j] = $field->type; - echo "name != $orgname ? " title='" . h(($orgtable != "" ? "$orgtable." : "") . $orgname) . "'" : "") . ">" . h($field->name); + $name = h($field->name); + echo "name != $orgname ? " title='" . h(($orgtable != "" ? "$orgtable." : "") . $orgname) . "'" : "") . ">" . ($href ? "$name" : $name); } echo "\n"; } diff --git a/adminer/sql.inc.php b/adminer/sql.inc.php index b5eebb49..299c2cca 100644 --- a/adminer/sql.inc.php +++ b/adminer/sql.inc.php @@ -106,7 +106,7 @@ if (!$error && $_POST) { $id = "explain-$commands"; echo ", EXPLAIN\n"; echo "\n"; } }