TIMESTAMP options and addfield
This commit is contained in:
@@ -5,6 +5,9 @@ phpMyAdmin - Changelog
|
|||||||
$Id$
|
$Id$
|
||||||
$Source$
|
$Source$
|
||||||
|
|
||||||
|
2005-04-01 Marc Delisle <lem9@users.sourceforge.net>
|
||||||
|
* tbl_addfield.php: TIMESTAMP options support
|
||||||
|
|
||||||
2005-03-31 Alexander M. Turek <me@derrabus.de>
|
2005-03-31 Alexander M. Turek <me@derrabus.de>
|
||||||
* left.php: Undefined offset (Bug #1174045).
|
* left.php: Undefined offset (Bug #1174045).
|
||||||
|
|
||||||
@@ -15,7 +18,6 @@ $Source$
|
|||||||
* tbl_properties.inc.php: TIMESTAMP default CURRENT_TIMESTAMP checkbox
|
* tbl_properties.inc.php: TIMESTAMP default CURRENT_TIMESTAMP checkbox
|
||||||
made dynamic, depending on the field's type
|
made dynamic, depending on the field's type
|
||||||
* tbl_create.php, libraries/relation.lib.php: TIMESTAMP options support
|
* tbl_create.php, libraries/relation.lib.php: TIMESTAMP options support
|
||||||
TODO: (work in progress) support those options in tbl_addfield
|
|
||||||
|
|
||||||
2005-03-30 Alexander M. Turek <me@derrabus.de>
|
2005-03-30 Alexander M. Turek <me@derrabus.de>
|
||||||
* server_databases.php: Bug #1172782 (Don't allow to drop
|
* server_databases.php: Bug #1172782 (Don't allow to drop
|
||||||
@@ -31,8 +33,7 @@ $Source$
|
|||||||
where still untranslated
|
where still untranslated
|
||||||
* tbl_properties.inc.php: bug #1163595 (problem #5): after an error
|
* tbl_properties.inc.php: bug #1163595 (problem #5): after an error
|
||||||
modifying TIMESTAMP options, the table structure editing form
|
modifying TIMESTAMP options, the table structure editing form
|
||||||
was shown without the new options. Still having an issue with
|
was shown without the new options.
|
||||||
a default value for a TIMESTAMP not generated in the ALTER TABLE.
|
|
||||||
|
|
||||||
2005-03-29 Marc Delisle <lem9@users.sourceforge.net>
|
2005-03-29 Marc Delisle <lem9@users.sourceforge.net>
|
||||||
* libraries/common.lib.php: XSS vulnerability on convcharset
|
* libraries/common.lib.php: XSS vulnerability on convcharset
|
||||||
|
@@ -50,8 +50,13 @@ if (isset($submit_num_fields)) {
|
|||||||
} // end if
|
} // end if
|
||||||
} // end for
|
} // end for
|
||||||
// Builds the field creation statement and alters the table
|
// Builds the field creation statement and alters the table
|
||||||
|
|
||||||
|
// TODO: check to see if this logic is exactly the same
|
||||||
|
// as in tbl_create.php, and move to an include file
|
||||||
|
|
||||||
for ($i = 0; $i < $field_cnt; ++$i) {
|
for ($i = 0; $i < $field_cnt; ++$i) {
|
||||||
if (empty($field_name[$i])) {
|
// '0' is also empty for php :-(
|
||||||
|
if (empty($field_name[$i]) && $field_name[$i] != '0') {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -67,7 +72,10 @@ if (isset($submit_num_fields)) {
|
|||||||
$query .= ' CHARACTER SET ' . $tmp_charset . ' COLLATE ' . $field_collation[$i];
|
$query .= ' CHARACTER SET ' . $tmp_charset . ' COLLATE ' . $field_collation[$i];
|
||||||
unset($tmp_charset);
|
unset($tmp_charset);
|
||||||
}
|
}
|
||||||
if ($field_default[$i] != '') {
|
|
||||||
|
if (isset($field_default_current_timestamp[$i]) && $field_default_current_timestamp[$i]) {
|
||||||
|
$query .= ' DEFAULT CURRENT_TIMESTAMP';
|
||||||
|
} elseif ($field_default[$i] != '') {
|
||||||
if (strtoupper($field_default[$i]) == 'NULL') {
|
if (strtoupper($field_default[$i]) == 'NULL') {
|
||||||
$query .= ' DEFAULT NULL';
|
$query .= ' DEFAULT NULL';
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user