Permalink
Browse files

bug #4265 Missing datepicker icon for DATETIME(length)

Signed-off-by: Marc Delisle <marc@infomarc.info>
  • Loading branch information...
1 parent 024a2d3 commit 8ee7fc8a9c691a5d384f79a5cc60246569185680 @lem9 lem9 committed Jan 30, 2014
Showing with 7 additions and 6 deletions.
  1. +1 −0 ChangeLog
  2. +4 −3 libraries/insert_edit.lib.php
  3. +2 −3 test/libraries/PMA_insert_edit_test.php
View
@@ -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
@@ -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';
}
@@ -1344,7 +1344,7 @@ public function testGetValueColumnForOtherDatatypes()
$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, '&lt;', 12, 1, "/", "&lt;",
"foo\nbar", $extracted_columnspec
@@ -1355,8 +1355,7 @@ public function testGetValueColumnForOtherDatatypes()
. '<input type="text" name="fieldsb" value="&lt;" size="20" class="text'
. 'field datetimefield" c tabindex="34" id="field_1_3" /><input type='
. '"hidden" name="auto_incrementb" value="1" /><input type="hidden" name'
- . '="fields_typeb" value="timestamp" /><input type="hidden" name="fields'
- . '_typeb" value="bit" />',
+ . '="fields_typeb" value="timestamp" />',
$result
);

0 comments on commit 8ee7fc8

Please sign in to comment.