* Finish task #44216.

This commit is contained in:
liyuchun
2021-11-11 15:12:16 +08:00
parent 5bb53b1000
commit 06c1daf5fd
+9 -2
View File
@@ -402,6 +402,15 @@ class storyModel extends model
public function batchCreate($productID = 0, $branch = 0, $type = 'story')
{
$forceReview = $this->checkForceReview();
foreach($_POST['title'] as $index => $value)
{
if($_POST['title'][$index] and isset($_POST['reviewer'][$index])) $_POST['reviewer'][$index] = array_filter($_POST['reviewer'][$index]);
if($_POST['title'][$index] and empty($_POST['reviewer'][$index]) and $forceReview)
{
dao::$errors[] = $this->lang->story->errorEmptyReviewedBy;
return false;
}
}
$this->loadModel('action');
$branch = (int)$branch;
@@ -428,8 +437,6 @@ class storyModel extends model
$stories->plan[$i] = $plan;
$stories->pri[$i] = (int)$pri;
$stories->source[$i] = $source;
if(isset($stories->reviewer[$i])) $stories->reviewer[$i] = array_filter($stories->reviewer[$i]);
}
if(isset($stories->uploadImage)) $this->loadModel('file');