mirror of
https://github.com/vrana/adminer.git
synced 2025-08-12 01:24:17 +02:00
Simplify format_time()
This commit is contained in:
@@ -108,8 +108,7 @@ if (!$error && $_POST) {
|
||||
|
||||
do {
|
||||
$result = $connection->store_result();
|
||||
$end = microtime(true);
|
||||
$time = " <span class='time'>(" . format_time($start, $end) . ")</span>"
|
||||
$time = " <span class='time'>(" . format_time($start) . ")</span>"
|
||||
. (strlen($q) < 1000 ? " <a href='" . h(ME) . "sql=" . urlencode(trim($q)) . "'>" . lang('Edit') . "</a>" : "") // 1000 - maximum length of encoded URL in IE is 2083 characters
|
||||
;
|
||||
|
||||
@@ -156,7 +155,7 @@ if (!$error && $_POST) {
|
||||
}
|
||||
}
|
||||
|
||||
$start = $end;
|
||||
$start = microtime(true);
|
||||
} while ($connection->next_result());
|
||||
|
||||
$line += substr_count($q.$found, "\n");
|
||||
@@ -172,7 +171,7 @@ if (!$error && $_POST) {
|
||||
echo "<p class='message'>" . lang('No commands to execute.') . "\n";
|
||||
} elseif ($_POST["only_errors"]) {
|
||||
echo "<p class='message'>" . lang('%d query(s) executed OK.', $commands - count($errors));
|
||||
echo " <span class='time'>(" . format_time($total_start, microtime(true)) . ")</span>\n";
|
||||
echo " <span class='time'>(" . format_time($total_start) . ")</span>\n";
|
||||
} elseif ($errors && $commands > 1) {
|
||||
echo "<p class='error'>" . lang('Error in query') . ": " . implode("", $errors) . "\n";
|
||||
}
|
||||
|
Reference in New Issue
Block a user