Merge branch 'master' of git://github.com/rondaa/BookStack into rondaa-master

This commit is contained in:
Dan Brown 2021-01-02 16:25:59 +00:00
commit 83d77d5166
No known key found for this signature in database
GPG key ID: 46D9F943C24A2EF9
2 changed files with 4 additions and 2 deletions

View file

@ -286,9 +286,10 @@ class PageRepo
public function restoreRevision(Page $page, int $revisionId): Page
{
$page->revision_count++;
$this->savePageRevision($page);
$revision = $page->revisions()->where('id', '=', $revisionId)->first();
$summary = trans('entities.pages_revision_restored_from', ['id' => strval($revisionId), 'summary' => $revision->summary]);
$this->savePageRevision($page, $summary);
$page->fill($revision->toArray());
$content = new PageContent($page);
$content->setNewHTML($revision->html);

View file

@ -210,6 +210,7 @@ return [
'pages_revisions' => 'Page Revisions',
'pages_revisions_named' => 'Page Revisions for :pageName',
'pages_revision_named' => 'Page Revision for :pageName',
'pages_revision_restored_from' => 'Restored from #:id ":summary"',
'pages_revisions_created_by' => 'Created By',
'pages_revisions_date' => 'Revision Date',
'pages_revisions_number' => '#',