protected function afterUpdate() { global $structure; cot_log("Edited banner # {$this->_data['id']} - {$this->_data['title']}", 'adm'); // Обновить структуру, если она изменилась if (!empty($this->_oldData['category'])) { $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']); if (!empty($structure['brs'][$this->_oldData['category']])) { $count = brs_model_Banner::count(array(array('category', $this->_oldData['category']))); static::$_db->update(cot::$db->structure, array('structure_count' => $count), "structure_area='brs' AND structure_code = ?", $this->_oldData['category']); } cot::$cache && cot::$cache->db->remove('structure', 'system'); } return parent::afterUpdate(); }