From 2c347bccb8d36cd2554702a98bcec49c6ddd6158 Mon Sep 17 00:00:00 2001 From: zhouxin Date: Tue, 15 Mar 2022 02:14:16 +0000 Subject: [PATCH] Fix bug #20749. --- module/story/model.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/module/story/model.php b/module/story/model.php index cbf6744369..b41f7b0dc2 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -1277,7 +1277,6 @@ class storyModel extends model */ public function review($storyID) { - if($this->post->result == false) return print(js::alert($this->lang->story->mustChooseResult)); if($this->post->result == 'revert' and $this->post->preVersion == false) return print(js::alert($this->lang->story->mustChoosePreVersion)); if(strpos($this->config->story->review->requiredFields, 'comment') !== false and !$this->post->comment) @@ -1286,6 +1285,12 @@ class storyModel extends model return false; } + if($this->post->result == false) + { + dao::$errors[] = $this->lang->story->mustChooseResult; + return false; + } + $oldStory = $this->dao->findById($storyID)->from(TABLE_STORY)->fetch(); $now = helper::now(); $date = helper::today();