Merge branch 'master' of https://gitlab.zcorp.cc/easycorp/zentaopms
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user