Skip to content
Browse files

Add encrypt SQL function (thanks to Dragonn)

git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@1345 7c3ca157-0c34-0410-bff1-cbf682f78f5c
  • Loading branch information...
1 parent 305a055 commit 5df3abb73c7fb0ac7904393122a4ddea17833a51 jakubvrana committed Mar 14, 2010
Showing with 2 additions and 2 deletions.
  1. +2 −2 adminer/include/adminer.inc.php
View
4 adminer/include/adminer.inc.php
@@ -390,7 +390,7 @@ function messageQuery($query) {
function editFunctions($field) {
$return = array("");
if (ereg('char|date|time', $field["type"])) {
- $return = (ereg('char', $field["type"]) ? array("", "md5", "sha1", "password", "uuid") : array("", "now")); //! JavaScript for disabling maxlength
+ $return = (ereg('char', $field["type"]) ? array("", "md5", "sha1", "password", "encrypt", "uuid") : array("", "now")); //! JavaScript for disabling maxlength
}
if (!isset($_GET["call"]) && (isset($_GET["select"]) || where($_GET))) {
// relative functions
@@ -449,7 +449,7 @@ function processInput($field, $value, $function = "") {
$return = idf_escape($name) . " $function " . (preg_match("~^([0-9]+|'[0-9.: -]') [A-Z_]+$~i", $value) ? $value : $return);
} elseif (ereg('^(addtime|subtime|concat)$', $function)) {
$return = "$function(" . idf_escape($name) . ", $return)";
- } elseif (ereg('^(md5|sha1|password)$', $function)) {
+ } elseif (ereg('^(md5|sha1|password|encrypt)$', $function)) {
$return = "$function($return)";
}
return $return;

0 comments on commit 5df3abb

Please sign in to comment.
Something went wrong with that request. Please try again.