mirror of
https://github.com/vrana/adminer.git
synced 2025-08-16 19:44:00 +02:00
Add encrypt SQL function (thanks to Dragonn)
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@1345 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
@@ -390,7 +390,7 @@ class Adminer {
|
||||
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 @@ class Adminer {
|
||||
$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;
|
||||
|
Reference in New Issue
Block a user