Index: branches/5.2.x/core/units/categories/categories_item.php =================================================================== diff -u -N -r14585 -r14628 --- branches/5.2.x/core/units/categories/categories_item.php (.../categories_item.php) (revision 14585) +++ branches/5.2.x/core/units/categories/categories_item.php (.../categories_item.php) (revision 14628) @@ -1,6 +1,6 @@ GetDBField('ParentId') > 0 ? $this->GetDBField('ParentId') : $this->Application->GetVar('m_cat_id'); @@ -52,7 +61,16 @@ } - function Update($id=null, $system_update = false) + /** + * Updates previously loaded record with current item' values + * + * @access public + * @param int $id Primary Key Id to update + * @param bool $system_update + * @return bool + * @access public + */ + public function Update($id = null, $system_update = false) { $this->checkFilename(); $this->generateFilename(); @@ -183,16 +201,23 @@ /** * Generate item's filename based on it's title field value * - * @return string + * @return void + * @access protected */ - function generateFilename() + protected function generateFilename() { - if ( !$this->GetDBField('AutomaticFilename') && $this->GetDBField('Filename') ) return false; + if ( !$this->GetDBField('AutomaticFilename') && $this->GetDBField('Filename') ) { + return ; + } $ml_formatter =& $this->Application->recallObject('kMultiLanguage'); - $name = $this->stripDisallowed( $this->GetDBField( $ml_formatter->LangFieldName('Name', true) ) ); + /* @var $ml_formatter kMultiLanguage */ - if ( $name != $this->GetDBField('Filename') ) $this->SetDBField('Filename', $name); + $name = $this->stripDisallowed( $this->GetDBField($ml_formatter->LangFieldName('Name', true)) ); + + if ( $name != $this->GetDBField('Filename') ) { + $this->SetDBField('Filename', $name); + } } /**