| @@ 724-738 (lines=15) @@ | ||
| 721 | case XOBJ_DTYPE_DATE: |
|
| 722 | $cleanv = !is_string($cleanv) && is_numeric($cleanv) ? date(_DBDATESTRING, $cleanv) : date(_DBDATESTRING, strtotime($cleanv)); |
|
| 723 | break; |
|
| 724 | case XOBJ_DTYPE_TXTBOX: |
|
| 725 | if ($v['required'] && $cleanv != '0' && $cleanv == '') { |
|
| 726 | $this->setErrors(sprintf(_XOBJ_ERR_REQUIRED, $k)); |
|
| 727 | continue 2; |
|
| 728 | } |
|
| 729 | if (isset($v['maxlength']) && strlen($cleanv) > (int)($v['maxlength'])) { |
|
| 730 | $this->setErrors(sprintf(_XOBJ_ERR_SHORTERTHAN, $k, (int)($v['maxlength']))); |
|
| 731 | continue 2; |
|
| 732 | } |
|
| 733 | if (!$v['not_gpc']) { |
|
| 734 | $cleanv = $ts->stripSlashesGPC($ts->censorString($cleanv)); |
|
| 735 | } else { |
|
| 736 | $cleanv = $ts->censorString($cleanv); |
|
| 737 | } |
|
| 738 | break; |
|
| 739 | case XOBJ_DTYPE_TXTAREA: |
|
| 740 | if ($v['required'] && $cleanv != '0' && $cleanv == '') { |
|
| 741 | $this->setErrors(sprintf(_XOBJ_ERR_REQUIRED, $k)); |
|
| @@ 805-820 (lines=16) @@ | ||
| 802 | continue 2; |
|
| 803 | } |
|
| 804 | break; |
|
| 805 | case XOBJ_DTYPE_UNICODE_TXTBOX: |
|
| 806 | if ($v['required'] && $cleanv != '0' && $cleanv == '') { |
|
| 807 | $this->setErrors(sprintf(_XOBJ_ERR_REQUIRED, $k)); |
|
| 808 | continue 2; |
|
| 809 | } |
|
| 810 | $cleanv = xoops_convert_encode($cleanv); |
|
| 811 | if (isset($v['maxlength']) && strlen($cleanv) > (int)($v['maxlength'])) { |
|
| 812 | $this->setErrors(sprintf(_XOBJ_ERR_SHORTERTHAN, $k, (int)($v['maxlength']))); |
|
| 813 | continue 2; |
|
| 814 | } |
|
| 815 | if (!$v['not_gpc']) { |
|
| 816 | $cleanv = $ts->stripSlashesGPC($ts->censorString($cleanv)); |
|
| 817 | } else { |
|
| 818 | $cleanv = $ts->censorString($cleanv); |
|
| 819 | } |
|
| 820 | break; |
|
| 821 | case XOBJ_DTYPE_UNICODE_TXTAREA: |
|
| 822 | if ($v['required'] && $cleanv != '0' && $cleanv == '') { |
|
| 823 | $this->setErrors(sprintf(_XOBJ_ERR_REQUIRED, $k)); |
|