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) {
|
if ($parent instanceof Chapter) {
|
||||||
$parentChapter = $parent;
|
$page->chapter_id = $parent->id;
|
||||||
$parent = $parent->book;
|
|
||||||
$page->chapter_id = $parentChapter->id;
|
|
||||||
$page->save();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$page->changeBook($parent instanceof Book ? $parent->id : $parent->book->id);
|
$page->changeBook($parent instanceof Book ? $parent->id : $parent->book->id);
|
||||||
$page->rebuildPermissions();
|
$page->rebuildPermissions();
|
||||||
return $parent;
|
|
||||||
|
return ($parent instanceof Book ? $parent : $parent->book);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user