|
@@ 508-514 (lines=7) @@
|
| 505 |
|
debug_write_log(DEBUG_DUMP, '[field_validate_date] $def_value = ' . $def_value); |
| 506 |
|
|
| 507 |
|
// Check that field name and specified values are not empty. |
| 508 |
|
if (ustrlen($field_name) == 0 || |
| 509 |
|
ustrlen($min_value) == 0 || |
| 510 |
|
ustrlen($max_value) == 0) |
| 511 |
|
{ |
| 512 |
|
debug_write_log(DEBUG_NOTICE, '[field_validate_date] At least one required field is empty.'); |
| 513 |
|
return ERROR_INCOMPLETE_FORM; |
| 514 |
|
} |
| 515 |
|
|
| 516 |
|
// Check that specified values are integer. |
| 517 |
|
if (!is_intvalue($min_value) || |
|
@@ 577-583 (lines=7) @@
|
| 574 |
|
debug_write_log(DEBUG_DUMP, '[field_validate_duration] $def_value = ' . $def_value); |
| 575 |
|
|
| 576 |
|
// Check that field name and specified values are not empty. |
| 577 |
|
if (ustrlen($field_name) == 0 || |
| 578 |
|
ustrlen($min_value) == 0 || |
| 579 |
|
ustrlen($max_value) == 0) |
| 580 |
|
{ |
| 581 |
|
debug_write_log(DEBUG_NOTICE, '[field_validate_duration] At least one required field is empty.'); |
| 582 |
|
return ERROR_INCOMPLETE_FORM; |
| 583 |
|
} |
| 584 |
|
|
| 585 |
|
// Convert specified minimum and maximum duration values to amount of minutes. |
| 586 |
|
$min_duration = ustr2time($min_value); |