This commit is contained in:
tianshujie98
2021-02-25 13:47:09 +08:00
47 changed files with 168 additions and 3973 deletions
+11 -5
View File
@@ -355,8 +355,11 @@ class projectModel extends model
if(!empty($sprint->percent)) $this->checkWorkload('create', $sprint->percent);
/* Set planDuration and realDuration. */
$sprint->planDuration = $this->loadModel('programplan')->getDuration($sprint->begin, $sprint->end);
if(!empty($sprint->realBegan) and !empty($sprint->realEnd)) $sprint->realDuration = $this->loadModel('programplan')->getDuration($sprint->realBegan, $sprint->realEnd);
if($this->config->maxVersion)
{
$sprint->planDuration = $this->loadModel('programplan')->getDuration($sprint->begin, $sprint->end);
if(!empty($sprint->realBegan) and !empty($sprint->realEnd)) $sprint->realDuration = $this->loadModel('programplan')->getDuration($sprint->realBegan, $sprint->realEnd);
}
$sprint = $this->loadModel('file')->processImgURL($sprint, $this->config->project->editor->create['id'], $this->post->uid);
$this->dao->insert(TABLE_PROJECT)->data($sprint)
@@ -380,7 +383,7 @@ class projectModel extends model
$this->file->updateObjectID($this->post->uid, $projectID, 'project');
/* Update the path. */
$this->loadModel('programplan')->setTreePath($projectID);
if($this->config->maxVersion) $this->loadModel('programplan')->setTreePath($projectID);
/* Copy team of project. */
if($copyProjectID != '')
@@ -485,8 +488,11 @@ class projectModel extends model
if(!empty($project->percent)) $this->checkWorkload('update', $project->percent, $oldProject);
/* Set planDuration and realDuration. */
$project->planDuration = $this->loadModel('programplan')->getDuration($project->begin, $project->end);
if(!empty($project->realBegan) and !empty($project->realEnd)) $project->realDuration = $this->loadModel('programplan')->getDuration($project->realBegan, $project->realEnd);
if($this->config->maxVersion)
{
$project->planDuration = $this->loadModel('programplan')->getDuration($project->begin, $project->end);
if(!empty($project->realBegan) and !empty($project->realEnd)) $project->realDuration = $this->loadModel('programplan')->getDuration($project->realBegan, $project->realEnd);
}
/* Update data. */
$this->dao->update(TABLE_PROJECT)->data($project)