]> git.joonet.de Git - adminer.git/commitdiff
Highlight and edit SQL command in processlist
authorJakub Vrana <jakub@vrana.cz>
Tue, 19 Oct 2010 14:54:48 +0000 (16:54 +0200)
committerJakub Vrana <jakub@vrana.cz>
Tue, 19 Oct 2010 14:54:48 +0000 (16:54 +0200)
adminer/processlist.inc.php

index 7cde43ce1064daa35e5b21a8a415521c112e4bad..7f773d344e0b9207a4cfd603e8fe6707c297e334 100644 (file)
@@ -19,7 +19,11 @@ foreach (get_rows("SHOW FULL PROCESSLIST") as $i => $row) {
        if (!$i) {
                echo "<thead><tr lang='en'><th>&nbsp;<th>" . implode("<th>", array_keys($row)) . "</thead>\n";
        }
-       echo "<tr" . odd() . "><td>" . checkbox("kill[]", $row["Id"], 0) . "<td>" . implode("<td>", array_map('nbsp', $row)) . "\n";
+       echo "<tr" . odd() . "><td>" . checkbox("kill[]", $row["Id"], 0);
+       foreach ($row as $key => $val) {
+               echo "<td>" . ($key == "Info" ? "<code class='jush-$jush'>" . nbsp($val) . '</code> <a href="' . h(ME . ($row["db"] != "" ? "db=" . urlencode($row["db"]) . "&" : "") . "sql=" . urlencode($val)) . '">' . lang('Edit') . '</a>' : nbsp($val));
+       }
+       echo "\n";
 }
 ?>
 </table>