Index: branches/5.2.x/core/kernel/db/dbitem.php =================================================================== diff -u -r16643 -r16709 --- branches/5.2.x/core/kernel/db/dbitem.php (.../dbitem.php) (revision 16643) +++ branches/5.2.x/core/kernel/db/dbitem.php (.../dbitem.php) (revision 16709) @@ -1,6 +1,6 @@ GetFieldOption($field_name, 'formatter'); if ( $formatter ) { - /** @var kFormatter $formatter */ - $formatter = $this->Application->recallObject($formatter); + $formatter = $this->getFormatter($formatter); if ( $formatter instanceof kMultiLanguage && strpos((string)$format, 'no_default') === false ) { $format = rtrim('no_default;' . $format, ';'); @@ -187,13 +186,15 @@ $parsed = NULL; } - // kFormatter is always used, to make sure, that numeric value is converted to normal representation - // according to regional format, even when formatter is not set (try seting format to 1.234,56 to understand why) - /** @var kFormatter $formatter */ - $formatter = $this->Application->recallObject(isset($options['formatter']) ? $options['formatter'] : 'kFormatter'); + /* + * kFormatter is always used, to make sure, that numeric value is converted to normal representation + * according to regional format, even when formatter is not set (try setting format to 1.234,56 to + * understand why). + */ + $parsed = $this + ->getFormatter(isset($options['formatter']) ? $options['formatter'] : 'kFormatter') + ->Parse($value, $name, $this); - $parsed = $formatter->Parse($value, $name, $this); - $this->SetDBField($name,$parsed); } @@ -543,10 +544,9 @@ foreach ($this->Fields as $field => $options) { if ( isset($options['formatter']) ) { - /** @var kFormatter $formatter */ - $formatter = $this->Application->recallObject($options['formatter']); - - $formatter->UpdateMasterFields($field, $this->GetDBField($field), $options, $this); + $this + ->getFormatter($options['formatter']) + ->UpdateMasterFields($field, $this->GetDBField($field), $options, $this); } } } @@ -1565,7 +1565,7 @@ $cdata->SetDBField('ResourceId', $resource_id); /** @var kMultiLanguage $ml_formatter */ - $ml_formatter = $this->Application->recallObject('kMultiLanguage'); + $ml_formatter = $this->getFormatter('kMultiLanguage'); /** @var kMultiLanguageHelper $ml_helper */ $ml_helper = $this->Application->recallObject('kMultiLanguageHelper');