Index: branches/5.1.x/core/units/configuration/configuration_tag_processor.php =================================================================== diff -u -N -r12127 -r12657 --- branches/5.1.x/core/units/configuration/configuration_tag_processor.php (.../configuration_tag_processor.php) (revision 12127) +++ branches/5.1.x/core/units/configuration/configuration_tag_processor.php (.../configuration_tag_processor.php) (revision 12657) @@ -1,6 +1,6 @@ SetDBField('VariableValue', $field_values[$list->GetDBField('VariableName')]['VariableValue']); + $list->SetDBField('VariableValue', $field_values[$list->GetID()]['VariableValue']); } $list->SetDBField('DirectOptions', ''); @@ -135,22 +137,27 @@ return $this->Application->ConfigValue($params['name']); } + function IsRequired($params) + { + $object =& $this->getObject($params);; + /* @var $object kDBList */ + + $field_options = $object->GetDBField('Validation'); + $field_options = $field_options ? unserialize($field_options) : Array (); + + return array_key_exists('required', $field_options) && $field_options['required']; + } + function Error($params) { - $object =& $this->Application->recallObject( $this->getPrefixSpecial() ); + $object =& $this->getObject($params); + /* @var $object kDBList */ + $field = $object->GetDBField($params['id_field']); - $errors = $this->Application->GetVar('errormsgs'); - $errors = $errors[$this->getPrefixSpecial()]; + $errors = $this->Application->GetVar('errors_' . $this->getPrefixSpecial(), Array ()); - if (isset($errors[$field])) { - $msg = $this->Application->Phrase($errors[$field]); - } - else { - $msg = ''; - } - - return $msg; + return array_key_exists($field, $errors) ? $errors[$field] : ''; } /** @@ -239,6 +246,4 @@ return is_writable($this->ConfigValue($params)); } -} - -?> \ No newline at end of file +} \ No newline at end of file