mirror of
https://github.com/BookStackApp/BookStack.git
synced 2024-08-26 12:16:07 +00:00
No need to save page
This commit is contained in:
parent
4daeb9daa6
commit
7368ff3e6a
@ -307,15 +307,13 @@ class PageRepo
|
||||
}
|
||||
|
||||
if ($parent instanceof Chapter) {
|
||||
$parentChapter = $parent;
|
||||
$parent = $parent->book;
|
||||
$page->chapter_id = $parentChapter->id;
|
||||
$page->save();
|
||||
$page->chapter_id = $parent->id;
|
||||
}
|
||||
|
||||
$page->changeBook($parent instanceof Book ? $parent->id : $parent->book->id);
|
||||
$page->rebuildPermissions();
|
||||
return $parent;
|
||||
|
||||
return ($parent instanceof Book ? $parent : $parent->book);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user