From 4b81c92582d1c683f86167f369d78a9a1f7ce7e7 Mon Sep 17 00:00:00 2001 From: jakubvrana Date: Sat, 19 Sep 2009 19:58:12 +0000 Subject: [PATCH] Support MD5 and SHA1 columns git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@1117 7c3ca157-0c34-0410-bff1-cbf682f78f5c --- editor/example.php | 2 +- editor/include/adminer.inc.php | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/editor/example.php b/editor/example.php index e15807d8..b392a77f 100644 --- a/editor/example.php +++ b/editor/example.php @@ -30,7 +30,7 @@ function adminer_object() { function fieldName($field, $order = 0) { // 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"]) : ""); } } diff --git a/editor/include/adminer.inc.php b/editor/include/adminer.inc.php index c7e4132c..0634241d 100644 --- a/editor/include/adminer.inc.php +++ b/editor/include/adminer.inc.php @@ -300,6 +300,9 @@ ORDER BY ORDINAL_POSITION"); //! requires MySQL 5 if (ereg('date|time', $field["type"])) { $return[] = "now"; } + if (ereg('_(md5|sha1)$', $field["field"], $match)) { + $return[] = $match[1]; + } return $return; }