Merge branch 'master' of github.com:easysoft/zentaopms

This commit is contained in:
wangyidong
2020-02-05 17:33:58 +08:00
3 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -893,7 +893,7 @@ class block extends control
$projectIdList = array_keys($projects);
/* Get tasks. */
/* Get tasks. Fix bug #2918.*/
$yesterday = date('Y-m-d', strtotime('-1 day'));
$tasks = $this->dao->select("project, count(id) as totalTasks, count(status in ('wait','doing','pause') or null) as undoneTasks, count(finishedDate like '{$yesterday}%' or null) as yesterdayFinished, sum(if(status != 'cancel', estimate, 0)) as totalEstimate, sum(consumed) as totalConsumed, sum(if(status != 'cancel' and status != 'closed', `left`, 0)) as totalLeft")->from(TABLE_TASK)
->where('project')->in($projectIdList)
+3 -1
View File
@@ -618,7 +618,9 @@ class docModel extends model
->join('users', ',')
->remove('files,labels,uid')
->get();
$doc->contentMarkdown = strip_tags($this->post->contentMarkdown, $this->config->allowedTags);
/* Fix bug #2929. strip_tags($this->post->contentMarkdown, $this->config->allowedTags)*/
$doc->contentMarkdown = $this->post->contentMarkdown;
if($doc->acl == 'private') $doc->users = $this->app->user->account;
$condition = "lib = '$doc->lib' AND module = $doc->module";
+1 -3
View File
@@ -1044,20 +1044,18 @@ class projectModel extends model
$delay = helper::diffDate(helper::today(), $project->end);
if($delay > 0) $project->delay = $delay;
}
/* Fix bug #2943. */
$total = $this->dao->select('
SUM(estimate) AS totalEstimate,
SUM(consumed) AS totalConsumed,
SUM(`left`) AS totalLeft')
->from(TABLE_TASK)
->where('project')->eq((int)$projectID)
->andWhere('status')->ne('cancel')
->andWhere('deleted')->eq(0)
->andWhere('parent')->lt(1)
->fetch();
$closedTotalLeft= (int)$this->dao->select('SUM(`left`) AS totalLeft')->from(TABLE_TASK)
->where('project')->eq((int)$projectID)
->andWhere('status')->eq('closed')
->andWhere('deleted')->eq(0)
->andWhere('parent')->lt(1)
->fetch('totalLeft');