diff --git a/module/block/control.php b/module/block/control.php index 10cf74edb7..f7960cc286 100644 --- a/module/block/control.php +++ b/module/block/control.php @@ -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) diff --git a/module/doc/model.php b/module/doc/model.php index 5e3060ef7b..612e27ccf1 100644 --- a/module/doc/model.php +++ b/module/doc/model.php @@ -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"; diff --git a/module/project/model.php b/module/project/model.php index 4e33e346e5..5de6d2bf8d 100644 --- a/module/project/model.php +++ b/module/project/model.php @@ -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');