* Finish task#37930.
This commit is contained in:
@@ -1909,18 +1909,23 @@ class story extends control
|
||||
unset($stories[$story->id]);
|
||||
}
|
||||
}
|
||||
|
||||
if(!empty($children))
|
||||
{
|
||||
$position = 0;
|
||||
$reorderStory = array();
|
||||
foreach($stories as $story)
|
||||
{
|
||||
$position ++;
|
||||
$reorderStory[$story->id] = $story;
|
||||
if(isset($children[$story->id]))
|
||||
{
|
||||
array_splice($stories, $position, 0, $children[$story->id]);
|
||||
$position += count($children[$story->id]);
|
||||
foreach($children[$story->id] as $childrenID => $childrenStory)
|
||||
{
|
||||
$reorderStory[$childrenID] = $childrenStory;
|
||||
}
|
||||
}
|
||||
unset($stories[$story->id]);
|
||||
}
|
||||
$stories = $reorderStory;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user