protected function afterInsert() { cot_log("Added new banner # {$this->_data['id']} - {$this->_data['title']}", 'adm'); // Обновить структуру $count = brs_model_Banner::count(array(array('category', $this->_data['category']))); static::$_db->update(cot::$db->structure, array('structure_count' => $count), "structure_area='brs' AND structure_code=?", $this->_data['category']); cot::$cache && cot::$cache->db->remove('structure', 'system'); return parent::afterInsert(); }