configs.php 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?php
  2. /**
  3. * The configs entry point of ZenTaoPMS.
  4. *
  5. * @copyright Copyright 2009-2023 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.cnezsoft.com)
  6. * @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
  7. * @author Chunsheng Wang <chunsheng@cnezsoft.com>
  8. * @package entries
  9. * @version 1
  10. * @link https://www.zentao.net
  11. */
  12. class configsEntry extends baseEntry
  13. {
  14. /**
  15. * GET method.
  16. *
  17. * @access public
  18. * @return string
  19. */
  20. public function get()
  21. {
  22. $configs = array();
  23. $this->app->loadConfig('story');
  24. /* System basic configs. */
  25. $configs[] = array('key' => 'language', 'value' => $this->config->default->lang);
  26. $configs[] = array('key' => 'version', 'value' => $this->config->version);
  27. $configs[] = array('key' => 'charset', 'value' => $this->config->charset);
  28. $configs[] = array('key' => 'timezone', 'value' => $this->config->timezone);
  29. $configs[] = array('key' => 'systemMode', 'value' => $this->config->systemMode);
  30. $configs[] = array('key' => 'hourUnit', 'value' => $this->config->hourUnit);
  31. $configs[] = array('key' => 'CRProduct', 'value' => $this->config->CRProduct);
  32. $configs[] = array('key' => 'CRExecution', 'value' => $this->config->CRExecution);
  33. $configs[] = array('key' => 'CRTask', 'value' => $this->config->CRTask);
  34. $configs[] = array('key' => 'edition', 'value' => $this->config->edition);
  35. $configs[] = array('key' => 'vision', 'value' => $this->config->vision);
  36. $configs[] = array('key' => 'storyNeedReview', 'value' => !!$this->config->story->needReview);
  37. return $this->send(200, $configs);
  38. }
  39. }