projects
/
webmin.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2ed6f60
)
Show default value when adding a row
author
Jamie Cameron
<jcameron@webmin.com>
Sun, 28 Nov 2010 21:47:22 +0000
(13:47 -0800)
committer
Jamie Cameron
<jcameron@webmin.com>
Sun, 28 Nov 2010 21:47:22 +0000
(13:47 -0800)
mysql/view_table.cgi
patch
|
blob
|
history
diff --git
a/mysql/view_table.cgi
b/mysql/view_table.cgi
index
4f9ea3a
..
5941de6
100755
(executable)
--- a/
mysql/view_table.cgi
+++ b/
mysql/view_table.cgi
@@
-258,7
+258,9
@@
if ($total || $in{'new'}) {
# Add an empty row for inserting
$realrows = scalar(@data);
if ($in{'new'}) {
- push(@data, [ map { undef } @str ]);
+ push(@data, [ map { $_->{'default'} eq 'NULL' ? '' :
+ $_->{'default'} eq 'CURRENT_TIMESTAMP' ? '':
+ $_->{'default'} } @str ]);
$row{$realrows} = 1;
}