This commit is contained in:
mayue
2021-11-17 16:54:16 +08:00
parent 1161128163
commit 9979876a0d
2 changed files with 5 additions and 4 deletions
+2 -1
View File
@@ -647,7 +647,7 @@ class projectModel extends model
* @access public
* @return array
*/
public function getPairsByModel($model = 'all', $programID = 0)
public function getPairsByModel($model = 'all', $programID = 0, $param = '')
{
if(defined('TUTORIAL')) return $this->loadModel('tutorial')->getProjectPairs();
@@ -655,6 +655,7 @@ class projectModel extends model
->where('type')->eq('project')
->beginIF($programID)->andWhere('parent')->eq($programID)->fi()
->beginIF($model != 'all')->andWhere('model')->eq($model)->fi()
->beginIF(strpos($param, 'noclosed') !== false)->andWhere('status')->ne('closed')->fi()
->andWhere('deleted')->eq('0')
->beginIF(!$this->app->user->admin)->andWhere('id')->in($this->app->user->view->projects)->fi()
->orderBy('id_desc')