diff --git a/ChangeLog b/ChangeLog index 305070090b..8b320aabaf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -6,6 +6,7 @@ phpMyAdmin - ChangeLog - bug #4250 Notice on export page - bug #4253 "New" text in navigation frame acts like a database - bug #4262 Cannot define a column with fractional seconds +- bug #4265 Missing datepicker icon for DATETIME(length) 4.1.6.0 (2014-01-26) - bug #4232 User not found after creating the user diff --git a/libraries/insert_edit.lib.php b/libraries/insert_edit.lib.php index 1d3e394260..01b6681db2 100644 --- a/libraries/insert_edit.lib.php +++ b/libraries/insert_edit.lib.php @@ -1184,10 +1184,11 @@ function PMA_getHTMLinput($column, $column_name_appendix, $special_chars, // do not use the 'date' or 'time' types here; they have no effect on some // browsers and create side effects (see bug #4218) $the_class = 'textfield'; - if ($column['pma_type'] === 'date') { + // verify True_Type which does not contain the parentheses and length + if ($column['True_Type'] === 'date') { $the_class .= ' datefield'; - } elseif ($column['pma_type'] === 'datetime' - || substr($column['pma_type'], 0, 9) === 'timestamp' + } elseif ($column['True_Type'] === 'datetime' + || $column['True_Type'] === 'timestamp' ) { $the_class .= ' datetimefield'; } diff --git a/test/libraries/PMA_insert_edit_test.php b/test/libraries/PMA_insert_edit_test.php index 2a27bfb9ae..287a6a9934 100644 --- a/test/libraries/PMA_insert_edit_test.php +++ b/test/libraries/PMA_insert_edit_test.php @@ -1344,7 +1344,7 @@ class PMA_InsertEditTest extends PHPUnit_Framework_TestCase $column['is_char'] = false; $column['Extra'] = 'auto_increment'; $column['pma_type'] = 'timestamp'; - $column['True_Type'] = 'bit'; + $column['True_Type'] = 'timestamp'; $result = PMA_getValueColumnForOtherDatatypes( $column, 'defchar', 'a', 'b', 'c', 22, '<', 12, 1, "/", "<", "foo\nbar", $extracted_columnspec @@ -1355,8 +1355,7 @@ class PMA_InsertEditTest extends PHPUnit_Framework_TestCase . '', + . '="fields_typeb" value="timestamp" />', $result );