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