Bug #19222 » patch-19222.diff
typo3_src-6.2.0alpha2/typo3/sysext/core/Classes/DataHandling/DataHandler.php 2013-10-02 10:25:20.000000000 +0200 | ||
---|---|---|
}
|
||
break;
|
||
case 'double2':
|
||
$value = preg_replace('/[^0-9,\\.-]/', '', $value);
|
||
case 'double3':
|
||
case 'double4':
|
||
case 'double5':
|
||
case 'double6':
|
||
case 'double7':
|
||
case 'double8':
|
||
case 'double9':
|
||
$theDec = 0;
|
||
for ($a = strlen($value); $a > 0; $a--) {
|
||
if (substr($value, $a - 1, 1) == '.' || substr($value, $a - 1, 1) == ',') {
|
||
$theDec = substr($value, $a);
|
||
$value = substr($value, 0, $a - 1);
|
||
break;
|
||
}
|
||
}
|
||
$digits = $func{6};
|
||
$theDec = preg_replace('/[^0-9,\\.-]/', '', $theDec);
|
||
$value = intval(str_replace(' ', '', $value)) . '.' . substr($theDec, 0, $digits);
|
||
$negative = substr($value, 0, 1) == '-';
|
||
$value = strtr($value, array(',' => '.', '-' => ''));
|
||
if (strpos($value, '.') === FALSE) {
|
||
... | ... | |
if ($negative) {
|
||
$value *= -1;
|
||
}
|
||
$value = number_format($value, 2, '.', '');
|
||
$value = number_format($value, $digits, '.', '');
|
||
break;
|
||
case 'md5':
|
||
if (strlen($value) != 32) {
|
- « Previous
- 1
- 2
- 3
- Next »