Skip to content

Commit

Permalink
bug #4265 Missing datepicker icon for DATETIME(length)
Browse files Browse the repository at this point in the history
Signed-off-by: Marc Delisle <marc@infomarc.info>
  • Loading branch information
lem9 committed Jan 30, 2014
1 parent 024a2d3 commit 8ee7fc8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions ChangeLog
Expand Up @@ -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
Expand Down
7 changes: 4 additions & 3 deletions libraries/insert_edit.lib.php
Expand Up @@ -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';
}
Expand Down
5 changes: 2 additions & 3 deletions test/libraries/PMA_insert_edit_test.php
Expand Up @@ -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
Expand All @@ -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
);

Expand Down

0 comments on commit 8ee7fc8

Please sign in to comment.