From 9b6be6479e9ef1cd0f9bb7ef1ce98db11a366cce Mon Sep 17 00:00:00 2001 From: wangyuting Date: Tue, 13 May 2025 09:43:09 +0800 Subject: [PATCH] * [bug#62447,done,1h,0h] Adjust update story return value. --- lib/zin/wg/doclist/v1.php | 1 + module/story/model.php | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/zin/wg/doclist/v1.php b/lib/zin/wg/doclist/v1.php index 1bf5165e2a..7b33a6d2fc 100644 --- a/lib/zin/wg/doclist/v1.php +++ b/lib/zin/wg/doclist/v1.php @@ -55,6 +55,7 @@ class docList extends wg return div ( + setClass('form-group-wrapper picker-box'), $mode == 'edit' ? picker ( set::name('docs'), diff --git a/module/story/model.php b/module/story/model.php index bed7194a67..f8cfbda8f7 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -827,11 +827,11 @@ class storyModel extends model /** * Update a story. * - * @param int $storyID + * @param int $storyID * @access public - * @return array the changes of the story. + * @return bool|int */ - public function update(int $storyID, object $story, string|bool $comment = ''): bool + public function update(int $storyID, object $story, string|bool $comment = ''): bool|int { $oldStory = $this->getByID($storyID); @@ -943,7 +943,7 @@ class storyModel extends model if(isset($story->closedReason) and $story->closedReason == 'done') $this->loadModel('score')->create('story', 'close'); if(!empty($oldStory->twins)) $this->syncTwins($oldStory->id, $oldStory->twins, $changes, 'Edited'); - return true; + return !empty($actionID) ? $actionID : false; } /**