Support MD5 and SHA1 columns

git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@1117 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
jakubvrana 2009-09-19 19:58:12 +00:00
parent 8dc85b551a
commit 4b81c92582
2 changed files with 4 additions and 1 deletions

View file

@ -30,7 +30,7 @@ function adminer_object() {
function fieldName($field, $order = 0) { function fieldName($field, $order = 0) {
// only columns with comments will be displayed and only the first five in select // only columns with comments will be displayed and only the first five in select
return ($order <= 5 ? h($field["comment"]) : ""); return ($order <= 5 && !ereg('_(md5|sha1)$', $field["field"]) ? h($field["comment"]) : "");
} }
} }

View file

@ -300,6 +300,9 @@ ORDER BY ORDINAL_POSITION"); //! requires MySQL 5
if (ereg('date|time', $field["type"])) { if (ereg('date|time', $field["type"])) {
$return[] = "now"; $return[] = "now";
} }
if (ereg('_(md5|sha1)$', $field["field"], $match)) {
$return[] = $match[1];
}
return $return; return $return;
} }