From a75fa991322c364731686f8c2f53d1c3309a1ae9 Mon Sep 17 00:00:00 2001
From: hufangzhou <746775970@qq.com>
Date: Tue, 19 Jan 2021 09:48:58 +0800
Subject: [PATCH 1/3] * Adjust the code.
---
module/story/control.php | 6 +-----
module/story/model.php | 8 ++------
2 files changed, 3 insertions(+), 11 deletions(-)
diff --git a/module/story/control.php b/module/story/control.php
index 0c1a6748b0..e424988ff4 100644
--- a/module/story/control.php
+++ b/module/story/control.php
@@ -371,11 +371,7 @@ class story extends control
$stories = array();
foreach($mails as $mail) $stories[] = $mail->storyID;
- if($project)
- {
- $this->loadModel('project')->linkStory($project, $stories);
- if($project != $this->session->PRJ) $this->loadModel('project')->linkStory($this->session->PRJ, $stories);
- }
+ if($project) $this->loadModel('project')->linkStory($project, $stories);
/* If storyID not equal zero, subdivide this story to child stories and close it. */
if($storyID and !empty($mails))
diff --git a/module/story/model.php b/module/story/model.php
index bfd3c1fa8b..a098e89584 100644
--- a/module/story/model.php
+++ b/module/story/model.php
@@ -244,11 +244,7 @@ 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 != $this->session->PRJ) $this->linkStory($this->session->PRJ, $this->post->product, $storyID);
- }
+ if($projectID != 0 and $story->status != 'draft') $this->linkStory($projectID, $this->post->product, $storyID);
if(is_array($this->post->URS))
{
@@ -325,7 +321,7 @@ class storyModel extends model
}
/**
- * Create a batch stories.
+ * Batch create stories.
*
* @access public
* @return int|bool the id of the created story or false when error.
From 2db4bb2c4ade3f9a4c8a6238eee38d9df65acc40 Mon Sep 17 00:00:00 2001
From: Yagami <976204163@qq.com>
Date: Tue, 19 Jan 2021 10:10:33 +0800
Subject: [PATCH 2/3] * Finish task #9023.
---
module/common/model.php | 8 +++-
module/my/view/profile.html.php | 13 +++++-
module/user/view/cropavatar.html.php | 64 ++++++++++++++++------------
3 files changed, 55 insertions(+), 30 deletions(-)
diff --git a/module/common/model.php b/module/common/model.php
index a0293223e0..f94998383e 100644
--- a/module/common/model.php
+++ b/module/common/model.php
@@ -276,7 +276,9 @@ class commonModel extends model
$isGuest = $app->user->account == 'guest';
echo "";
- echo "