Index: branches/5.3.x/core/units/helpers/cron_helper.php =================================================================== diff -u -N -r15483 -r15698 --- branches/5.3.x/core/units/helpers/cron_helper.php (.../cron_helper.php) (revision 15483) +++ branches/5.3.x/core/units/helpers/cron_helper.php (.../cron_helper.php) (revision 15698) @@ -202,26 +202,28 @@ */ public function initUnit($prefix, $field_prefix = '') { - $virtual_fields = $this->Application->getUnitOption($prefix, 'VirtualFields', Array ()); + $config = $this->Application->getUnitConfig($prefix); - $virtual_fields[$field_prefix . 'CommonHints'] = Array ( - 'type' => 'string', - 'formatter' => 'kOptionsFormatter', 'options' => $this->getOptions(self::COMMON), - 'default' => '' - ); + $config->addVirtualFields(Array ( + $field_prefix . 'CommonHints' => Array ( + 'type' => 'string', + 'formatter' => 'kOptionsFormatter', 'options' => $this->getOptions(self::COMMON), + 'default' => '' + ), + )); foreach ($this->fieldTypes as $field_type) { $field_name = $this->_getFieldNameByType($field_type, $field_prefix); - $virtual_fields[$field_name] = Array ('type' => 'string', 'max_len' => 30, 'default' => '*'); - $virtual_fields[$field_name . 'Hints'] = Array ( - 'type' => 'string', - 'formatter' => 'kOptionsFormatter', 'options' => $this->getOptions($field_type), - 'default' => '' - ); + $config->addVirtualFields(Array ( + $field_name => Array ('type' => 'string', 'max_len' => 30, 'default' => '*'), + $field_name . 'Hints' => Array ( + 'type' => 'string', + 'formatter' => 'kOptionsFormatter', 'options' => $this->getOptions($field_type), + 'default' => '' + ), + )); } - - $this->Application->setUnitOption($prefix, 'VirtualFields', $virtual_fields); } /**