* [bug#60557] Build docs tree for edit chapter.

This commit is contained in:
xieqiyu
2025-03-17 16:46:55 +08:00
committed by 代婷婷
parent b3943ab37c
commit 3d9e021e55
2 changed files with 58 additions and 3 deletions
+2 -2
View File
@@ -1948,8 +1948,8 @@ class doc extends control
if($docID) $doc = $this->doc->getByID($docID);
if($modalType == 'chapter' || $modalType == 'subDoc' || $parentID || (isset($doc) && $doc->parent))
{
$chapterAndDocs = $this->doc->getDocsOfLibs(array($libID), $objectType);
$chapterAndDocs = array_column($chapterAndDocs, 'title', 'id');
$chapterAndDocs = $this->doc->getDocsOfLibs(array($libID), $objectType, $docID);
$chapterAndDocs = $this->doc->buildNestedDocs($chapterAndDocs);
$this->view->chapterAndDocs = $chapterAndDocs;
}