Permalink
Browse files

Always call select_val

git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@868 7c3ca157-0c34-0410-bff1-cbf682f78f5c
  • Loading branch information...
jakubvrana
jakubvrana committed Jul 21, 2009
1 parent 08d6257 commit 5911cf177d900273ad40e05401ef47fda2048aa4
Showing with 4 additions and 3 deletions.
  1. +4 −3 adminer/select.inc.php
View
@@ -319,10 +319,12 @@
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 = "<i>NULL</i>";
} elseif (ereg('blob|binary', $fields[$key]["type"]) && !is_utf8($val)) { //! download link may be printed even with is_utf8
- $val = '<a href="' . htmlspecialchars($SELF) . 'download=' . urlencode($_GET["select"]) . '&amp;field=' . urlencode($key) . '&amp;' . $unique_idf . '">' . lang('%d byte(s)', strlen($val)) . '</a>';
+ $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 = "&nbsp;";
@@ -336,7 +338,6 @@
}
// 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 @@
break;
}
}
- $val = adminer_select_val($val, $link);
}
+ $val = adminer_select_val($val, $link);
echo "<td>$val";
}
}

0 comments on commit 5911cf1

Please sign in to comment.