diff --git a/module/dept/model.php b/module/dept/model.php index 7d39627ec8..167a719e2f 100644 --- a/module/dept/model.php +++ b/module/dept/model.php @@ -366,7 +366,7 @@ class deptModel extends model return $this->dao->select("$keyField, realname")->from(TABLE_USER) ->where('1=1') - ->beginIF(strpos($params, 'queryAll') === false)->andWhere('deleted')->eq(0)->fi() + ->beginIF(strpos($params, 'queryAll') === false && empty($this->config->user->showDeleted))->andWhere('deleted')->eq(0)->fi() ->beginIF(strpos($params, 'all') === false)->andWhere('type')->eq($type)->fi() ->beginIF($childDepts)->andWhere('dept')->in($childDepts)->fi() ->beginIF($this->config->vision)->andWhere("CONCAT(',', visions, ',')")->like("%,{$this->config->vision},%")->fi() diff --git a/module/dept/test/model/getdeptuserpairs.php b/module/dept/test/model/getdeptuserpairs.php index 4f760b8ffd..453ca2fee1 100755 --- a/module/dept/test/model/getdeptuserpairs.php +++ b/module/dept/test/model/getdeptuserpairs.php @@ -4,25 +4,25 @@ include dirname(__FILE__, 5) . '/test/lib/init.php'; include dirname(__FILE__, 2) . '/lib/dept.unittest.class.php'; su('admin'); -zenData('dept')->gen(30); +zenData('dept')->gen(30); zenData('user')->loadYaml('user')->gen(200); /** title=测试 deptModel->getDeptUserPairs(); +timeout=0 cid=1 -pid=1 -查询所有内部用户 >> 用户49 -查询所有外部用户 >> 测试1 -根据部门查询用户 >> 用户10 -键值为account查询 >> 用户40 -键值为out查询 >> 用户10 -type为out查询 >> 用户10 -查询所有内部用户统计 >> 100 -查询所有外部用户统计 >> 100 -根据部门查询用户统计 >> 10 -查询全部用户统计 >> 200 +- 查询所有内部用户属性50 @用户49 +- 查询所有外部用户属性101 @测试1 +- 根据部门查询用户属性11 @用户10 +- 键值为account查询属性user40 @用户40 +- 键值为out查询属性user10 @用户10 +- type为out查询属性user10 @用户10 +- 查询所有内部用户统计 @100 +- 查询所有外部用户统计 @100 +- 根据部门查询用户统计 @10 +- 查询全部用户统计 @200 */ diff --git a/module/story/model.php b/module/story/model.php index dfe782207c..12c76ec69c 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -1582,7 +1582,7 @@ class storyModel extends model $isChanged = !empty($oldStory->changedBy) ? true : false; if($preStatus == 'reviewing') $preStatus = $isChanged ? 'changing' : 'draft'; - $actionID = $this->loadModel('action')->create('story', $storyID, 'Closed', $this->post->comment, ucfirst(zget($this->post, 'closedReason', '')) . (zget($this->post, 'duplicateStory', '') ? ':' . (int)$this->post->duplicateStory : '') . "|$preStatus"); + $actionID = $this->loadModel('action')->create('story', $storyID, 'Closed', $this->post->comment, ucfirst(zget($_POST, 'closedReason', '')) . (!empty($_POST['duplicateStory']) ? ':' . (int)$this->post->duplicateStory : '') . "|$preStatus"); $this->action->logHistory($actionID, $changes); }