mirror of
https://github.com/vrana/adminer.git
synced 2025-08-10 08:34:20 +02:00
Replace ereg*() by preg_*()
ereg() triggers deprecated error which is sent to custom error handlers. It is also faster. There are no more deprecated functions except mysql_connect().
This commit is contained in:
@@ -18,7 +18,7 @@ page_header(lang('Process list'), $error);
|
||||
// HTML valid because there is always at least one process
|
||||
$i = -1;
|
||||
foreach (process_list() as $i => $row) {
|
||||
|
||||
|
||||
if (!$i) {
|
||||
echo "<thead><tr lang='en'>" . (support("kill") ? "<th> " : "");
|
||||
foreach ($row as $key => $val) {
|
||||
@@ -26,11 +26,11 @@ foreach (process_list() as $i => $row) {
|
||||
}
|
||||
echo "</thead>\n";
|
||||
}
|
||||
|
||||
|
||||
echo "<tr" . odd() . ">" . (support("kill") ? "<td>" . checkbox("kill[]", $row["Id"], 0) : "");
|
||||
foreach ($row as $key => $val) {
|
||||
echo "<td>" . (
|
||||
($jush == "sql" && $key == "Info" && ereg("Query|Killed", $row["Command"]) && $val != "") ||
|
||||
($jush == "sql" && $key == "Info" && preg_match("~Query|Killed~", $row["Command"]) && $val != "") ||
|
||||
($jush == "pgsql" && $key == "current_query" && $val != "<IDLE>") ||
|
||||
($jush == "oracle" && $key == "sql_text" && $val != "")
|
||||
? "<code class='jush-$jush'>" . shorten_utf8($val, 100, "</code>") . ' <a href="' . h(ME . ($row["db"] != "" ? "db=" . urlencode($row["db"]) . "&" : "") . "sql=" . urlencode($val)) . '">' . lang('Clone') . '</a>'
|
||||
|
Reference in New Issue
Block a user