From 9737c7f8cbffeae703d2700f415c7b78ae87b2f2 Mon Sep 17 00:00:00 2001 From: sunguangming Date: Thu, 22 Feb 2024 14:36:32 +0800 Subject: [PATCH] * Fix bug #46090. --- module/story/control.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/module/story/control.php b/module/story/control.php index b124cb0b70..c5d915636f 100755 --- a/module/story/control.php +++ b/module/story/control.php @@ -790,6 +790,8 @@ class story extends control ->removeIF($this->post->closedReason != 'duplicate', 'duplicateStory') ->removeIF($this->post->closedReason != 'subdivided', 'childStories') ->get(); + + if(strpos($this->config->{$story->type}->change->requiredFields, 'comment') !== false and !$this->post->comment) $this->send(array('result' => 'fail', 'message' => array('comment' => sprintf($this->lang->error->notempty, $this->lang->comment)))); $postData = $this->loadModel('file')->processImgURL($postData, $this->config->story->editor->close['id'], $this->post->uid); $changes = $this->story->close($storyID, $postData);