Index: branches/5.2.x/core/units/configuration/configuration.php =================================================================== diff -u -r14244 -r14628 --- branches/5.2.x/core/units/configuration/configuration.php (.../configuration.php) (revision 14244) +++ branches/5.2.x/core/units/configuration/configuration.php (.../configuration.php) (revision 14628) @@ -1,6 +1,6 @@ Application->GetVar('section'); - $keys_hash[$this->IDField] = $this->ID; - return parent::GetKeyClause($method, $keys_hash); - } + /** + * Returns part of SQL WHERE clause identifying the record, ex. id = 25 + * + * @param string $method Child class may want to know who called GetKeyClause, Load(), Update(), Delete() send its names as method + * @param Array $keys_hash alternative, then item id, keys hash to load item by + * @see kDBItem::Load() + * @see kDBItem::Update() + * @see kDBItem::Delete() + * + * @return string + * @access protected + */ + protected function GetKeyClause($method = null, $keys_hash = null) + { + $keys_hash['Section'] = $this->Application->GetVar('section'); + $keys_hash[$this->IDField] = $this->GetID(); - /** - * Set's field error, if pseudo passed not found then create it with message text supplied. - * Don't owerrite existing pseudo translation. - * - * @param string $field - * @param string $pseudo - * @param string $error_label - */ - function SetError($field, $pseudo, $error_label = null, $error_params = null) - { - if (!parent::SetError($field, $pseudo, $error_label, $error_params)) { - // this field already has an error -> don't overwrite it - return false; - } + return parent::GetKeyClause($method, $keys_hash); + } - $list_errors = $this->Application->GetVar('errors_' . $this->getPrefixSpecial(), Array ()); - $list_errors[ $this->GetDBField('VariableName') ] = $this->GetErrorMsg($field); - $this->Application->SetVar('errors_' . $this->getPrefixSpecial(), $list_errors); + /** + * Set's field error, if pseudo passed not found then create it with message text supplied. + * Don't overwrite existing pseudo translation. + * + * @param string $field + * @param string $pseudo + * @param string $error_label + * @param Array $error_params + * + * @return bool + * @access public + */ + public function SetError($field, $pseudo, $error_label = null, $error_params = null) + { + if ( !parent::SetError($field, $pseudo, $error_label, $error_params) ) { + // this field already has an error -> don't overwrite it + return false; } - } \ No newline at end of file + $list_errors = $this->Application->GetVar('errors_' . $this->getPrefixSpecial(), Array ()); + $list_errors[ $this->GetDBField('VariableName') ] = $this->GetErrorMsg($field); + $this->Application->SetVar('errors_' . $this->getPrefixSpecial(), $list_errors); + + return true; + } +} \ No newline at end of file