Skip to content

Commit 8748b35

Browse files
author
Till Brehm
committed
Fixed: FS#2669 - ISPConig template generator creates date columns with wrong format
1 parent a86d74a commit 8748b35

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

interface/lib/classes/db_mysql.inc.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -664,6 +664,9 @@ public function mapType($metaType, $typeValue) {
664664
case 'blob':
665665
return 'blob';
666666
break;
667+
case 'date':
668+
return 'date';
669+
break;
667670
}
668671
}
669672

interface/lib/classes/tform_tpl_generator.inc.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -271,9 +271,9 @@ function buildHTML($formDef, $tab) {
271271
$defaultValue = 'NULL';
272272
break;
273273
case 'DATE':
274-
$type = 'int64';
274+
$type = 'date';
275275
$typevalue = '';
276-
$defaultValue = ($field["default"] != '')?$field["default"]:'0';
276+
$defaultValue = ($field["default"] != '')?$field["default"]:'0000-00-00';
277277
break;
278278
}
279279

0 commit comments

Comments
 (0)