1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-12 01:24:17 +02:00

Display images in Editor

git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@898 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
jakubvrana
2009-07-24 10:14:36 +00:00
parent 78e49f0106
commit 97b8c7b666
3 changed files with 15 additions and 8 deletions

View File

@@ -319,13 +319,13 @@ if (!$columns) {
$link = "";
if (!isset($val)) {
$val = "<i>NULL</i>";
} elseif (ereg('blob|binary', $fields[$key]["type"]) && !is_utf8($val)) { //! download link may be printed even with is_utf8
$link = htmlspecialchars($SELF . 'download=' . urlencode($_GET["select"]) . '&field=' . urlencode($key) . '&') . $unique_idf;
$val = lang('%d byte(s)', strlen($val));
} else {
if (ereg('blob|binary', $fields[$key]["type"]) && strlen($val)) {
$link = htmlspecialchars($SELF . 'download=' . urlencode($_GET["select"]) . '&field=' . urlencode($key) . '&') . $unique_idf;
}
if (!strlen(trim($val, " \t"))) {
$val = "&nbsp;";
} elseif (strlen($text_length) && ereg('blob|text', $fields[$key]["type"])) {
} elseif (strlen($text_length) && ereg('blob|text', $fields[$key]["type"]) && is_utf8($val)) {
$val = nl2br(shorten_utf8($val, max(0, intval($text_length)))); // usage of LEFT() would reduce traffic but complicate query
} else {
$val = nl2br(htmlspecialchars($val));