config.php 1.0 KB

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. /**
  3. * The config file of zin of ZenTaoPMS.
  4. *
  5. * @copyright Copyright 2023 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
  6. * @author Hao Sun <sunhao@easycorp.ltd>
  7. * @package zin
  8. * @version $Id
  9. * @link https://www.zentao.net
  10. */
  11. namespace zin;
  12. function loadConfig()
  13. {
  14. global $app, $config;
  15. if(!isset($config->zin)) $config->zin = new \stdClass();
  16. $config->zin->lang = $app->getClientLang();
  17. $config->zin->wgVer = isset($config->wgVer) ? $config->wgVer : '1';
  18. $config->zin->wgVerMap = isset($config->wgVerMap) ? $config->wgVerMap : array();
  19. $config->zin->zuiPath = isset($config->zuiPath) ? $config->zuiPath : ($app->getWebRoot() . 'js/zui3/');
  20. if(empty($config->zin->allowCommands)) $config->zin->allowCommands = array('zinDebug', 'hookCode');
  21. if($config->vision == 'rnd' && empty($config->noWorkspace) && !isset($config->zin->wgVerMap['visionswitcher']))
  22. {
  23. $config->zin->wgVerMap['visionswitcher'] = '2';
  24. }
  25. }