zen.php 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. /**
  3. * The zen file of client module of ZenTaoPMS.
  4. *
  5. * @copyright Copyright 2009-2023 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.zentao.net)
  6. * @license ZPL(https://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
  7. * @author Gang Liu <liugang@easycorp.ltd>
  8. * @package client
  9. * @link https://www.zentao.net
  10. */
  11. class clientZen extends client
  12. {
  13. /**
  14. * 检查是否有权限添加或编辑客户端版本。
  15. * Check the permission of add or edit client version.
  16. *
  17. * @access public
  18. * @return void
  19. */
  20. public function checkSafeFile()
  21. {
  22. $statusFile = $this->loadModel('common')->checkSafeFile();
  23. if($statusFile)
  24. {
  25. $statusFile = str_replace('\\', '/', $statusFile);
  26. $error = sprintf($this->lang->noticeOkFile, $statusFile, $statusFile);
  27. if($_POST)
  28. {
  29. $error = str_replace("\n", '', $error);
  30. return $this->send(array('result' => 'fail', 'callback' => "zui.Modal.alert({message: {html: \"{$error}\"}, size: 'sm'})"));
  31. }
  32. $this->view->error = $error;
  33. }
  34. }
  35. }