1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-08-07 23:03:00 +03:00

Pages: Fixed unused changelog on first page publish

Included test to cover.
For #5056
This commit is contained in:
Dan Brown
2024-06-09 17:18:23 +01:00
parent c77e8730d6
commit a8ce199e0d
2 changed files with 28 additions and 1 deletions

View File

@@ -77,7 +77,8 @@ class PageRepo
$this->updateTemplateStatusAndContentFromInput($draft, $input);
$this->baseRepo->update($draft, $input);
$this->revisionRepo->storeNewForPage($draft, trans('entities.pages_initial_revision'));
$summary = trim($input['summary'] ?? '') ?: trans('entities.pages_initial_revision');
$this->revisionRepo->storeNewForPage($draft, $summary);
$draft->refresh();
Activity::add(ActivityType::PAGE_CREATE, $draft);