예제 #1
0
 /**
  * 更新模型
  */
 public function action()
 {
     $model = \Model\Model::findModel($_POST['model_id']);
     $result = \Model\Model::updateModel();
     if ($result['status'] == false) {
         $this->error($result['mes']);
     }
     //更新菜单
     $this->db('menu')->where('menu_name = :old_name')->update(array('menu_name' => $this->p('display_name'), 'noset' => array('old_name' => $model['lang_key'])));
     $this->success($GLOBALS['_LANG']['MODEL']['UPDATE_MODEL_SUCCESS'], $this->url('Team-Model-index'));
 }