* Fix bug #26994.
This commit is contained in:
@@ -930,7 +930,8 @@ class productplanModel extends model
|
||||
->fetchPairs();
|
||||
if(isset($branchPlanPairs[$plan->branch])) $branchPlanPairs[$plan->branch] = $planID;
|
||||
|
||||
$plansOfStory = ',' . implode(',', $branchPlanPairs);
|
||||
$plansOfStory = implode(',', $branchPlanPairs);
|
||||
$plansOfStory = trim($plansOfStory, ',');
|
||||
|
||||
$this->dao->update(TABLE_STORY)->set("plan")->eq($plansOfStory)->where('id')->eq((int)$storyID)->exec();
|
||||
|
||||
|
||||
@@ -1976,7 +1976,7 @@ class storyModel extends model
|
||||
{
|
||||
if(!empty($oldStory->plan) and isset($branchPlanPairs[$plan->branch]) and $branchPlanPairs[$plan->branch] != $planID) $unlinkPlans[$branchPlanPairs[$plan->branch]] = empty($unlinkPlans[$branchPlanPairs[$plan->branch]]) ? $storyID : "{$unlinkPlans[$branchPlanPairs[$plan->branch]]},$storyID";
|
||||
if(isset($branchPlanPairs[$plan->branch])) $branchPlanPairs[$plan->branch] = $planID;
|
||||
$story->plan = $oldStory->plan ? ',' . implode(',', $branchPlanPairs) : $planID;
|
||||
$story->plan = $oldStory->plan ? implode(',', $branchPlanPairs) : $planID;
|
||||
$story->plan = trim($story->plan, ',');
|
||||
if($story->plan != $oldStory->plan and !empty($planID)) $link2Plans[$planID] = empty($link2Plans[$planID]) ? $storyID : "{$link2Plans[$planID]},$storyID";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user