1
0
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:
Jakub Vrana
2013-07-24 16:26:41 -07:00
parent 34349f1482
commit e8c6ef04d2
33 changed files with 705 additions and 705 deletions

View File

@@ -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>&nbsp;" : "");
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>'