From 5911cf177d900273ad40e05401ef47fda2048aa4 Mon Sep 17 00:00:00 2001 From: jakubvrana Date: Tue, 21 Jul 2009 16:22:42 +0000 Subject: [PATCH] Always call select_val git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@868 7c3ca157-0c34-0410-bff1-cbf682f78f5c --- adminer/select.inc.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/adminer/select.inc.php b/adminer/select.inc.php index 2cdb91ac..0afcdbad 100644 --- a/adminer/select.inc.php +++ b/adminer/select.inc.php @@ -319,10 +319,12 @@ if (!$columns) { if (strlen($val) && (!isset($email_fields[$key]) || $email_fields[$key])) { $email_fields[$key] = is_email($val); //! filled e-mails may be contained on other pages } + $link = ""; if (!isset($val)) { $val = "NULL"; } elseif (ereg('blob|binary', $fields[$key]["type"]) && !is_utf8($val)) { //! download link may be printed even with is_utf8 - $val = '' . lang('%d byte(s)', strlen($val)) . ''; + $link = htmlspecialchars($SELF . 'download=' . urlencode($_GET["select"]) . '&field=' . urlencode($key) . '&') . $unique_idf; + $val = lang('%d byte(s)', strlen($val)); } else { if (!strlen(trim($val, " \t"))) { $val = " "; @@ -336,7 +338,6 @@ if (!$columns) { } // link related items - $link = ""; foreach ((array) $foreign_keys[$key] as $foreign_key) { if (count($foreign_keys[$key]) == 1 || count($foreign_key["source"]) == 1) { foreach ($foreign_key["source"] as $i => $source) { @@ -346,8 +347,8 @@ if (!$columns) { break; } } - $val = adminer_select_val($val, $link); } + $val = adminer_select_val($val, $link); echo "$val"; } }