1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-08-09 10:22:51 +03:00

Merge branch 'conflict_warnings' of https://github.com/MatthieuParis/BookStack into MatthieuParis-conflict_warnings

This commit is contained in:
Dan Brown
2021-10-04 17:10:40 +01:00
3 changed files with 31 additions and 0 deletions

View File

@@ -43,6 +43,16 @@ class PageEditActivity
return trans('entities.pages_draft_edit_active.message', ['start' => $userMessage, 'time' => $timeMessage]);
}
/**
* Check if the page has been updated since the draft has been saved.
*
* @return bool
*/
public function hasPageBeenUpdatedSinceDraftSaved(PageRevision $draft): bool
{
return $draft->page->updated_at->timestamp >= $draft->updated_at->timestamp;
}
/**
* Get the message to show when the user will be editing one of their drafts.
*