]> BookStack Code Mirror - bookstack/blobdiff - app/Http/Controllers/ChapterController.php
replace GPL diff lib with MIT lib
[bookstack] / app / Http / Controllers / ChapterController.php
index a3a939f617bc0218b1563e0220b77dd53bddbab1..3c9050bf6b4b705aeb371a09b8273ed9ea581245 100644 (file)
@@ -59,7 +59,7 @@ class ChapterController extends Controller
 
         $input = $request->all();
         $input['priority'] = $this->bookRepo->getNewPriority($book);
-        $chapter = $this->chapterRepo->createFromInput($request->all(), $book);
+        $chapter = $this->chapterRepo->createFromInput($input, $book);
         Activity::add($chapter, 'chapter_create', $book->id);
         return redirect($chapter->getUrl());
     }
@@ -171,6 +171,14 @@ class ChapterController extends Controller
         ]);
     }
 
+    /**
+     * Perform the move action for a chapter.
+     * @param $bookSlug
+     * @param $chapterSlug
+     * @param Request $request
+     * @return mixed
+     * @throws \BookStack\Exceptions\NotFoundException
+     */
     public function move($bookSlug, $chapterSlug, Request $request) {
         $book = $this->bookRepo->getBySlug($bookSlug);
         $chapter = $this->chapterRepo->getBySlug($chapterSlug, $book->id);