* Adjust the GetList method of the program module.

This commit is contained in:
leiyong
2020-09-09 10:19:47 +08:00
parent 9362e200b1
commit c7594b8f4a
2 changed files with 4 additions and 3 deletions
+3 -2
View File
@@ -8,10 +8,11 @@ class programModel extends model
* @param varchar $orderBy
* @param object $pager
* @param bool $includeCat
* @param bool $mine
* @access public
* @return array
*/
public function getList($status = 'all', $orderBy = 'id_desc', $pager = NULL, $includeCat = false)
public function getList($status = 'all', $orderBy = 'id_desc', $pager = NULL, $includeCat = false, $mine = false)
{
return $this->dao->select('*')->from(TABLE_PROJECT)
->where('program')->eq(0)
@@ -20,7 +21,7 @@ class programModel extends model
->beginIF(!$includeCat)->andWhere('iscat')->eq(0)->fi()
->beginIF(!$this->app->user->admin)->andWhere('id')->in($this->app->user->view->programs)->fi()
->beginIF($status != 'all')->andWhere('status')->eq($status)->fi()
->beginIF($this->cookie->mine)
->beginIF($this->cookie->mine or $mine)
->andWhere('openedBy', true)->eq($this->app->user->account)
->orWhere('PM')->eq($this->app->user->account)
->markRight(1)