* Fix bug of program list in normal user.

This commit is contained in:
xieqiyu
2022-06-15 10:03:14 +08:00
parent cb360f23fe
commit 770f4f978d
+2 -4
View File
@@ -168,10 +168,8 @@ class programModel extends model
->andWhere('vision')->eq($this->config->vision)
->beginIF($status != 'all')->andWhere('status')->eq($status)->fi()
->beginIF(!$this->cookie->showClosed)->andWhere('status')->ne('closed')->fi()
->beginIF($this->app->rawMethod == 'browse')
->beginIF($type === 'top')->andWhere('parent')->eq(0)->fi()
->beginIF($type === 'child' or !$this->app->user->admin)->andWhere('id')->in($objectIdList)->fi()
->fi()
->beginIF($this->app->rawMethod == 'browse' and $type === 'top')->andWhere('parent')->eq(0)->fi()
->beginIF($this->app->rawMethod == 'browse' and ($type === 'child' or !$this->app->user->admin))->andWhere('id')->in($objectIdList)->fi()
->beginIF(!$this->app->user->admin and $this->app->rawMethod != 'browse')->andWhere('id')->in($userViewIdList)->fi()
->orderBy($orderBy)
->page($pager)