* [bug#62797,done,0.2h] fix bug.

This commit is contained in:
sunguangming
2025-05-28 04:36:44 +00:00
parent af1c2f3b14
commit b78f12d5cd
+6 -6
View File
@@ -1771,18 +1771,18 @@ class storyModel extends model
$allChanges[$storyID] = common::createChanges($oldStory, $story);
if($story->plan != $oldStory->plan and !empty($oldStory->plan) and $oldStory->type == 'story')
{
foreach(explode(',', (string)$oldStory->plan) as $planID)
foreach(explode(',', (string)$oldStory->plan) as $oldPlanID)
{
if(!$planID) continue;
$unlinkPlans[$planID] = empty($unlinkPlans[$planID]) ? $storyID : "{$unlinkPlans[$planID]},$storyID";
if(!$oldPlanID) continue;
$unlinkPlans[$oldPlanID] = empty($unlinkPlans[$oldPlanID]) ? $storyID : "{$unlinkPlans[$oldPlanID]},$storyID";
}
}
if($story->plan != $oldStory->plan and !empty($story->plan))
{
foreach(explode(',', (string)$story->plan) as $planID)
foreach(explode(',', (string)$story->plan) as $newPlanID)
{
if(!$planID) continue;
$link2Plans[$planID] = empty($link2Plans[$planID]) ? $storyID : "{$link2Plans[$planID]},$storyID";
if(!$newPlanID) continue;
$link2Plans[$newPlanID] = empty($link2Plans[$newPlanID]) ? $storyID : "{$link2Plans[$newPlanID]},$storyID";
}
}
}