Merge branch 'master' of git://github.com/rondaa/BookStack into rondaa-master
This commit is contained in:
commit
83d77d5166
2 changed files with 4 additions and 2 deletions
|
@ -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);
|
||||
|
|
|
@ -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' => '#',
|
||||
|
|
Loading…
Reference in a new issue