* Merge commit dc31210bfb.

This commit is contained in:
songchenxuan
2023-11-10 10:39:29 +08:00
parent f6c36729be
commit fe3c2de13f
2 changed files with 9 additions and 4 deletions
+6 -1
View File
@@ -140,9 +140,12 @@ class model extends baseModel
if(empty($method)) $method = $methodName;
static $actions = array();
static $hasAction = array();
if(!isset($hasAction[$moduleName])) $hasAction[$moduleName] = true;
if($this->config->edition != 'open')
{
if(empty($actions[$moduleName]))
if($hasAction[$moduleName] and empty($actions[$moduleName]))
{
$actions[$moduleName] = $this->dao->select('*')->from(TABLE_WORKFLOWACTION)
->where('module')->eq($moduleName)
@@ -150,6 +153,8 @@ class model extends baseModel
->andWhere('status')->eq('enable')
->beginIF(!empty($this->config->vision))->andWhere('vision')->eq($this->config->vision)->fi()
->fetchAll('action');
if(empty($actions[$moduleName])) $hasAction[$moduleName] = false;
}
}
+3 -3
View File
@@ -38,9 +38,9 @@ class userModel extends model
* @access public
* @return array
*/
public function getList($params = 'nodeleted')
public function getList($params = 'nodeleted', $fields = '*')
{
return $this->dao->select('*')->from(TABLE_USER)
return $this->dao->select($fields)->from(TABLE_USER)
->where('1 = 1')
->beginIF(strpos($params, 'all') === false)->andWhere('type')->eq('inside')->fi()
->beginIF(strpos($params, 'nodeleted') !== false)->andWhere('deleted')->eq(0)->fi()
@@ -163,7 +163,7 @@ class userModel extends model
public function getAvatarPairs($params = 'nodeleted')
{
$avatarPairs = array();
$userList = $this->getList($params);
$userList = $this->getList($params, 'account,avatar');
foreach($userList as $user) $avatarPairs[$user->account] = $user->avatar;
return $avatarPairs;