From 770f4f978dd3926e71c384869e676b38f6881ef4 Mon Sep 17 00:00:00 2001 From: xieqiyu Date: Wed, 15 Jun 2022 10:03:14 +0800 Subject: [PATCH] * Fix bug of program list in normal user. --- module/program/model.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/module/program/model.php b/module/program/model.php index 13bf06b7cf..6748fbe90b 100644 --- a/module/program/model.php +++ b/module/program/model.php @@ -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)