zen.php 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. /**
  3. * The zen file of compile module of ZenTaoPMS.
  4. *
  5. * @copyright Copyright 2009-2024 禅道软件(青岛)有限公司(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 Yanyi Cao <caoyanyi@chandao.com>
  8. * @package compile
  9. * @link https://www.zentao.net
  10. */
  11. class compileZen extends compile
  12. {
  13. /**
  14. * 构造搜索表单数据。
  15. * Build search form data.
  16. *
  17. * @param int $repoID
  18. * @param int $jobID
  19. * @param int $queryID
  20. * @access protected
  21. * @return void
  22. */
  23. protected function buildSearchForm($repoID = 0, $jobID = 0, $queryID = 0)
  24. {
  25. $actionURL = $this->createLink('compile', 'browse', "repoID={$repoID}&jobID={$jobID}&browseType=bySearch&param=myQueryID");
  26. if($repoID || $jobID)
  27. {
  28. unset($this->config->compile->search['fields']['repo']);
  29. unset($this->config->compile->search['params']['repo']);
  30. }
  31. else
  32. {
  33. $this->config->compile->search['params']['repo']['values'] = $this->loadModel('repo')->getRepoPairs('', 0, false);
  34. }
  35. $this->config->compile->search['actionURL'] = $actionURL;
  36. $this->config->compile->search['queryID'] = $queryID;
  37. $this->loadModel('search')->setSearchParams($this->config->compile->search);
  38. }
  39. }