mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-05-07 01:30:06 +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->book_id = $newBookId;
|
||||||
$this->refreshSlug();
|
$this->refreshSlug();
|
||||||
$this->save();
|
$this->save();
|
||||||
|
$this->refresh();
|
||||||
|
|
||||||
if ($oldUrl !== $this->getUrl()) {
|
if ($oldUrl !== $this->getUrl()) {
|
||||||
app()->make(ReferenceUpdater::class)->updateEntityPageReferences($this, $oldUrl);
|
app()->make(ReferenceUpdater::class)->updateEntityPageReferences($this, $oldUrl);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->refresh();
|
|
||||||
|
|
||||||
// Update all child pages if a chapter
|
// Update all child pages if a chapter
|
||||||
if ($this instanceof Chapter) {
|
if ($this instanceof Chapter) {
|
||||||
foreach ($this->pages()->withTrashed()->get() as $page) {
|
foreach ($this->pages()->withTrashed()->get() as $page) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue