1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2024-11-23 19:32:29 +01:00

Prevent page redirect on draft saving

Only an issue when using the non 'mysqlnd' extension.
Fixes #120
This commit is contained in:
Dan Brown 2016-06-10 19:45:53 +01:00
parent 44e337cef6
commit 61596a8e21

View File

@ -92,7 +92,7 @@ class PageController extends Controller
$draftPage = $this->pageRepo->getById($pageId, true);
$chapterId = $draftPage->chapter_id;
$chapterId = intval($draftPage->chapter_id);
$parent = $chapterId !== 0 ? $this->chapterRepo->getById($chapterId) : $book;
$this->checkOwnablePermission('page-create', $parent);