]> BookStack Code Mirror - bookstack/blobdiff - app/Entities/Tools/Cloner.php
respective book and chapter structure added.
[bookstack] / app / Entities / Tools / Cloner.php
index f7ed4b72dcb628263b5ce0395ea29d4bd440ff59..2030b050c4b19f39e01b1c6312c3e381405ff855 100644 (file)
@@ -77,7 +77,7 @@ class Cloner
         $copyBook = $this->bookRepo->create($bookDetails);
 
         // Clone contents
-        $directChildren = $original->getDirectChildren();
+        $directChildren = $original->getDirectVisibleChildren();
         foreach ($directChildren as $child) {
             if ($child instanceof Chapter && userCan('chapter-create', $copyBook)) {
                 $this->cloneChapter($child, $copyBook, $child->name);