* @package client * @link https://www.zentao.net */ class client extends control { /** * 编辑一个客户端版本。 * Edit a client version. * * @param int $clientID * @access public * @return void */ public function edit($clientID) { $this->checkSafeFile(); if($_POST) { $this->post->set('desc', mb_substr($this->post->desc, 0, 100)); $this->client->update($clientID); if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError())); return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'closeModal' => true, 'load' => true)); } $this->view->title = $this->lang->client->edit; $this->view->client = $this->client->getByID($clientID); $this->display(); } }