Removed some unused parameters and fixed env test logic

This commit is contained in:
Dan Brown
2019-09-20 01:18:59 +01:00
parent 8b550991a4
commit 7cd956b24b
7 changed files with 19 additions and 25 deletions

View File

@ -199,7 +199,7 @@ class BookController extends Controller
'image' => $this->imageRepo->getImageValidationRules(),
]);
$book = $this->bookRepo->updateFromInput('book', $book, $request->all());
$book = $this->bookRepo->updateFromInput($book, $request->all());
$this->bookUpdateActions($book, $request);
Activity::add($book, 'book_update', $book->id);

View File

@ -177,7 +177,7 @@ class BookshelfController extends Controller
'image' => $this->imageRepo->getImageValidationRules(),
]);
$shelf = $this->entityRepo->updateFromInput('bookshelf', $shelf, $request->all());
$shelf = $this->entityRepo->updateFromInput($shelf, $request->all());
$this->shelfUpdateActions($shelf, $request);
Activity::add($shelf, 'bookshelf_update');

View File

@ -3,7 +3,6 @@
use Activity;
use BookStack\Auth\UserRepo;
use BookStack\Entities\Repos\EntityRepo;
use BookStack\Entities\ExportService;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
use Views;
@ -113,7 +112,7 @@ class ChapterController extends Controller
$chapter = $this->entityRepo->getEntityBySlug('chapter', $chapterSlug, $bookSlug);
$this->checkOwnablePermission('chapter-update', $chapter);
$this->entityRepo->updateFromInput('chapter', $chapter, $request->all());
$this->entityRepo->updateFromInput($chapter, $request->all());
Activity::add($chapter, 'chapter_update', $chapter->book->id);
return redirect($chapter->getUrl());
}