1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-21 21:55:43 +02:00

Don't print query in edit

This commit is contained in:
Jakub Vrana
2014-01-10 21:32:07 -08:00
parent dbf5eede9d
commit 2ecff21280
7 changed files with 19 additions and 19 deletions

View File

@@ -170,12 +170,12 @@ ORDER BY ORDINAL_POSITION", null, "") as $row) { //! requires MySQL 5
function selectLink($val, $field) {
}
function selectVal($val, $link, $field) {
function selectVal($val, $link, $field, $original) {
$return = ($val === null ? " " : $val);
$link = h($link);
if (preg_match('~blob|bytea~', $field["type"]) && !is_utf8($val)) {
$return = lang('%d byte(s)', strlen($val));
if (preg_match("~^(GIF|\xFF\xD8\xFF|\x89PNG\x0D\x0A\x1A\x0A)~", $val)) { // GIF|JPG|PNG, getimagetype() works with filename
$return = lang('%d byte(s)', strlen($original));
if (preg_match("~^(GIF|\xFF\xD8\xFF|\x89PNG\x0D\x0A\x1A\x0A)~", $original)) { // GIF|JPG|PNG, getimagetype() works with filename
$return = "<img src='$link' alt='$return'>";
}
}