Bug fixes for emptynull type in ArrayIO, Form\Generate interval
Form\Generate for intervals also allows day(s), month(s), year(s), call case insensitive ArrayIO fix for missing escale literal for date/datetime/interval/emptynull text type
This commit is contained in:
@@ -471,7 +471,7 @@ class ArrayIO extends \CoreLibs\DB\IO
|
|||||||
) {
|
) {
|
||||||
$_value = 'NULL';
|
$_value = 'NULL';
|
||||||
} elseif (isset($this->table_array[$column]['value'])) {
|
} elseif (isset($this->table_array[$column]['value'])) {
|
||||||
$_value = $this->table_array[$column]['value'];
|
$_value = $this->dbEscapeLiteral($this->table_array[$column]['value']);
|
||||||
} else {
|
} else {
|
||||||
// fallback
|
// fallback
|
||||||
$_value = 'NULL';
|
$_value = 'NULL';
|
||||||
|
|||||||
@@ -1198,7 +1198,12 @@ class Generate extends \CoreLibs\DB\Extended\ArrayIO
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'intervalshort': // ony interval n [Y/M/D] only
|
case 'intervalshort': // ony interval n [Y/M/D] only
|
||||||
if (preg_match("/^\d{1,3}\ ?[YMDymd]{1}$/", $this->table_array[$key]['value'])) {
|
if (
|
||||||
|
!preg_match(
|
||||||
|
"/^\d{1,3}\ ?([ymd]{1}|day(s)?|year(s)?|month(s)?)$/i",
|
||||||
|
$this->table_array[$key]['value']
|
||||||
|
)
|
||||||
|
) {
|
||||||
$this->msg .= sprintf(
|
$this->msg .= sprintf(
|
||||||
$this->l->__(
|
$this->l->__(
|
||||||
'Please enter a valid time interval in the format '
|
'Please enter a valid time interval in the format '
|
||||||
|
|||||||
Reference in New Issue
Block a user