lite.php 642 B

12345678910111213
  1. <?php
  2. public function getLibIdListByProject($projectID = 0)
  3. {
  4. $executions = $this->loadModel('execution')->getPairs($projectID, 'all', 'noclosed');
  5. $executionLibs = array();
  6. if($executions) $executionLibs = $this->dao->select('id')->from(TABLE_DOCLIB)->where('execution')->in(array_keys($executions))->fetchPairs();
  7. $productLibs = $this->dao->select('id')->from(TABLE_DOCLIB)->where('product')->eq('0')->fetchPairs();
  8. $customLibs = $this->dao->select('id')->from(TABLE_DOCLIB)->where('type')->eq('custom')->fetchPairs();
  9. $libIdList = array_merge($customLibs, $executionLibs, $productLibs);
  10. return $libIdList;
  11. }