]> BookStack Code Mirror - bookstack/blobdiff - app/Http/Controllers/ChapterController.php
Added initial translation into German (formal)
[bookstack] / app / Http / Controllers / ChapterController.php
index 3c9050bf6b4b705aeb371a09b8273ed9ea581245..57ca58beba9750d9ba3082b57f9202a20f1a2506 100644 (file)
@@ -117,7 +117,7 @@ class ChapterController extends Controller
         $this->checkOwnablePermission('chapter-update', $chapter);
         $chapter->fill($request->all());
         $chapter->slug = $this->chapterRepo->findSuitableSlug($chapter->name, $book->id, $chapter->id);
-        $chapter->updated_by = auth()->user()->id;
+        $chapter->updated_by = user()->id;
         $chapter->save();
         Activity::add($chapter, 'chapter_update', $book->id);
         return redirect($chapter->getUrl());
@@ -204,7 +204,7 @@ class ChapterController extends Controller
             return redirect()->back();
         }
 
-        $this->chapterRepo->changeBook($parent->id, $chapter);
+        $this->chapterRepo->changeBook($parent->id, $chapter, true);
         Activity::add($chapter, 'chapter_move', $chapter->book->id);
         session()->flash('success', sprintf('Chapter moved to "%s"', $parent->name));