From 376de6d82487307980e6f3e495fac409d511cb8c Mon Sep 17 00:00:00 2001 From: zhouxin Date: Tue, 29 Mar 2022 04:28:39 +0000 Subject: [PATCH] * Fix bug #16707. --- module/program/control.php | 2 +- module/user/model.php | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/module/program/control.php b/module/program/control.php index f19a9b96f9..cd7e6c2adf 100644 --- a/module/program/control.php +++ b/module/program/control.php @@ -60,7 +60,7 @@ class program extends control $this->view->orderBy = $orderBy; $this->view->users = $this->user->getPairs('noletter'); $this->view->userIdPairs = $this->user->getPairs('noletter|showid'); - $this->view->usersAvatar = $this->user->getAvatarPairs(false); + $this->view->usersAvatar = $this->user->getAvatarPairs(''); $this->view->programType = $programType; $this->view->PMList = $PMList; $this->view->progressList = $this->program->getProgressList(); diff --git a/module/user/model.php b/module/user/model.php index 7a0cb82ad0..4f2b5a3dd6 100644 --- a/module/user/model.php +++ b/module/user/model.php @@ -37,11 +37,11 @@ class userModel extends model * @access public * @return void */ - public function getList($undeleted = true) + public function getList($params = 'nodeleted') { return $this->dao->select('*')->from(TABLE_USER) ->where('type')->eq('inside') - ->beginIF($undeleted == true)->andWhere('deleted')->eq(0)->fi() + ->beginIF(strpos($params, 'nodeleted') !== false)->andWhere('deleted')->eq(0)->fi() ->orderBy('account') ->fetchAll(); } @@ -146,10 +146,10 @@ class userModel extends model * @access public * @return array */ - public function getAvatarPairs($undeleted = true) + public function getAvatarPairs($params = 'nodeleted') { $avatarPairs = array(); - $userList = $this->getList($undeleted); + $userList = $this->getList($params); foreach($userList as $user) $avatarPairs[$user->account] = $user->avatar; return $avatarPairs;