There's a problem in the way that preview works - it is
possible for editors to overwrite other people's
changes in the following circumstance (seen today on
the Wiki in the office):
User A edits WikiFile
User B edits WikiFile
User A saves WikiFile
User B previews WikiFile
User B saves WikiFile
This last one _should_ show the "somebody else edited
the page" error message, but doesn't...
Simple checking of the code in Page::send_editor()
shows an obvious bug - the timestamp used to guard
against conflicting changes is reset each time the
preview is shown. An easy fix is to store the date
stamp for the _start_ of the editing session in the
hidden datestamp form field. Only set this to the mtime
of the existing file on the first pass through the edit
call. The attached patch works for me...
Log in to post a comment.