mirror of
https://github.com/vrana/adminer.git
synced 2025-08-18 20:31:19 +02:00
Edit default values directly in table creation
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@993 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
@@ -346,26 +346,24 @@ class Adminer {
|
||||
*/
|
||||
function editFunctions($field) {
|
||||
$return = array("");
|
||||
if (!isset($_GET["default"])) {
|
||||
if (ereg('char|date|time', $field["type"])) {
|
||||
$return = (ereg('char', $field["type"]) ? array("", "md5", "sha1", "password", "uuid") : array("", "now")); //! JavaScript for disabling maxlength
|
||||
if (ereg('char|date|time', $field["type"])) {
|
||||
$return = (ereg('char', $field["type"]) ? array("", "md5", "sha1", "password", "uuid") : array("", "now")); //! JavaScript for disabling maxlength
|
||||
}
|
||||
if (!isset($_GET["call"]) && (isset($_GET["select"]) || where($_GET))) {
|
||||
// relative functions
|
||||
if (ereg('int|float|double|decimal', $field["type"])) {
|
||||
$return = array("", "+", "-");
|
||||
}
|
||||
if (!isset($_GET["call"]) && (isset($_GET["select"]) || where($_GET))) {
|
||||
// relative functions
|
||||
if (ereg('int|float|double|decimal', $field["type"])) {
|
||||
$return = array("", "+", "-");
|
||||
}
|
||||
if (ereg('date', $field["type"])) {
|
||||
$return[] = "+ interval";
|
||||
$return[] = "- interval";
|
||||
}
|
||||
if (ereg('time', $field["type"])) {
|
||||
$return[] = "addtime";
|
||||
$return[] = "subtime";
|
||||
}
|
||||
if (ereg('date', $field["type"])) {
|
||||
$return[] = "+ interval";
|
||||
$return[] = "- interval";
|
||||
}
|
||||
if (ereg('time', $field["type"])) {
|
||||
$return[] = "addtime";
|
||||
$return[] = "subtime";
|
||||
}
|
||||
}
|
||||
if ($field["null"] || isset($_GET["default"])) {
|
||||
if ($field["null"]) {
|
||||
array_unshift($return, "NULL");
|
||||
}
|
||||
return $return;
|
||||
|
Reference in New Issue
Block a user