delete.php 934 B

123456789101112131415161718192021222324252627
  1. <?php
  2. /**
  3. * The delete control file of client module of ZenTaoPMS.
  4. * @copyright Copyright 2009-2023 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.zentao.net)
  5. * @license ZPL(https://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
  6. * @author Gang Liu <liugang@easycorp.ltd>
  7. * @package client
  8. * @link https://www.zentao.net
  9. */
  10. class client extends control
  11. {
  12. /**
  13. * 删除一个客户端版本。
  14. * Delete a client version.
  15. *
  16. * @param int $clientID
  17. * @access public
  18. * @return void
  19. */
  20. public function delete($clientID)
  21. {
  22. $this->dao->delete()->from(TABLE_IM_CLIENT)->where('id')->eq($clientID)->exec();
  23. if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError()));
  24. return $this->send(array('result' => 'success', 'load' => true));
  25. }
  26. }