mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-04-25 04:51:35 +00:00
Fixed lack of url reference updating on book child move
This commit is contained in:
parent
9153be963d
commit
f092c97748
1 changed files with 1 additions and 2 deletions
|
@ -62,13 +62,12 @@ abstract class BookChild extends Entity
|
|||
$this->book_id = $newBookId;
|
||||
$this->refreshSlug();
|
||||
$this->save();
|
||||
$this->refresh();
|
||||
|
||||
if ($oldUrl !== $this->getUrl()) {
|
||||
app()->make(ReferenceUpdater::class)->updateEntityPageReferences($this, $oldUrl);
|
||||
}
|
||||
|
||||
$this->refresh();
|
||||
|
||||
// Update all child pages if a chapter
|
||||
if ($this instanceof Chapter) {
|
||||
foreach ($this->pages()->withTrashed()->get() as $page) {
|
||||
|
|
Loading…
Add table
Reference in a new issue