mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-05-26 00:30:02 +08:00
Prevent page redirect on draft saving
Only an issue when using the non 'mysqlnd' extension. Fixes #120
This commit is contained in:
@ -92,7 +92,7 @@ class PageController extends Controller
|
|||||||
|
|
||||||
$draftPage = $this->pageRepo->getById($pageId, true);
|
$draftPage = $this->pageRepo->getById($pageId, true);
|
||||||
|
|
||||||
$chapterId = $draftPage->chapter_id;
|
$chapterId = intval($draftPage->chapter_id);
|
||||||
$parent = $chapterId !== 0 ? $this->chapterRepo->getById($chapterId) : $book;
|
$parent = $chapterId !== 0 ? $this->chapterRepo->getById($chapterId) : $book;
|
||||||
$this->checkOwnablePermission('page-create', $parent);
|
$this->checkOwnablePermission('page-create', $parent);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user