]> git.joonet.de Git - adminer.git/commitdiff
Support MD5 and SHA1 columns
authorjakubvrana <jakubvrana@7c3ca157-0c34-0410-bff1-cbf682f78f5c>
Sat, 19 Sep 2009 19:58:12 +0000 (19:58 +0000)
committerjakubvrana <jakubvrana@7c3ca157-0c34-0410-bff1-cbf682f78f5c>
Sat, 19 Sep 2009 19:58:12 +0000 (19:58 +0000)
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@1117 7c3ca157-0c34-0410-bff1-cbf682f78f5c

editor/example.php
editor/include/adminer.inc.php

index e15807d83c17e19e9d60ae01b30bc234f2449282..b392a77f85b9ce097ad8de38a57b7237f5e2afe6 100644 (file)
@@ -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"]) : "");
                }
                
        }
index c7e4132c16f557c446f7d91e509c3713cbe3d216..0634241d21be18bb8565b45465c251d9b6f2a0a6 100644 (file)
@@ -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;
        }