[Moin-devel] [ moin-Bugs-685003 ] Using "preview" button when editing can lose data

SourceForge.net noreply at sourceforge.net
Tue Feb 11 16:38:02 EST 2003


Bugs item #685003, was opened at 2003-02-12 01:05
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=108482&aid=685003&group_id=8482

Category: None
Group: None
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Steve McIntyre (steve_mcintyre)
>Assigned to: Jürgen Hermann (jhermann)
>Summary: Using "preview" button when editing can lose data

Initial Comment:
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...


----------------------------------------------------------------------

>Comment By: Jürgen Hermann (jhermann)
Date: 2003-02-12 01:44

Message:
Logged In: YES 
user_id=39128

Fixed, using only 3 more lines ;)

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=108482&aid=685003&group_id=8482




More information about the Moin-devel mailing list