1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-17 12:00:41 +02:00

Pass start time to selectQuery

This commit is contained in:
Jakub Vrana
2018-02-01 11:54:39 +01:00
parent ebb23a7a88
commit d667f585e0
5 changed files with 8 additions and 8 deletions

View File

@@ -202,12 +202,12 @@ class Adminer {
/** Query printed in select before execution
* @param string query to be executed
* @param string elapsed time
* @param float start time of the query
* @return string
*/
function selectQuery($query, $time) {
function selectQuery($query, $start) {
global $jush, $driver;
$return = "<p><code class='jush-$jush'>" . h(str_replace("\n", " ", $query)) . "</code> <span class='time'>($time)</span>"
$return = "<p><code class='jush-$jush'>" . h(str_replace("\n", " ", $query)) . "</code> <span class='time'>(" . format_time($time) . ")</span>"
. (support("sql") ? " <a href='" . h(ME) . "sql=" . urlencode($query) . "'>" . lang('Edit') . "</a>" : "")
;
$print = "</p>\n"; // required for IE9 inline edit

View File

@@ -37,7 +37,7 @@
$start = microtime(true);
$return = $this->_conn->query($query);
if ($print) {
echo $adminer->selectQuery($query, format_time($start));
echo $adminer->selectQuery($query, $start);
}
return $return;
}