* Adjust code style.

This commit is contained in:
tianshujie98
2021-01-19 10:46:46 +08:00
parent 1208386360
commit 2a65df963e
2 changed files with 12 additions and 2 deletions
+7 -1
View File
@@ -377,7 +377,13 @@ class story extends control
$stories = array();
foreach($mails as $mail) $stories[] = $mail->storyID;
if($project) $this->loadModel('project')->linkStory($project, $stories);
/* Project or execution linked stories. */
if($project)
{
$this->loadModel('project')->linkStory($project, $stories);
if($project != $this->session->PRJ) $this->loadModel('project')->linkStory($this->session->PRJ, $stories);
}
/* If storyID not equal zero, subdivide this story to child stories and close it. */
if($storyID and !empty($mails))
+5 -1
View File
@@ -244,7 +244,11 @@ class storyModel extends model
$this->dao->insert(TABLE_STORYSPEC)->data($data)->exec();
/* Project or execution linked story. */
if($projectID != 0 and $story->status != 'draft') $this->linkStory($projectID, $this->post->product, $storyID);
if($projectID != 0 and $story->status != 'draft')
{
$this->linkStory($projectID, $this->post->product, $storyID);
if($projectID != $this->session->PRJ) $this->linkStory($this->session->PRJ, $this->post->product, $storyID);
}
if(is_array($this->post->URS))
{