Merge branch 'master' of github.com:easysoft/zentaopms
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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";
|
||||
|
||||
|
||||
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user